Create Order (POST)

Use the Create Order API to create an order from a cart ID or context ID. When you provide both the inputs, the cart ID takes precedence. This API runs in synchronous mode to support only one order. The API takes a cart ID or context ID as a request and creates an order from a webcart as per the requested resource.
Resource
1/connect/consumer/checkout
Example URI
1https://yourInstance.salesforce.com/services/data/67.0/connect/consumer/checkout
Available version
66.0
HTTP methods
POST
Request parameters for POST
Parameter Name Type Description Required or Optional Available Version
cartID String Id of the cart. Required 66.0
contextID String Id of the context. Required 66.0

Both cartId and contextId are supported. At least one of these inputs must be provided. If both are supplied, cartId will take precedence.

Note

Request body for POST
1{
2"inputs": [
3{
4"cartId": "0a6xx000000039BAAQ",
5"contextId" : "0000000c18tc17g001317718435006600be2539f29f441b2942012a67b8be0c4"
6}
7]
8}
Response body for POST
1[
2    {
3  "errors": [],
4  "orderId": "801xx000003GlM3AAK"
5}