orders

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).

post/provision/

Request

  • Base URL: https://api.agentpaid.io/api/v2
  • URL: https://api.agentpaid.io/api/v2/provision/
  • Auth: HTTP bearer

Headers

idempotency-keystring required

Request body

Response

200

status'created' | 'updated' required

Mirrors order.provisionStatus. created (HTTP 201): the order was created; updated (HTTP 200): an existing draft order with the same externalId was updated

createdAtstring required

Changes

No recorded changes to this operation across all 1 revision of this API.