{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/kontaktio/main/json-schema/kontaktio-order-management-response-schema.json",
  "title": "OrderManagementResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kontaktio-order-api-openapi.yml#/components/schemas/OrderManagementResponse",
  "type": "object",
  "properties": {
    "orders": {
      "type": "object",
      "description": "Per-order claiming/releasing status",
      "properties": {
        "each orderId from request": {
          "type": "object",
          "description": "Claiming/releasing status for this order ID",
          "properties": {
            "status": {
              "type": "string",
              "description": "Successful statuses:\n\n\n\nCLAIMED\n\nRELEASED\n\n\n\nFailure statuses:\n\nCANNOT_CLAIM or CANNOT_RELEASE - received a non-200 response from DCC, except...\n\nNOT_FOUND - received a 404 response from DCC\n\nUNCLASSIFIED_COMMUNICATION_ERROR - unknown error when communicating with DCC.\n\nUNCLASSIFIED_SCHEDULING_ERROR - order claimed/released, but can not schedule a job for adding/removing order devices.",
              "enum": [
                "CLAIMED",
                "RELEASED",
                "CANNOT_CLAIM",
                "CANNOT_RELEASE",
                "NOT_FOUND",
                "UNCLASSIFIED_COMMUNICATION_ERROR",
                "UNCLASSIFIED_SCHEDULING_ERROR"
              ]
            },
            "details": {
              "type": "string",
              "description": "Usually error details, e.g. '503 DCC unavailable'"
            },
            "totalDevices": {
              "type": "number",
              "description": "Number of devices in this order"
            }
          }
        }
      }
    }
  }
}