BigCommerce
Management API
Checkout Consignments

Checkouts

Add Consignment to Checkout

POST /checkouts/{checkoutId}/consignments

Request

Adds a new consignment to a checkout.

Please note that this API endpoint is not concurrent safe, meaning multiple simultaneous requests could result in unexpected and inconsistent results.

For more information about working with consignments, see Checkout consignment.

Though the only required address properties to create a consignment are email and country_code, to successfully create an order the address requires the following properties:

  • first_name
  • last_name
  • address1
  • city
  • country
  • email
  • country_code

Depending on the country, the following address properties may also be required:

  • postal_code
  • state_or_province

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • checkoutId in path - string - required

    ID of the checkout; the same as the cart ID.

  • Accept in header with default of application/json - string - required

    The MIME type of the response body.

  • Content-Type in header with default of application/json - string - required

    The MIME type of the request body.

  • include in query - string
    Allowed values: consignments.available_shipping_options

Body

array | application/json
  • address
    object

  • line_items
    array[object]

  • pickup_option
    object

    Assigns a pickup consignment. Note: You cannot assign a shipping method with a pickup consignment.

Shipping Consignment

Pickup Consignment

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

Update Checkout Consignment

PUT /checkouts/{checkoutId}/consignments/{consignmentId}

Request

Updates an existing consignment. The address, line item IDs, and shipping option ID can be updated using this endpoint.

Use a separate PUT request to update the shipping option IDs if you also want to update the address and line item IDs.

To add new shipping options, complete the following steps:

  • Use the Add Consignment to Checkout endpoint to add a new [consignment] to a checkout.
  • Assign a shipping option to the new consignment by sending a PUT request to update the consignment's shipping_option_id with a returned value from data.consignments[N].available_shipping_option[N].id obtained in the Add Consignment to Checkout endpoint.

To update an existing address and line item IDs, assign a new address and line item IDs by sending a PUT request.

Please note that this API endpoint is not concurrent safe, meaning multiple simultaneous requests could result in unexpected and inconsistent results.

  1. Assign a shipping option to the new consignment by sending a PUT request to update the consignment's shipping_option_id with a returned value from data.consignments[N].available_shipping_option[N].id obtained in Step One.

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • consignmentId in path - string - required
  • Content-Type in header with default of application/json - string - required

    The MIME type of the request body.

  • include in query - string

    Include to get available shipping options.

    Allowed values: consignments.available_shipping_options

Body

object | application/json

One or more of these three fields are mandatory. address and line_items can be updated in one request. shipping_option_id has to be updated in a separate request because changing the address or line items can invalidate the previously available shipping options.

  • address
    object

  • line_items
    array[object]

  • shipping_option_id
    string

  • pickup_option
    object

example

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

Delete Checkout Consignment

DELETE /checkouts/{checkoutId}/consignments/{consignmentId}

Request

Removes an existing consignment from a checkout.

Removing the last consignment will remove the cart from the customer it is assigned to. Create a new redirect URL for the customer so they can access the cart again.

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • checkoutId in path - string - required

    ID of the checkout; the same as the cart ID.

  • Accept in header with default of application/json - string - required

    The MIME type of the response body.

  • consignmentId in path - string - required

example

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

Did you find what you were looking for?