Create Contract-based Orders

With this resource, you can create a new contract with orders and order products, as well as custom object records on the contract or order level.

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 contract.30.0
AccountIdStringUnique record identifier for the parent account.30.0
StatusStringStatus of the contract.30.0
OrdersOrders[]Child orders of the new contract.30.0
CUSTOM_OBJECT__rCustom Objects[]Child custom object records of the new contract.30.0
PropertyTypeDescriptionSince Version
typeStringFormat of the resource.30.0
PropertyTypeDescriptionSince Version
attributesAttributesType and URL of the new order record.30.0
StatusStringStatus of the order.30.0
Pricebook2IdStringUnique record identifier for the associated price book.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
attributesAttributesType and URL of the custom object record.30.0
IdStringUnique record identifier.30.0
PropertyTypeDescriptionSince Version
attributesAttributesType and URL of the order product record.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

None

PropertyTypeDescription
totalSizeNumberTotal number of records added.
doneBooleanWhen true, the operation was successful.
recordsRecords[]Attributes and IDs of records.
PropertyTypeDescription
attributesAttributesType and URL for the new record.
IdStringUnique identifier for the new record.
PropertyTypeDescription
typeStringFormat of the resource.
urlStringResource URL.

See Add a Contract and Orders to an Existing Account.

You can only create one contract at a time. You can’t POST new orders onto an existing contract. For that, see the Contract-based Orders resource.