Server to Server Management APIs
Order

Order

Order information manage.

Get Orders

GET /orders

Request

Get all orders

Authentication

  • authToken in header

Parameters

  • companyId in query - integer
    Company ID field
  • limit in query with default of 10 - integer
    Pagination limit
    Example: 15
  • offset in query - integer
    Pagination offset
    Example: 5
  • orderBy in query with default of DESC - string
    Order by
    Example: ASC

    Allowed: DESC | ASC

  • sortBy in query with default of updatedAt - string
    The response sorted by which field
    Example: updatedAt

    Allowed: createdAt | updatedAt

  • minModified in query - number
    Minimum modified timestamp
  • maxModified in query - number
    Maximum modified timestamp
  • minCreated in query - number
    Minimum created timestamp
  • maxCreated in query - number
    Maximum created timestamp
  • showExtra in query - boolean
    Show extra field in response
  • bcOrderId in query - integer
    Unique order ID in BigCommerce store
    Example: 1
  • channelIds in query - array
    BigCommerce channel IDs
    Type: 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
  • code
    integer

  • meta
    object

  • data
    array[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 /orders

Request

Create an order

Authentication

  • authToken in header

Body

object | application/json
Extra Field Values
  • bcOrderId
    integer
    required

    Order ID in Bigcommerce
  • customerId
    integer
    required

    Customer ID of order creator
  • poNumber
    string

    PO payment method message.
  • extraFields
    array[object]

example-1

{
"bcOrderId": 0,
"customerId": 0,
"poNumber": "bc156",
"extraFields": [
{
"fieldName": "test field",
"fieldValue": "test"
}
]
}

Response

OK

Body

object | application/json
Successful created
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

  • data
    object

    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 /orders/{bcOrderId}

Request

Get an order detail info

Authentication

  • authToken in header

Parameters

  • bcOrderId in path - integer
    required
    Unique 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
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

  • data
    object

    Order entity
    Example: {"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 /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 - integer
    required
    Unique order ID in BigCommerce Store

Body

object | application/json
Extra Field Values
  • bcOrderId
    integer
    required

    Order ID in Bigcommerce
  • customerId
    integer
    required

    Customer ID of order creator
  • poNumber
    string

    PO payment method message.
  • extraFields
    array[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
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

  • data
    object

    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 /customers/{customerId}/orders/company

Request

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 - integer
    required
    BigCommerce customer ID.

Body

object | application/json
  • bcGroupId
    integer
    required

    User's former group ID in Bigcommerce.

example

{
"bcGroupId": 0
}

Response

OK

Body

object | application/json
Response for successful request
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

  • data
    object

example-1

{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"total": 10
}
}

Get Order Products

GET /orders/{bcOrderId}/products

Request

Get order's product detail.

Authentication

  • authToken in header

Parameters

  • bcOrderId in path - integer
    required
    Unique 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
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

  • data
    array[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 /customers/{customerId}/orders/b2b

Request

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 - integer
    required
    BigCommerce customer ID.

Response

OK

Body

object | application/json
Response for successful request
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

  • data
    object

example-1

{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": {
"total": 11
}
}

Get Order Extra Field Configs

GET /orders/extra-fields

Request

Get order extra field configs

Authentication

  • authToken in header

Parameters

  • offset in query - integer
    Pagination offset default: 0
  • limit in query with default of 10 - integer
    Pagination 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
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

    Used to response pagination information
    Example: {"pagination":{"limit":10,"offset":0,"totalCount":1}}
  • data
    array[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?