{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/premierletters-com/json-schema/premierletters-com-order-schema.json",
  "title": "Order",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/premierletters-com-openapi.json#/components/schemas/Order",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "description": "Order UUID; test_<uuid> for a test-mode key (nothing is created)"
    },
    "status": {
      "type": "string",
      "description": "paid, pending_payment, … or test"
    },
    "letter_count": {
      "type": "integer"
    },
    "total_cents": {
      "type": "integer"
    },
    "tracking_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "checkout_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "return_address": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "enum": [
            "request",
            "profile",
            "none"
          ],
          "description": "Which return address the envelope uses: the request, the account default, or none (acknowledged)."
        }
      }
    },
    "idempotent_replay": {
      "type": "boolean",
      "description": "Present (true) when this is the original order returned for a repeated idempotency key"
    },
    "test": {
      "type": "boolean",
      "description": "Present (true) for a test-mode key: validated and priced, nothing created or charged"
    },
    "skipped_recipients": {
      "type": "integer"
    }
  }
}