Order
Order information manage.
Get Orders
GET https://api-b2b.bigcommerce.com/api/v3/io/ordersRequest
Get all orders
Authentication
- authToken in header
Parameters
- companyId in query - integerCompany ID field
- limit in query with default of 10 - integerPagination limitExample: 15
- offset in query - integerPagination offsetExample: 5
- orderBy in query with default of DESC - stringOrder byExample: ASC
Allowed: DESC | ASC
- sortBy in query with default of updatedAt - stringThe response sorted by which fieldExample: updatedAt
Allowed: createdAt | updatedAt
- minModified in query - numberMinimum modified timestamp
- maxModified in query - numberMaximum modified timestamp
- minCreated in query - numberMinimum created timestamp
- maxCreated in query - numberMaximum created timestamp
- showExtra in query - booleanShow extra field in response
- bcOrderId in query - integerUnique order ID in BigCommerce storeExample: 1
- channelIds in query - arrayBigCommerce channel IDsType: array[number]
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/orders \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
codeinteger
dataarray[object]
without-extra-fields
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": [
{
"id": 1,
"createdAt": 1574999690,
"updatedAt": 1574999690,
"bcOrderId": 11,
"totalIncTax": 10.5,
"poNumber": "bj256",
"cartId": 1,
"companyId": 12,
"usdIncTax": 11,
"currencyCode": "USD",
"items": 4,
"status": "completed",
"customStatus": "my-completed",
"money": "{\"currency_location\": \"left\", \"currency_token\": \"$\", \"decimal_token\": \".\", \"decimal_places\": 2, \"thousands_token\": \",\"}",
"channelId": 1,
"channelName": "string"
}
]
}
with-extra-fields
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": [
{
"id": 1,
"createdAt": 1574999690,
"updatedAt": 1574999690,
"bcOrderId": 11,
"totalIncTax": 10.5,
"poNumber": "bj256",
"cartId": 1,
"companyId": 12,
"usdIncTax": 11,
"currencyCode": "USD",
"items": 4,
"status": "completed",
"customStatus": "my-completed",
"money": "{\"currency_location\": \"left\", \"currency_token\": \"$\", \"decimal_token\": \".\", \"decimal_places\": 2, \"thousands_token\": \",\"}",
"channelId": 1,
"channelName": "string",
"extraFields": [
{
"fieldName": "test field",
Create an Order
POST https://api-b2b.bigcommerce.com/api/v3/io/ordersRequest
Create an order
Authentication
- authToken in header
Body
object | application/json
Extra Field Values
bcOrderIdinteger
requiredOrder ID in BigcommercecustomerIdinteger
requiredCustomer ID of order creatorpoNumberstring
PO payment method message.extraFieldsarray[object]
example-1
{
"bcOrderId": 0,
"customerId": 0,
"poNumber": "bc156",
"extraFields": [
{
"fieldName": "test field",
"fieldValue": "test"
}
]
}
Response
OK
Body
object | application/json
Successful created
codeinteger
Response code of success request.Example: 200dataobject
Order entity
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"createdAt": 1574999690,
"updatedAt": 1574999690,
"bcOrderId": 11,
"totalIncTax": 10.5,
"poNumber": "bj256",
"cartId": 1,
"companyId": 12,
"usdIncTax": 11,
"currencyCode": "USD",
"items": 4,
"status": "completed",
"customStatus": "my-completed",
"money": "{\"currency_location\": \"left\", \"currency_token\": \"$\", \"decimal_token\": \".\", \"decimal_places\": 2, \"thousands_token\": \",\"}",
"id": 1,
"channelName": "msf1"
}
}
Get an Order
GET https://api-b2b.bigcommerce.com/api/v3/io/orders/{bcOrderId}Request
Get an order detail info
Authentication
- authToken in header
Parameters
- bcOrderId in path - integerrequiredUnique order ID in BigCommerce Store
example
curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/orders/[bcOrderId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
Order entityExample: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"createdAt": 1574999690,
"updatedAt": 1574999690,
"bcOrderId": 11,
"totalIncTax": 10.5,
"poNumber": "bj256",
"cartId": 1,
"companyId": 12,
"usdIncTax": 11,
"currencyCode": "USD",
"items": 4,
"status": "completed",
"customStatus": "my-completed",
"money": "{\"currency_location\": \"left\", \"currency_token\": \"$\", \"decimal_token\": \".\", \"decimal_places\": 2, \"thousands_token\": \",\"}",
"id": 1,
"extraFields": [
{
"fieldName": "test field",
"fieldValue": "test"
}
],
Update an Order
PUT https://api-b2b.bigcommerce.com/api/v3/io/orders/{bcOrderId}Request
Update an order. Update order's poNumnber and extraFields. You should send at least one field.
Authentication
- authToken in header
Parameters
- bcOrderId in path - integerrequiredUnique order ID in BigCommerce Store
Body
object | application/json
Extra Field Values
bcOrderIdinteger
requiredOrder ID in BigcommercecustomerIdinteger
requiredCustomer ID of order creatorpoNumberstring
PO payment method message.extraFieldsarray[object]
example-1
{
"bcOrderId": 0,
"customerId": 0,
"poNumber": "bc156",
"extraFields": [
{
"fieldName": "test field",
"fieldValue": "test"
}
]
}
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
Order entity
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"createdAt": 1574999690,
"updatedAt": 1574999690,
"bcOrderId": 11,
"totalIncTax": 10.5,
"poNumber": "bj256",
"cartId": 1,
"companyId": 12,
"usdIncTax": 11,
"currencyCode": "USD",
"items": 4,
"status": "completed",
"customStatus": "my-completed",
"money": "{\"currency_location\": \"left\", \"currency_token\": \"$\", \"decimal_token\": \".\", \"decimal_places\": 2, \"thousands_token\": \",\"}",
"id": 1,
"extraFields": [
{
"fieldName": "test field",
"fieldValue": "test"
}
]
}
Update Orders Company Attribute
PUT https://api-b2b.bigcommerce.com/api/v3/io/customers/{customerId}/orders/companyRequest
Update the orders belonging to a B3 company to another B3 company. Convert orders from the user's former BigCommerce group into the user's present BigCommerce group.
Authentication
- authToken in header
Parameters
- customerId in path - integerrequiredBigCommerce customer ID.
Body
object | application/json
bcGroupIdinteger
requiredUser's former group ID in Bigcommerce.
example
{
"bcGroupId": 0
}
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"total": 10
}
}
Get Order Products
GET https://api-b2b.bigcommerce.com/api/v3/io/orders/{bcOrderId}/productsRequest
Get order's product detail.
Authentication
- authToken in header
Parameters
- bcOrderId in path - integerrequiredUnique order ID in BigCommerce Store
example
curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/orders/[bcOrderId]/products' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[object]
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": [
{
"id": 1,
"createdAt": 1574999690,
"updatedAt": 1574999690,
"productName": "LGM Spicy Chili Crisp",
"variantSKU": "7.41 Ounce (Pack of 12)",
"variantId": 12,
"options": "[{\"id\": 715, \"option_id\": 41, \"order_product_id\": 670, \"product_option_id\": 121, \"display_name\": \"Gauge\", \"display_value\": \"12\", \"value\": \"123\", \"type\": \"Multiple choice\", \"name\": \"Gauge1576218034-477\", \"display_style\": \"Dropdown\"}, {\"id\": 716, \"option_id\": 42, \"order_product_id\": 670, \"product_option_id\": 122, \"display_name\": \"Leg 1 (inches)\", \"display_value\": \"5\", \"value\": \"5\", \"type\": \"Text field\", \"name\": \"Leg-1-(inches)1576218034-477\", \"display_style\": \"\"}]",
Update Customer BigCommerce Orders
PUT https://api-b2b.bigcommerce.com/api/v3/io/customers/{customerId}/orders/b2bRequest
Add Company identifier for BigCommerce Customer Individual Orders, which can be used to convert BigCommerce Customer Individual Orders to Company-level Orders.
Authentication
- authToken in header
Parameters
- customerId in path - integerrequiredBigCommerce customer ID.
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataobject
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"total": 11
}
}
Get Order Extra Field Configs
GET https://api-b2b.bigcommerce.com/api/v3/io/orders/extra-fieldsRequest
Get order extra field configs
Authentication
- authToken in header
Parameters
- offset in query - integerPagination offset default: 0
- limit in query with default of 10 - integerPagination limit default: 10
example
curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/orders/extra-fields \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[object]
example
{
"code": 200,
"meta": {
"pagination": {
"limit": 10,
"offset": 0,
"totalCount": 1
}
},
"data": [
{
"id": 0,
"uuid": "string",
"fieldName": "string",
"fieldType": 0,
"isRequired": true,
"isUnique": true,
"visibleToEnduser": true,
"configType": 1,
"defaultValue": "string",
"maximumLength": "string",
"numberOfRows": "string",
"maximumValue": "string",
"listOfValue": [
"string"
]
}
]
}
See something you can improve? Edit this file on GitHub
Did you find what you were looking for?