Upsert an order with its customer and products
Creates or updates a customer, an optional contact, the products on the order, and the order with its lines, in one call. Each record is matched by its externalId, so you can send the same deal again after it changes in your CRM. Returns 201 Created when the order is new, and 200 OK when an existing draft order with the same externalId was updated. Treat both as success. Re-provisioning an order that is already active returns 409 ORDER_ALREADY_ACTIVE; change an active order through the amendments API instead. Amounts are whole numbers in minor currency units (cents).
Authentication
Headers
Request
The order, matched by externalId. Its lines are set from this payload each time you provision it. A draft order can have no lines; an active order needs at least one.
Response headers
true when this is the stored response of an earlier request with the same idempotency key. Absent otherwise.
Response
Mirrors order.provisionStatus. created (HTTP 201): the order was created; updated (HTTP 200): an existing draft order with the same externalId was updated