Place Order REST API Developer Guide
Requirements and Limitations
Authorization Through External Client Apps or Connected Apps and OAuth 2.0
Create Contract-based Orders
Contract-based Orders
Create Order
Order
Previous Versions
With this resource, you can create a new order with order products and custom objects.
If you don’t want to add the order to a contract, you can add it directly to an account. You can only create one new order per call. The request body must have either an account or a contract as its parent record, and it must have a reference to a price book.
URI
1/services/data/API_VERSION/commerce/sale/orderWhere API_VERSION is a variable.
Available since release
30.0
Formats
JSON
HTTP methods
POST
| Property | Type | Description | Since Version |
|---|---|---|---|
attributes | Attributes | Type and URL of the new order. | 30.0 |
OrderItems | Order Products[] | Child order products of the new order. | 30.0 |
CUSTOM_OBJECT__r | Custom Objects[] | Child custom object records of the new order. | 30.0 |
| Property | Type | Description | Since Version |
|---|---|---|---|
type | String | Format of the resource. | 30.0 |
url | String | Resource URL. | 30.0 |
| Property | Type | Description | Since Version |
|---|---|---|---|
attributes | Attributes | Type and URL of the order product. | 30.0 |
PricebookEntryId | String | Unique record identifier for the associated price book entry. | 30.0 |
quantity | Number | Number of units of the order product. | 30.0 |
UnitPrice | Currency | The unit price for the order product. | 30.0 |
Id | String | Unique order product identifier. | 30.0 |
| Property | Type | Description | Since Version |
|---|---|---|---|
attributes | Attributes | Type and URL of the custom object. | 30.0 |
Id | String | Unique custom object identifier. | 30.0 |
None
| Property | Type | Description |
|---|---|---|
totalSize | Number | Total number of records retrieved. |
done | Boolean | When true, the operation was successful. |
records | Records[] | Attributes and ID of contract record. |
| Property | Type | Description |
|---|---|---|
attributes | Attributes | Type and URL of the record. |
Id | String | Unique contract identifier. |
| Property | Type | Description |
|---|---|---|
type | String | Format of the resource. |
url | String | Resource URL. |
See Add an Order to an Existing Account.