Order
Use this resource to add one or more new order products and custom object records to an existing order or to retrieve data for a specific order.
You can only PATCH one order at a time.
If available, GET method retrieves the orders’ child order products and custom objects under the order or order products.
URI
Where API_VERSION and ORDER_ID are variables.
For retrieving filtered data:
Where API_VERSION, ORDER_ID, FIELD_NAME and VALUE are variables.
Available since release
30.0
Formats
JSON
HTTP methods
POST
| Property | Type | Description | Since Version |
|---|---|---|---|
attributes | Attributes | Type and URL of the order. | 30.0 |
OrderItems | Order Products | Child order products of the new order. | 30.0 |
CUSTOM_OBJECT__r | Custom Object | Child custom object records of the new order. | 30.0 |
| Property | Type | Description | Since Version |
|---|---|---|---|
type | String | Format of the resource. | 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 |
orderId | String | Unique record identifier for the parent order. | 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 |
-
You can use parameters for all standard and custom fields on contracts, orders, order products, and any custom objects directly related to these objects.
-
The parameters must be fully qualified. For example:
OBJECT_NAME.RELATIONSHIP_NAME.FIELD_NAME=VALUE.- Object name must be all lower-case.
- Relationship name must match what is defined on the object and is case-sensitive.
- Field name isn’t case sensitive.
- If the value is a string, it must be encased in single quotation marks. If the value is a number, it must not be encased. If the value is a date, it should be in the
YYYY-MM-DDformat.
-
You can use multiple parameter fields, separated by ”&”, to make more detailed filters. For example:
Where
CONTRACT_IDis a variable.
The following aren’t supported.
- Arrays of values. For example:
order.orderItems.effectiveDate=2013–01–01,2013–01–02. - Operators:
>,>=,<and<= - The
ORcondition
| Parameters | Description |
|---|---|
order | The object name of the record being filtered. In this resource, this is always order. |
orderItems | The relationship name of the field that the order’s data will be filtered by. In this resource, this is always orderItems. |
| field name | The field whose value to filter by. For example, if you want to only retrieve order products with a certain start date, the field name is effectivedate. |
| value | The value to filter by. For example, if you want to only retrieve order products that started on January 1, 2013, the value is 2013–01–01. |
| Property | Type | Description |
|---|---|---|
totalSize | Number | Total number of records listed. |
records | Records[] | Attributes and IDs of the new records. |
| Property | Type | Description |
|---|---|---|
attributes | Attributes | Type and URL for the record. |
Id | String | Unique record identifier. |
| Property | Type | Description |
|---|---|---|
type | String | Format of the resource. |
url | URI | Resource URL. |