Schema

Job

The processing of a firm order: queued by createOrder, made by the order worker five minutes later (at once for a test order), retried with a backoff of up to 30 minutes; above 100 cards it waits for the team's decision.

Fields

  • idstring (uuid)
  • typestring
  • statusstring: pending, running, succeeded, failed
  • stagestring: queued, held_for_review, processing, manual_processing, done, failed
    Why the job has its status: held_for_review for an order above 100 cards waiting for the team, manual_processing when the team makes it by hand
  • orderIdstring (uuid)
  • locationstring
    Where to poll this job
  • retryAfterinteger, nullable
    Seconds before polling again; null once finished
  • createdAtstring (date-time)
  • updatedAtstring (date-time)
  • resultobject, nullable
    Once succeeded: the order, to read with getOrder
  • result.orderIdstring (uuid)
  • result.orderStatusstring, nullable
  • result.locationstring
  • errorobject, nullable
    Once failed
  • error.codestring
  • error.messagestring
Example
{
  "id": "0b6f1c9e-3c1a-4e57-9f5e-6a2d8f1b7c40",
  "type": "order.treatment",
  "status": "pending",
  "stage": "queued",
  "orderId": "7b1e2a4c-0000-4000-8000-000000000000",
  "location": "/v2/accounts/@me/jobs/0b6f1c9e-3c1a-4e57-9f5e-6a2d8f1b7c40",
  "retryAfter": 300,
  "result": {
    "orderStatus": "validated",
    "location": "/v2/accounts/@me/orders/7b1e2a4c-0000-4000-8000-000000000000"
  },
  "error": {
    "code": "ORDER_PROCESSING_FAILED"
  }
}