{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apiosk-com/json-schema/apiosk-com-external-purchase-schema.json",
  "title": "ExternalPurchase",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apiosk-com-openapi.json#/components/schemas/ExternalPurchase",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "purchase_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "requires_approval",
        "running",
        "succeeded",
        "failed"
      ]
    },
    "source": {
      "type": "object"
    },
    "quote": {
      "type": "object"
    },
    "result": {},
    "result_present": {
      "type": "boolean"
    },
    "result_truncated": {
      "type": "boolean"
    },
    "billing": {
      "type": [
        "object",
        "null"
      ]
    },
    "error": {
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "status",
    "result",
    "result_present",
    "billing"
  ]
}