Create Order

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

Where API_VERSION is a variable.

Available since release

30.0

Formats

JSON

HTTP methods

POST

PropertyTypeDescriptionSince Version
attributesAttributesType and URL of the new order.30.0
OrderItemsOrder Products[]Child order products of the new order.30.0
CUSTOM_OBJECT__rCustom Objects[]Child custom object records of the new order.30.0
PropertyTypeDescriptionSince Version
typeStringFormat of the resource.30.0
urlStringResource URL.30.0
PropertyTypeDescriptionSince Version
attributesAttributesType and URL of the order product.30.0
PricebookEntryIdStringUnique record identifier for the associated price book entry.30.0
quantityNumberNumber of units of the order product.30.0
UnitPriceCurrencyThe unit price for the order product.30.0
IdStringUnique order product identifier.30.0
PropertyTypeDescriptionSince Version
attributesAttributesType and URL of the custom object.30.0
IdStringUnique custom object identifier.30.0

None

PropertyTypeDescription
totalSizeNumberTotal number of records retrieved.
doneBooleanWhen true, the operation was successful.
recordsRecords[]Attributes and ID of contract record.
PropertyTypeDescription
attributesAttributesType and URL of the record.
IdStringUnique contract identifier.
PropertyTypeDescription
typeStringFormat of the resource.
urlStringResource URL.

See Add an Order to an Existing Account.