{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-order-schema.json",
  "title": "Order",
  "description": "Order status. Poll it — polling is the only status channel; the current provider sends no webhooks, so a stored callbackUrl receives nothing.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-orders-api-openapi.yml#/components/schemas/Order",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "SESSION_CREATED -> PROCESSING -> COMPLETED | FAILED | CANCELLED | EXPIRED"
    },
    "isBuyOrSell": {
      "type": "string",
      "enum": [
        "BUY",
        "SELL"
      ],
      "description": "Order direction"
    },
    "customerId": {
      "type": "string",
      "description": "Customer id the session was created with"
    },
    "ref": {
      "type": "string",
      "description": "Referral code if one was set"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO 8601 session creation time"
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO 8601 time of the last status update (static under the current provider — no webhook exists, so the order stays SESSION_CREATED; ADR-0050)"
    }
  },
  "required": [
    "status"
  ]
}