The Order resource can be used for integrating Chargebee with any shipping/order management application (like ShipStation)
Orders are not automatically generated or updated by Chargebee currently. They have to be created/updated either via api or merchant web console (a.k.a admin console).
An order can be created against an invoice irrespective of the status of the invoice and an invoice can have multiple orders associated with it.
Sample order [ JSON ]
{
"created_at": 1517679533,
"created_by": "full_access_key_v1",
"id": "__test__5SK0bLNFRFuCBmQJV",
"invoice_id": "__demo_inv__2",
"object": "order",
"status": "new",
"status_update_at": 1517679533
}
API Index URL GET
https://{site}.chargebee.com/api/v1/orders
string, max chars=40 Uniquely identifies the order. It is the api identifier for the order
optional, string, max chars=50 The invoice number which acts as an identifier for invoice and is generated sequentially.
optional, enumerated string, default=new The status of this order. Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management systemcompleteOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management systemcancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system
Show all values[+]
optional, string, max chars=50 Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application.
optional, string, max chars=50 The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;
optional, string, max chars=600 The custom note for the order.
optional, string, max chars=50 The tracking id of the order.
optional, string, max chars=50 Unique id to identify a group of orders.
optional, string, max chars=50 The source (or the user) from where the order has been created.
timestamp(UTC) in seconds The time at which the order was created
optional, timestamp(UTC) in seconds The time at which the order status was last updated.
optional, string, max chars=3 The currency code (ISO 4217 format) for the invoice
string, max chars=40 Uniquely identifies the order. It is the api identifier for the order
optional, string, max chars=50 The invoice number which acts as an identifier for invoice and is generated sequentially.
optional, enumerated string, default=new The status of this order. Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management systemcompleteOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management systemcancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system
Show all values[+]
optional, string, max chars=50 Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application.
optional, string, max chars=50 The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;
optional, string, max chars=600 The custom note for the order.
optional, string, max chars=50 The tracking id of the order.
optional, string, max chars=50 Unique id to identify a group of orders.
optional, string, max chars=50 The source (or the user) from where the order has been created.
timestamp(UTC) in seconds The time at which the order was created
optional, timestamp(UTC) in seconds The time at which the order status was last updated.
optional, string, max chars=3 The currency code (ISO 4217 format) for the invoice This API is used to retrieve an order.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"order": {
"created_at": 1517679533,
"created_by": "full_access_key_v1",
"id": "__test__5SK0bLNFRFuCBmQJV",
"invoice_id": "__demo_inv__2",
"object": "order",
"status": "new",
"status_update_at": 1517679533
}
}
URL Format
POST
https://{site}.chargebee.com/api/v1/orders
optional, string, max chars=40 Uniquely identifies the order. If not given, this will be auto-generated.
required, string, max chars=50 The invoice number which acts as an identifier for invoice and is generated sequentially.
optional, enumerated string The order status. Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management systemcompleteOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management systemcancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system
Show all values[+]
optional, string, max chars=50 Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application.
optional, string, max chars=50 The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
optional, string, max chars=600 The custom note for the order.
optional, string, max chars=50 The tracking id of the order.
optional, string, max chars=50 Unique id to identify a group of orders.
always returned required
Resource object representing order
Sample admin console URL
https://{site}.chargebee.com/admin-console/orders/123x
Updates an order. If the status of an order is changed while updating the order, the status_update_at attribute is set with the current time.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"order": {
"created_at": 1517679538,
"created_by": "full_access_key_v1",
"id": "__test__5SK0bLNFRFuCD1gLa",
"invoice_id": "__demo_inv__2",
"object": "order",
"status": "processing",
"status_update_at": 1517679538
}
}
URL Format
POST
https://{site}.chargebee.com/api/v1/orders/{order-id}
optional, string, max chars=50 Reference id is the unique identifier of the order in the shipping/order management application.
optional, string, max chars=50 Unique id to identify a group of orders.
optional, string, max chars=600 The custom note for the order.
optional, string, max chars=50 The tracking id of the order.
optional, string, max chars=50 The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;.
optional, enumerated string, default=new The order status. Possible values are
newOrder has been created. Applicable only if you are using Chargebee's legacy order management system.processingOrder is being processed. Applicable only if you are using Chargebee's legacy order management systemcompleteOrder has been processed successfully. Applicable only if you are using Chargebee's legacy order management systemcancelledOrder has been cancelled. Applicable only if you are using Chargebee's legacy order management system
Show all values[+] shipping_address[[0..n]][0..n]
optional, string Parameters for shipping_address
Parameters for shipping_address
pass parameters as shipping_address[<param name>]
shipping_address[first_name] optional, string, max chars=150 shipping_address[last_name] optional, string, max chars=150 optional, string, max chars=70 shipping_address[company] optional, string, max chars=250 optional, string, max chars=50 optional, string, max chars=150 optional, string, max chars=150 optional, string, max chars=150 optional, string, max chars=50 shipping_address[state_code] optional, string, max chars=50 optional, string, max chars=50 optional, string, max chars=20 shipping_address[country] optional, string, max chars=50
always returned required
Resource object representing order
Sample admin console URL
https://{site}.chargebee.com/admin-console/orders/123x
Retrieves an order corresponding to the order id passed.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"order": {
"created_at": 1517506737,
"created_by": "Auto generated by system",
"currency_code": "USD",
"id": "1",
"invoice_id": "__demo_inv__1",
"object": "order",
"status": "queued"
}
}
URL Format
GET
https://{site}.chargebee.com/api/v1/orders/{order-id}
always returned required
Resource object representing order
Sample admin console URL
https://{site}.chargebee.com/admin-console/orders/123x
This API is used to retrieve a list of all the available orders.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"list": [
{
"order": {
"created_at": 1517506735,
"created_by": "Auto generated by system",
"currency_code": "USD",
"id": "1",
"invoice_id": "__demo_inv__1",
"object": "order",
"status": "queued"
}
},
{..}
]
}
URL Format
GET
https://{site}.chargebee.com/api/v1/orders
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset
to the value of next_offset
obtained in the previous iteration of the API call.
always returned required
Resource object representing order
always returned optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/orders/123x
Retrieves the orders corresponding to an invoice, with the latest ones on top.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"list": [
{
"order": {
"created_at": 1517679534,
"created_by": "full_access_key_v1",
"id": "__test__5SK0bLNFRFuCC7aK4",
"invoice_id": "__demo_inv__2",
"object": "order",
"status": "new",
"status_update_at": 1517679534
}
},
{..}
]
}
URL Format
GET
https://{site}.chargebee.com/api/v1/invoices/{invoice-id}/orders
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset
to the value of next_offset
obtained in the previous iteration of the API call.
always returned required
Resource object representing order
always returned optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/orders/123x