{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buyingmesh-com/json-schema/buyingmesh-com-order-schema.json",
  "title": "Order",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buyingmesh-com-openapi.yaml#/components/schemas/Order",
  "type": "object",
  "required": [
    "id",
    "status",
    "events",
    "payment"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "confirmed",
        "shipped",
        "tracking_updated",
        "eta_updated",
        "delivered",
        "accepted",
        "released",
        "disputed",
        "cancelled"
      ]
    },
    "tracking": {
      "type": [
        "object",
        "null"
      ]
    },
    "supplier": {
      "type": "object",
      "properties": {
        "supplierId": {
          "type": [
            "string",
            "null"
          ]
        },
        "supplierName": {
          "type": [
            "string",
            "null"
          ]
        },
        "supplierSlug": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "supplierIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "agent": {
      "type": [
        "object",
        "null"
      ]
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "testMode": {
      "type": "boolean"
    },
    "eta": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "payment": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "gross": {
          "type": "number"
        },
        "platformFee": {
          "type": "number"
        },
        "sellerNet": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        }
      }
    }
  }
}