Create Order

Generates an order record in B2B Edition after a Company user places an order. This occurs automatically; however, you can populate extra information on a B2B order by using a [webhook](/developer/docs/integrations/webhooks) that first listens for BigCommerce order creation and then calls the Create an Order endpoint. The request must be made within 10 seconds of an order's creation for it to be successful. Note that this **does not** create a new order in your store. Use the [Orders V2 API](/developer/api-reference/rest/admin/management/orders) to add new orders via the API. Equivalent Storefront GraphQL API Mutation: `createOrder`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).

Authentication

AuthorizationBearer
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section[...]

Request

This endpoint expects an object.
orderIdintegerRequired
The BigCommerce order ID.
poNumberstringOptional

The order’s Purchase Order (PO), if used.

isSaveOrderCommentstringOptionalDefaults to 0

Indicates whether the order comment is saved, if one exists.

0 indicates that the order comment is saved, while 1 indicates that it is not saved.

extraFieldsobjectOptional

Response

OK
codeinteger
HTTP Response Code
messagestringDefaults to SUCCESS
Response message
datalist of objects

Errors

400
Bad Request Error