{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/themassprint-com/json-schema/themassprint-com-order-schema.json",
  "title": "Order",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/themassprint-com-openapi.json#/components/schemas/Order",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting_payment",
        "confirmed",
        "printing",
        "shipped",
        "delivered",
        "expired",
        "canceled",
        "refunded"
      ]
    },
    "sku": {
      "type": "string"
    },
    "format": {
      "type": "string",
      "enum": [
        "paperback",
        "hardcover",
        "sticker-a3",
        "greeting-card-a5"
      ]
    },
    "client_reference": {
      "type": "string",
      "description": "The caller-owned idempotency key this order was created with, echoed back."
    },
    "copies": {
      "type": "integer"
    },
    "page_count": {
      "type": "integer"
    },
    "amount": {
      "type": "object",
      "properties": {
        "total_paise": {
          "type": "integer"
        },
        "display": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        }
      }
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "payment_mode": {
      "type": "string",
      "enum": [
        "payment_link",
        "invoiced"
      ]
    },
    "payment_url": {
      "type": "string",
      "description": "Present while awaiting_payment: the Razorpay link to pay."
    },
    "payment_expires_at": {
      "type": "string"
    },
    "paid_at": {
      "type": "string"
    },
    "tracking": {
      "type": "object",
      "properties": {
        "carrier": {
          "type": "string"
        },
        "awb": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "description": "Clickable tracking link, when the shipper provided one."
        }
      }
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  }
}