{
  "openapi": "3.1.0",
  "info": {
    "title": "StateSet Commerce API",
    "description": "REST API for the StateSet embedded commerce engine.",
    "contact": {
      "name": "StateSet",
      "url": "https://stateset.io"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    },
    "version": "1.0.4"
  },
  "paths": {
    "/api/v1/a2a/credit": {
      "get": {
        "tags": [
          "a2a"
        ],
        "summary": "`GET /api/v1/a2a/credit`",
        "operationId": "list_terms",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CreditTermsResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "a2a"
        ],
        "summary": "`POST /api/v1/a2a/credit`",
        "operationId": "create_terms",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCreditTermsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditTermsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/a2a/credit/{id}": {
      "get": {
        "tags": [
          "a2a"
        ],
        "summary": "`GET /api/v1/a2a/credit/:id`",
        "operationId": "get_terms",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credit terms ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditTermsResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/a2a/credit/{id}/charge": {
      "post": {
        "tags": [
          "a2a"
        ],
        "summary": "`POST /api/v1/a2a/credit/:id/charge`",
        "operationId": "charge_credit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credit terms ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAmountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditTermsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/a2a/credit/{id}/payment": {
      "post": {
        "tags": [
          "a2a"
        ],
        "summary": "`POST /api/v1/a2a/credit/:id/payment`",
        "operationId": "record_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credit terms ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreditAmountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditTermsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/a2a/messages": {
      "get": {
        "tags": [
          "a2a"
        ],
        "summary": "`GET /api/v1/a2a/messages`",
        "operationId": "list_messages",
        "parameters": [
          {
            "name": "to_agent_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MessageResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "a2a"
        ],
        "summary": "`POST /api/v1/a2a/messages`",
        "operationId": "send_message",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/a2a/messages/{id}/acknowledge": {
      "post": {
        "tags": [
          "a2a"
        ],
        "summary": "`POST /api/v1/a2a/messages/:id/acknowledge`",
        "operationId": "acknowledge_message",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Message ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Message acknowledged"
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/activity-logs": {
      "get": {
        "tags": [
          "activity_logs"
        ],
        "operationId": "activity_logs_list",
        "parameters": [
          {
            "name": "subject_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityLogListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "activity_logs"
        ],
        "operationId": "activity_logs_record",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordActivityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityLogResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/activity-logs/{id}": {
      "get": {
        "tags": [
          "activity_logs"
        ],
        "operationId": "activity_logs_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Activity log entry ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityLogResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/activity-logs/{subject_type}/{subject_id}": {
      "get": {
        "tags": [
          "activity_logs"
        ],
        "operationId": "activity_logs_history",
        "parameters": [
          {
            "name": "subject_type",
            "in": "path",
            "description": "Subject record type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject_id",
            "in": "path",
            "description": "Subject record ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ActivityLogResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/aging": {
      "get": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_aging",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApAgingResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/bills": {
      "get": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_list_bills",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `draft`, `pending`, `approved`, `partially_paid`, `paid`, `overdue`, `cancelled`, `disputed`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overdue_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApBillListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_create_bill",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApBillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApBillResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/bills/{id}": {
      "get": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_get_bill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bill ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApBillResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/bills/{id}/approve": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_approve_bill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bill ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApBillResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/bills/{id}/cancel": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_cancel_bill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bill ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApBillResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/bills/{id}/dispute": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_dispute_bill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bill ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApBillResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/bills/{id}/three-way-match": {
      "get": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_three_way_match_bill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bill ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tolerance_percent",
            "in": "query",
            "description": "Relative tolerance percentage as a decimal string (e.g. `\"5\"` = 5%).\nDefaults to `0` (exact matching).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ThreeWayMatchResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/payment-runs": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_create_payment_run",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApPaymentRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApPaymentRunResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/payment-runs/{id}/approve": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_approve_payment_run",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment run ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovePaymentRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApPaymentRunResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/payment-runs/{id}/cancel": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_cancel_payment_run",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment run ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApPaymentRunResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/payment-runs/{id}/process": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_process_payment_run",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment run ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApPaymentRunResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/payments": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_create_payment",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Client-generated key; replaying it with an identical body returns the original response. Required by default on this endpoint.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApPaymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "428": {
            "description": "Idempotency-Key header required on this endpoint (configurable)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ap/payments/{id}/void": {
      "post": {
        "tags": [
          "accounts_payable"
        ],
        "operationId": "ap_void_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApPaymentResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/aging": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_aging_summary",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArAgingResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/aging/customers": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_aging_report",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overdue_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCustomerAgingListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/aging/customers/{customer_id}": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_customer_aging",
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCustomerAgingResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/collection-activities": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_list_collection_activities",
        "parameters": [
          {
            "name": "invoice_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activity_type",
            "in": "query",
            "description": "One of `dunning_letter_sent`, `phone_call`, `email`, `in_person_visit`,\n`promise_to_pay`, `payment_plan_created`, `sent_to_collections`,\n`write_off_approved`, `dispute_logged`, `dispute_resolved`, `note`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCollectionActivityListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_record_collection_activity",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArCollectionActivityRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCollectionActivityResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/credit-memos": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_list_credit_memos",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `open`, `partially_applied`, `fully_applied`, `voided`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCreditMemoListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_create_credit_memo",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArCreditMemoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCreditMemoResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/credit-memos/{id}/apply": {
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_apply_credit_memo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Credit memo ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyArCreditMemoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCreditMemoResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/customers/{customer_id}/statement": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_customer_statement",
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_start",
            "in": "query",
            "description": "RFC 3339 period start (defaults to 30 days ago).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_end",
            "in": "query",
            "description": "RFC 3339 period end (defaults to now).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_paid_invoices",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCustomerStatementResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/dunning/due": {
      "get": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_invoices_due_for_dunning",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArDunningInvoiceListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/invoices/{invoice_id}/dunning": {
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_send_dunning",
        "parameters": [
          {
            "name": "invoice_id",
            "in": "path",
            "description": "Invoice ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendArDunningRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArCollectionActivityResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/payment-applications": {
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_apply_payment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyArPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArPaymentApplicationListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/payment-applications/{id}/unapply": {
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_unapply_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment application ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/write-offs": {
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_create_write_off",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArWriteOffRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArWriteOffResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ar/write-offs/{id}/reverse": {
      "post": {
        "tags": [
          "accounts_receivable"
        ],
        "operationId": "ar_reverse_write_off",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Write-off ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArWriteOffResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/backorders": {
      "get": {
        "tags": [
          "backorders"
        ],
        "operationId": "backorders_list",
        "parameters": [
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `pending`, `partially_fulfilled`, `allocated`, `ready_to_ship`,\n`fulfilled`, `cancelled`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "description": "One of `low`, `normal`, `high`, `critical`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackorderListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "backorders"
        ],
        "operationId": "backorders_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBackorderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackorderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/backorders/{id}": {
      "get": {
        "tags": [
          "backorders"
        ],
        "operationId": "backorders_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Backorder ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackorderResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/backorders/{id}/cancel": {
      "post": {
        "tags": [
          "backorders"
        ],
        "operationId": "backorders_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Backorder ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackorderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/backorders/{id}/fulfill": {
      "post": {
        "tags": [
          "backorders"
        ],
        "operationId": "backorders_fulfill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Backorder ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfillBackorderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackorderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/boms": {
      "get": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_list",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBomRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/boms/{id}": {
      "get": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "BOM ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "BOM ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBomRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "BOM ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/boms/{id}/activate": {
      "post": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_activate",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "BOM ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/boms/{id}/components": {
      "get": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_list_components",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "BOM ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomComponentListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "bom"
        ],
        "operationId": "bom_add_component",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "BOM ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBomComponentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BomComponentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts": {
      "get": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_list",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `active`, `ready_for_payment`, `payment_pending`, `completed`,\n`abandoned`, `expired`, `cancelled`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}": {
      "get": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}/cancel": {
      "post": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}/complete": {
      "post": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResultResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}/items": {
      "post": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_add_item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCartItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}/items/{item_id}": {
      "put": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_update_item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id",
            "in": "path",
            "description": "Cart item ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCartItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_remove_item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id",
            "in": "path",
            "description": "Cart item ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}/payment": {
      "post": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_set_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCartPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/carts/{id}/shipping": {
      "post": {
        "tags": [
          "carts"
        ],
        "operationId": "carts_set_shipping",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cart ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCartShippingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/channels": {
      "get": {
        "tags": [
          "channels"
        ],
        "operationId": "channels_list",
        "parameters": [
          {
            "name": "channel_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "channels"
        ],
        "operationId": "channels_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{id}": {
      "get": {
        "tags": [
          "channels"
        ],
        "operationId": "channels_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "channels"
        ],
        "operationId": "channels_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelResponse"
                }
              }
            }
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "channels"
        ],
        "operationId": "channels_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{id}/lock": {
      "post": {
        "tags": [
          "channels"
        ],
        "operationId": "channels_set_lock",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Channel ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/companies": {
      "get": {
        "tags": [
          "companies"
        ],
        "operationId": "companies_list",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "companies"
        ],
        "operationId": "companies_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/{id}": {
      "get": {
        "tags": [
          "companies"
        ],
        "operationId": "companies_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "companies"
        ],
        "operationId": "companies_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/companies/{id}/contacts": {
      "get": {
        "tags": [
          "companies"
        ],
        "operationId": "companies_list_contacts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ContactResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "companies"
        ],
        "operationId": "companies_create_contact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Company ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/currencies/convert": {
      "post": {
        "tags": [
          "currency"
        ],
        "operationId": "convert_currency",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConvertCurrencyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/currencies/rates": {
      "get": {
        "tags": [
          "currency"
        ],
        "operationId": "list_rates",
        "parameters": [
          {
            "name": "base_currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeRateListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "currency"
        ],
        "operationId": "set_rate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetExchangeRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeRateResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers": {
      "get": {
        "tags": [
          "customers"
        ],
        "summary": "`GET /api/v1/customers`",
        "operationId": "list_customers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0). Ignored when `after` cursor is set.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "query",
            "description": "Filter by email address (exact match).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by customer status (active, inactive, deleted).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "Filter by tag.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accepts_marketing",
            "in": "query",
            "description": "Filter by marketing opt-in.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of customers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "customers"
        ],
        "summary": "`POST /api/v1/customers`",
        "operationId": "create_customer",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Customer created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers/{id}": {
      "get": {
        "tags": [
          "customers"
        ],
        "summary": "`GET /api/v1/customers/:id`",
        "operationId": "get_customer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Customer ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Customer details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "customers"
        ],
        "summary": "`DELETE /api/v1/customers/:id`",
        "operationId": "delete_customer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Customer ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Customer deleted"
          },
          "404": {
            "description": "Customer not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "customers"
        ],
        "summary": "`PATCH /api/v1/customers/:id`",
        "operationId": "update_customer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Customer ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Customer updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cycle-counts": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_list",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "location_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `draft`, `in_progress`, `completed`, `cancelled`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCycleCountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cycle-counts/{id}": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cycle count ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cycle-counts/{id}/cancel": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cycle count ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cycle-counts/{id}/complete": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cycle count ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cycle-counts/{id}/counts": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_record_counts",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cycle count ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordCycleCountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cycle-counts/{id}/start": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "cycle_count_start",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Cycle count ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CycleCountResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/edi-documents": {
      "get": {
        "tags": [
          "edi_documents"
        ],
        "operationId": "edi_documents_list",
        "parameters": [
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdiDocumentListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "edi_documents"
        ],
        "operationId": "edi_documents_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEdiDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdiDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/edi-documents/summary": {
      "get": {
        "tags": [
          "edi_documents"
        ],
        "operationId": "edi_documents_summary",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdiSummaryResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/edi-documents/{id}": {
      "get": {
        "tags": [
          "edi_documents"
        ],
        "operationId": "edi_documents_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "EDI document ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdiDocumentResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/edi-documents/{id}/status": {
      "post": {
        "tags": [
          "edi_documents"
        ],
        "operationId": "edi_documents_set_status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "EDI document ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EdiDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/events/stream": {
      "get": {
        "tags": [
          "events"
        ],
        "summary": "`GET /api/v1/events/stream` — SSE endpoint.",
        "description": "Each frame carries a monotonic `id`. Supports:\n\n- `?filter=order.*` — event type filtering (prefix match with wildcard).\n- `Last-Event-ID` request header (or `?last_event_id=`) — replays buffered\n  events with a greater id from a bounded server-side ring before resuming\n  the live stream. The header takes precedence over the query parameter.\n\nIf the requested resume id has already been evicted from the bounded buffer\n(a gap), a single `event: stream_reset` frame is emitted before whatever\nremains is replayed, signaling the client to reconcile state out-of-band.",
        "operationId": "event_stream",
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "description": "Optional event type filter (e.g. `order.*`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "last_event_id",
            "in": "query",
            "description": "Resume the stream after this event id. Equivalent to the standard SSE\n`Last-Event-ID` request header; the header takes precedence when both\nare supplied. Events with a greater id are replayed from the bounded\nserver-side buffer before the live stream resumes.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server-Sent Events stream of commerce events. Each frame carries a monotonic `id`; clients may resume after a drop via the `Last-Event-ID` header. On a replay gap a `stream_reset` frame is emitted first.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets": {
      "get": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_list",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFixedAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets/{id}": {
      "get": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFixedAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets/{id}/dispose": {
      "post": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_dispose",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisposeFixedAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets/{id}/place-in-service": {
      "post": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_place_in_service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlaceInServiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets/{id}/post-depreciation": {
      "post": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_post_depreciation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostDepreciationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets/{id}/schedule": {
      "get": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_get_schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepreciationScheduleResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_generate_schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepreciationScheduleResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fixed-assets/{id}/write-off": {
      "post": {
        "tags": [
          "fixed_assets"
        ],
        "operationId": "fixed_assets_write_off",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Fixed asset ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WriteOffFixedAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FixedAssetResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/packs": {
      "get": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_pack_list",
        "parameters": [
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assigned_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackTaskListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/packs/{id}/cartons": {
      "get": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_carton_list",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Pack task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartonListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_carton_add",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Pack task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddCartonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CartonResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/packs/{id}/complete": {
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_pack_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Pack task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackTaskResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/picks": {
      "get": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_pick_list",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "wave_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assigned_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickTaskListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/picks/{id}/assign": {
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_pick_assign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Pick task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickTaskResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/picks/{id}/complete": {
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_pick_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Pick task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePickRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickTaskResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/ships": {
      "get": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_ship_list",
        "parameters": [
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "carrier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipTaskListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/ships/{id}/complete": {
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_ship_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Ship task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteShipRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipTaskResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/waves": {
      "get": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_wave_list",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaveListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_wave_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWaveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaveResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/waves/{id}": {
      "get": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_wave_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Wave ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaveResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fulfillment/waves/{id}/release": {
      "post": {
        "tags": [
          "fulfillment"
        ],
        "operationId": "fulfillment_wave_release",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Wave ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaveResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gift-cards": {
      "get": {
        "tags": [
          "gift_cards"
        ],
        "summary": "`GET /api/v1/gift-cards`",
        "operationId": "list_gift_cards",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by gift card status (active, disabled, expired, depleted).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of gift cards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "gift_cards"
        ],
        "summary": "`POST /api/v1/gift-cards`",
        "operationId": "create_gift_card",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGiftCardRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Gift card created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gift-cards/{id}": {
      "get": {
        "tags": [
          "gift_cards"
        ],
        "summary": "`GET /api/v1/gift-cards/{id}`",
        "operationId": "get_gift_card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Gift card ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gift card details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardResponse"
                }
              }
            }
          },
          "404": {
            "description": "Gift card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gift-cards/{id}/charge": {
      "post": {
        "tags": [
          "gift_cards"
        ],
        "summary": "`POST /api/v1/gift-cards/{id}/charge`",
        "operationId": "charge_gift_card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Gift card ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftCardAmountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Gift card charged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardTransactionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Gift card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Invalid amount, inactive or expired card, or insufficient balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gift-cards/{id}/disable": {
      "post": {
        "tags": [
          "gift_cards"
        ],
        "summary": "`POST /api/v1/gift-cards/{id}/disable`",
        "operationId": "disable_gift_card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Gift card ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Gift card disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardResponse"
                }
              }
            }
          },
          "404": {
            "description": "Gift card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gift-cards/{id}/refund": {
      "post": {
        "tags": [
          "gift_cards"
        ],
        "summary": "`POST /api/v1/gift-cards/{id}/refund`",
        "operationId": "refund_gift_card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Gift card ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GiftCardAmountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Gift card refunded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiftCardTransactionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Gift card not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Invalid amount or disabled card",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/accounts": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_list_accounts",
        "parameters": [
          {
            "name": "account_type",
            "in": "query",
            "description": "One of `asset`, `liability`, `equity`, `revenue`, `expense`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `active`, `inactive`, `archived`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlAccountListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_create_account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGlAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlAccountResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/accounts/{id}": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_get_account",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "GL account ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlAccountResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/balance-sheet": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_balance_sheet",
        "parameters": [
          {
            "name": "as_of_date",
            "in": "query",
            "description": "Report date in `YYYY-MM-DD` format. Defaults to today (UTC).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceSheetResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/close-month": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_close_month",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseMonthRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseMonthResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/income-statement": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_income_statement",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "description": "Inclusive period start date in `YYYY-MM-DD` format.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Inclusive period end date in `YYYY-MM-DD` format.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncomeStatementResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/journal-entries": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_list_journal_entries",
        "parameters": [
          {
            "name": "period_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `draft`, `pending`, `posted`, `voided`, `reversed`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entry_type",
            "in": "query",
            "description": "One of `standard`, `adjusting`, `closing`, `reversing`, `opening`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "description": "Inclusive start date in `YYYY-MM-DD` format.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "description": "Inclusive end date in `YYYY-MM-DD` format.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_create_journal_entry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateJournalEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/journal-entries/{id}": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_get_journal_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Journal entry ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/journal-entries/{id}/post": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_post_journal_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Journal entry ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostJournalEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponse"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/journal-entries/{id}/reverse": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_reverse_journal_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Journal entry ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReverseJournalEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponse"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/journal-entries/{id}/void": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_void_journal_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Journal entry ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JournalEntryResponse"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/periods": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_list_periods",
        "parameters": [
          {
            "name": "fiscal_year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `future`, `open`, `closed`, `locked`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlPeriodListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_create_period",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGlPeriodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlPeriodResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/periods/{id}/close": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_close_period",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "GL period ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClosePeriodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlPeriodResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/periods/{id}/lock": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_lock_period",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "GL period ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockPeriodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlPeriodResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/periods/{id}/open": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_open_period",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "GL period ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlPeriodResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/periods/{id}/reopen": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_reopen_period",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "GL period ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GlPeriodResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/revalue": {
      "post": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_revalue",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevalueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevaluationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gl/trial-balance": {
      "get": {
        "tags": [
          "general_ledger"
        ],
        "operationId": "general_ledger_trial_balance",
        "parameters": [
          {
            "name": "as_of_date",
            "in": "query",
            "description": "Report date in `YYYY-MM-DD` format. Defaults to today (UTC).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrialBalanceResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbound-shipments": {
      "get": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInboundShipmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbound-shipments/{id}": {
      "get": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inbound shipment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbound-shipments/{id}/arrived": {
      "post": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_mark_arrived",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inbound shipment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbound-shipments/{id}/cancel": {
      "post": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inbound shipment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbound-shipments/{id}/in-transit": {
      "post": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_mark_in_transit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inbound shipment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inbound-shipments/{id}/receive": {
      "post": {
        "tags": [
          "inbound_shipments"
        ],
        "operationId": "inbound_shipments_receive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inbound shipment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboundShipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-field-mappings": {
      "get": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_list",
        "parameters": [
          {
            "name": "integration_account",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mapping_group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldMappingListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFieldMappingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldMappingResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-field-mappings/bulk": {
      "post": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_bulk_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkResultResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_bulk_delete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkResultResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-field-mappings/groups": {
      "get": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_groups",
        "parameters": [
          {
            "name": "integration_account",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-field-mappings/{id}": {
      "get": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Field mapping ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldMappingResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Field mapping ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFieldMappingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FieldMappingResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration_field_mappings"
        ],
        "operationId": "integration_field_mappings_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Field mapping ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/integration-mappings": {
      "get": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_list",
        "parameters": [
          {
            "name": "integration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mapping_group",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMappingListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIntegrationMappingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMappingResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-mappings/bulk": {
      "post": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_bulk_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkResultResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-mappings/resolve": {
      "get": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_resolve",
        "parameters": [
          {
            "name": "integration",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mapping_group",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/integration-mappings/{id}": {
      "get": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Integration mapping ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMappingResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Integration mapping ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIntegrationMappingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationMappingResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "integration_mappings"
        ],
        "operationId": "integration_mappings_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Integration mapping ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/inventory": {
      "get": {
        "tags": [
          "inventory"
        ],
        "summary": "`GET /api/v1/inventory`",
        "operationId": "list_inventory",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "sku",
            "in": "query",
            "description": "Filter by SKU (exact match).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "below_reorder_point",
            "in": "query",
            "description": "Filter by items below reorder point.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "description": "Filter by active status.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of inventory items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inventory/{sku}": {
      "get": {
        "tags": [
          "inventory"
        ],
        "summary": "`GET /api/v1/inventory/:sku`",
        "operationId": "get_stock",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "description": "Product SKU",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stock levels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryResponse"
                }
              }
            }
          },
          "404": {
            "description": "SKU not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inventory/{sku}/adjust": {
      "post": {
        "tags": [
          "inventory"
        ],
        "summary": "`POST /api/v1/inventory/:sku/adjust`",
        "operationId": "adjust_stock",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "description": "Product SKU",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryAdjustRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Stock adjusted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryResponse"
                }
              }
            }
          },
          "404": {
            "description": "SKU not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices": {
      "get": {
        "tags": [
          "invoices"
        ],
        "summary": "`GET /api/v1/invoices`",
        "operationId": "list_invoices",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filter by customer ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "description": "Filter by order ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by invoice status (draft, sent, viewed, paid, overdue, voided).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoice_type",
            "in": "query",
            "description": "Filter by invoice type (standard, `credit_note`, `pro_forma`, recurring).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "overdue_only",
            "in": "query",
            "description": "Filter overdue invoices only.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "description": "Invoices created on or after this date (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "description": "Invoices created on or before this date (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of invoices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "invoices"
        ],
        "summary": "`POST /api/v1/invoices`",
        "operationId": "create_invoice",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Invoice created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}": {
      "get": {
        "tags": [
          "invoices"
        ],
        "summary": "`GET /api/v1/invoices/:id`",
        "operationId": "get_invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/payments": {
      "post": {
        "tags": [
          "invoices"
        ],
        "summary": "`POST /api/v1/invoices/:id/payments`",
        "operationId": "record_invoice_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordInvoicePaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment recorded on invoice",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/invoices/{id}/send": {
      "post": {
        "tags": [
          "invoices"
        ],
        "summary": "`POST /api/v1/invoices/:id/send`",
        "operationId": "send_invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots": {
      "get": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_list",
        "parameters": [
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lot_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `active`, `quarantine`, `expired`, `consumed`, `on_hold`, `recalled`, `scrapped`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/expiring": {
      "get": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_expiring",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Window in days; defaults to 30.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/reservations/{reservation_id}/release": {
      "post": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_release_reservation",
        "parameters": [
          {
            "name": "reservation_id",
            "in": "path",
            "description": "Reservation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/{id}": {
      "get": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Lot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/{id}/consume": {
      "post": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_consume",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Lot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumeLotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotTransactionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/{id}/quarantine": {
      "post": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_quarantine",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Lot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuarantineLotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/{id}/release-quarantine": {
      "post": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_release_quarantine",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Lot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/lots/{id}/reserve": {
      "post": {
        "tags": [
          "lots"
        ],
        "operationId": "lots_reserve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Lot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveLotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LotReservationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/loyalty/accounts/{id}": {
      "get": {
        "tags": [
          "loyalty"
        ],
        "summary": "`GET /api/v1/loyalty/accounts/{id}`",
        "operationId": "get_account",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Loyalty account ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Loyalty account details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltyAccountResponse"
                }
              }
            }
          },
          "404": {
            "description": "Loyalty account not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/loyalty/enroll": {
      "post": {
        "tags": [
          "loyalty"
        ],
        "summary": "`POST /api/v1/loyalty/enroll`",
        "operationId": "enroll_customer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollCustomerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Customer enrolled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltyAccountResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Program or customer not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/loyalty/programs": {
      "get": {
        "tags": [
          "loyalty"
        ],
        "summary": "`GET /api/v1/loyalty/programs`",
        "operationId": "list_programs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of loyalty programs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltyProgramListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "loyalty"
        ],
        "summary": "`POST /api/v1/loyalty/programs`",
        "operationId": "create_program",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLoyaltyProgramRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Loyalty program created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltyProgramResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/negotiations": {
      "post": {
        "tags": [
          "negotiations"
        ],
        "summary": "`POST /api/v1/negotiations`",
        "operationId": "create_negotiation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNegotiationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NegotiationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/negotiations/{id}": {
      "get": {
        "tags": [
          "negotiations"
        ],
        "summary": "`GET /api/v1/negotiations/:id`",
        "operationId": "get_negotiation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Negotiation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NegotiationResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/negotiations/{id}/accept": {
      "post": {
        "tags": [
          "negotiations"
        ],
        "summary": "`POST /api/v1/negotiations/:id/accept`",
        "operationId": "accept_negotiation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Negotiation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NegotiationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/negotiations/{id}/counter-offer": {
      "post": {
        "tags": [
          "negotiations"
        ],
        "summary": "`POST /api/v1/negotiations/:id/counter-offer`",
        "operationId": "counter_offer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Negotiation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CounterOfferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NegotiationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/negotiations/{id}/reject": {
      "post": {
        "tags": [
          "negotiations"
        ],
        "summary": "`POST /api/v1/negotiations/:id/reject`",
        "operationId": "reject_negotiation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Negotiation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NegotiationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders": {
      "get": {
        "tags": [
          "orders"
        ],
        "summary": "`GET /api/v1/orders`",
        "operationId": "list_orders",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0). Ignored when `after` cursor is set.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filter by customer ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by order status (pending, confirmed, shipped, delivered, cancelled).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_status",
            "in": "query",
            "description": "Filter by payment status (pending, paid, `partially_refunded`, refunded).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fulfillment_status",
            "in": "query",
            "description": "Filter by fulfillment status (unfulfilled, partial, fulfilled).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "description": "Orders created on or after this date (RFC 3339, e.g. 2024-01-15T00:00:00Z).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "description": "Orders created on or before this date (RFC 3339, e.g. 2024-12-31T23:59:59Z).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of orders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "orders"
        ],
        "summary": "`POST /api/v1/orders`",
        "operationId": "create_order",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Order created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "428": {
            "description": "Idempotency-Key header required on this endpoint (configurable)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "tags": [
          "orders"
        ],
        "summary": "`GET /api/v1/orders/:id`",
        "operationId": "get_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Order ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}/cancel": {
      "patch": {
        "tags": [
          "orders"
        ],
        "summary": "`PATCH /api/v1/orders/:id/cancel`",
        "operationId": "cancel_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Order ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Order cannot be cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/orders/{id}/ship": {
      "patch": {
        "tags": [
          "orders"
        ],
        "summary": "`PATCH /api/v1/orders/:id/ship`",
        "description": "Without a body every remaining unit ships. With `lines`, only those units\nship and the order is `partially_shipped` until the last unit leaves.",
        "operationId": "ship_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Order ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Optional tracking number and per-line quantities",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ShipOrderRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order shipped (fully or partially)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Order cannot be shipped, or a line exceeds its unshipped quantity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-obligations": {
      "get": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "due_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentObligationListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentObligationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentObligationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-obligations/dashboard": {
      "get": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_dashboard",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-obligations/{id}": {
      "get": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentObligationResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-obligations/{id}/bills": {
      "post": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_link_bill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkBillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentObligationResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-obligations/{id}/payments": {
      "post": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_record_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentObligationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payment-obligations/{id}/status": {
      "post": {
        "tags": [
          "payment_obligations"
        ],
        "operationId": "payment_obligations_set_status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentObligationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payments": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "`GET /api/v1/payments`",
        "operationId": "list_payments",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "description": "Filter by order ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filter by customer ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by payment status (pending, authorized, captured, failed, refunded, `partially_refunded`, voided).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment_method",
            "in": "query",
            "description": "Filter by payment method (`credit_card`, `debit_card`, `bank_transfer`, etc.).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "processor",
            "in": "query",
            "description": "Filter by processor name.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_amount",
            "in": "query",
            "description": "Minimum payment amount.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_amount",
            "in": "query",
            "description": "Maximum payment amount.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "description": "Payments created on or after this date (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "description": "Payments created on or before this date (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of payments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "`POST /api/v1/payments`",
        "operationId": "create_payment",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Payment created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "428": {
            "description": "Idempotency-Key header required on this endpoint (configurable)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payments/{id}": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "`GET /api/v1/payments/:id`",
        "operationId": "get_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Payment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payments/{id}/complete": {
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "`POST /api/v1/payments/:id/complete`",
        "operationId": "complete_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment marked as completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Payment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/payments/{id}/refund": {
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "`POST /api/v1/payments/:id/refund`",
        "operationId": "create_refund",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate refund; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRefundRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Refund created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Payment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "428": {
            "description": "Idempotency-Key header required on this endpoint (configurable)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prepayments": {
      "get": {
        "tags": [
          "prepayments"
        ],
        "operationId": "prepayments_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepaymentListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "prepayments"
        ],
        "operationId": "prepayments_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePrepaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepaymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prepayments/{id}": {
      "get": {
        "tags": [
          "prepayments"
        ],
        "operationId": "prepayments_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prepayment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepaymentResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prepayments/{id}/apply": {
      "post": {
        "tags": [
          "prepayments"
        ],
        "operationId": "prepayments_apply",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prepayment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyPrepaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepaymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prepayments/{id}/refund": {
      "post": {
        "tags": [
          "prepayments"
        ],
        "operationId": "prepayments_refund",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Prepayment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepaymentResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/price-levels": {
      "get": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_list",
        "parameters": [
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceLevelListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePriceLevelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceLevelResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/price-levels/{id}": {
      "get": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price level ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceLevelResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price level ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePriceLevelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceLevelResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price level ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/price-levels/{id}/entries": {
      "get": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_list_entries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price level ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceLevelEntryResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "price_levels"
        ],
        "operationId": "price_levels_set_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price level ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceLevelEntryResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/price-schedules": {
      "get": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_list",
        "parameters": [
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceScheduleListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePriceScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceScheduleResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/price-schedules/resolve": {
      "get": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_resolve",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "at",
            "in": "query",
            "description": "RFC3339 instant; defaults to now when omitted.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/price-schedules/{id}": {
      "get": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price schedule ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceScheduleResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price schedule ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/price-schedules/{id}/entries": {
      "get": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_list_entries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price schedule ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceScheduleEntryResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "price_schedules"
        ],
        "operationId": "price_schedules_set_entry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Price schedule ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceScheduleEntryResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/print-jobs/{job_id}/complete": {
      "post": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_complete_job",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "description": "Print job ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/print-stations": {
      "get": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_list_stations",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StationResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_pair",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PairStationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PairResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/print-stations/{id}/jobs": {
      "get": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_list_jobs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Print station ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_enqueue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Print station ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/print-stations/{id}/jobs/next": {
      "post": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_next_job",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Print station ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            }
          },
          "204": {
            "description": "Queue empty"
          }
        }
      }
    },
    "/api/v1/print-stations/{id}/revoke": {
      "post": {
        "tags": [
          "print_stations"
        ],
        "operationId": "print_stations_revoke",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Print station ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StationResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/production-batches": {
      "get": {
        "tags": [
          "production_batches"
        ],
        "operationId": "production_batches_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionBatchListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "production_batches"
        ],
        "operationId": "production_batches_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductionBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionBatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/production-batches/{id}": {
      "get": {
        "tags": [
          "production_batches"
        ],
        "operationId": "production_batches_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Production batch ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionBatchResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "production_batches"
        ],
        "operationId": "production_batches_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Production batch ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/production-batches/{id}/work-orders": {
      "post": {
        "tags": [
          "production_batches"
        ],
        "operationId": "production_batches_add_work_orders",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Production batch ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkOrdersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductionBatchResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products": {
      "get": {
        "tags": [
          "products"
        ],
        "summary": "`GET /api/v1/products`",
        "operationId": "list_products",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0). Ignored when `after` cursor is set.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by product status (draft, active, archived).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_type",
            "in": "query",
            "description": "Filter by product type (simple, digital, bundle, subscription, service).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Full-text search across name and description.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Filter by category.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_price",
            "in": "query",
            "description": "Minimum price filter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "description": "Maximum price filter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "in_stock",
            "in": "query",
            "description": "Filter by stock availability.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of products",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "products"
        ],
        "summary": "`POST /api/v1/products`",
        "operationId": "create_product",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Product created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/products/{id}": {
      "get": {
        "tags": [
          "products"
        ],
        "summary": "`GET /api/v1/products/:id`",
        "operationId": "get_product",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Product ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            }
          },
          "404": {
            "description": "Product not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "products"
        ],
        "summary": "`DELETE /api/v1/products/:id`",
        "operationId": "delete_product",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Product ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Product deleted"
          },
          "404": {
            "description": "Product not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "products"
        ],
        "summary": "`PATCH /api/v1/products/:id`",
        "operationId": "update_product",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Product ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Product updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Product not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/promotions": {
      "get": {
        "tags": [
          "promotions"
        ],
        "operationId": "list_promotions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "promotions"
        ],
        "operationId": "create_promotion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePromotionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/promotions/{id}": {
      "get": {
        "tags": [
          "promotions"
        ],
        "operationId": "get_promotion",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/promotions/{id}/activate": {
      "patch": {
        "tags": [
          "promotions"
        ],
        "operationId": "activate_promotion",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/promotions/{id}/deactivate": {
      "patch": {
        "tags": [
          "promotions"
        ],
        "operationId": "deactivate_promotion",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders": {
      "get": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePurchaseOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}": {
      "get": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePurchaseOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/acknowledge": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_acknowledge",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcknowledgePurchaseOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/approve": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_approve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApprovePurchaseOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/cancel": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/complete": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/hold": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_hold",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/items": {
      "get": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_get_items",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderItemsResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/receive": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_receive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceivePurchaseOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/send": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purchase-orders/{id}/submit": {
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_submit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purchase order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purgatory/orders": {
      "get": {
        "tags": [
          "purgatory"
        ],
        "operationId": "purgatory_list",
        "parameters": [
          {
            "name": "channel_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_posted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurgatoryListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "purgatory"
        ],
        "operationId": "purgatory_ingest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurgatoryOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purgatory/orders/{id}": {
      "get": {
        "tags": [
          "purgatory"
        ],
        "operationId": "purgatory_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purgatory order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurgatoryOrderResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "purgatory"
        ],
        "operationId": "purgatory_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purgatory order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/purgatory/orders/{id}/lines/{line_id}": {
      "post": {
        "tags": [
          "purgatory"
        ],
        "operationId": "purgatory_map_line",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purgatory order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "line_id",
            "in": "path",
            "description": "Line item ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MapLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurgatoryOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/purgatory/orders/{id}/post": {
      "post": {
        "tags": [
          "purgatory"
        ],
        "operationId": "purgatory_post_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Purgatory order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurgatoryOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/put-aways": {
      "get": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_put_away_list",
        "parameters": [
          {
            "name": "receipt_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assigned_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutAwayListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_put_away_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePutAwayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutAwayResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/put-aways/{id}": {
      "get": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_put_away_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Put-away task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutAwayResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/put-aways/{id}/complete": {
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_put_away_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Put-away task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePutAwayRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PutAwayResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/holds": {
      "get": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_list_holds",
        "parameters": [
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lot_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "hold_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityHoldListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_create_hold",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQualityHoldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityHoldResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/holds/{id}": {
      "get": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_get_hold",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Quality hold ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityHoldResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/holds/{id}/release": {
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_release_hold",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Quality hold ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReleaseQualityHoldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualityHoldResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/inspections": {
      "get": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_list_inspections",
        "parameters": [
          {
            "name": "inspection_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reference_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_create_inspection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInspectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/inspections/{id}": {
      "get": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_get_inspection",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inspection ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/inspections/{id}/complete": {
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_complete_inspection",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inspection ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/inspections/{id}/results": {
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_record_inspection_result",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inspection ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordInspectionResultRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/inspections/{id}/start": {
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_start_inspection",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Inspection ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/ncrs": {
      "get": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_list_ncrs",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NcrListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_create_ncr",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNcrRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NcrResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/ncrs/{id}": {
      "get": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_get_ncr",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "NCR ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NcrResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/ncrs/{id}/close": {
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_close_ncr",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "NCR ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NcrResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/quality/ncrs/{id}/disposition": {
      "post": {
        "tags": [
          "quality"
        ],
        "operationId": "quality_disposition_ncr",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "NCR ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DispositionNcrRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NcrResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts": {
      "get": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_list",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "receipt_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReceiptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts/{id}": {
      "get": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Receipt ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts/{id}/cancel": {
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Receipt ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts/{id}/complete": {
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Receipt ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts/{id}/items": {
      "get": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_items",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Receipt ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptItemListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts/{id}/receive": {
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_receive_items",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Receipt ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveItemsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/receipts/{id}/start": {
      "post": {
        "tags": [
          "receiving"
        ],
        "operationId": "receiving_receipt_start",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Receipt ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/close-the-books": {
      "post": {
        "tags": [
          "reports"
        ],
        "operationId": "reports_close_the_books",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseBooksRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloseBooksResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/consumption": {
      "post": {
        "tags": [
          "reports"
        ],
        "operationId": "reports_consumption",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsumptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsumptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/inventory-aging": {
      "post": {
        "tags": [
          "reports"
        ],
        "operationId": "reports_inventory_aging",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryAgingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryAgingResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/sales-by-channel": {
      "post": {
        "tags": [
          "reports"
        ],
        "operationId": "reports_sales_by_channel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesByChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesByChannelResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reports/transaction-cogs": {
      "post": {
        "tags": [
          "reports"
        ],
        "operationId": "reports_transaction_cogs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCogsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionCogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/returns": {
      "get": {
        "tags": [
          "returns"
        ],
        "summary": "`GET /api/v1/returns`",
        "operationId": "list_returns",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0). Ignored when `after` cursor is set.",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "description": "Filter by order ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filter by customer ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by return status (requested, approved, rejected, received, refunded, closed).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "description": "Filter by return reason (defective, `wrong_item`, `not_as_described`, `changed_mind`, other).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from_date",
            "in": "query",
            "description": "Returns created on or after this date (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to_date",
            "in": "query",
            "description": "Returns created on or before this date (RFC 3339).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of returns",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "returns"
        ],
        "summary": "`POST /api/v1/returns`",
        "operationId": "create_return",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Return created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/returns/{id}": {
      "get": {
        "tags": [
          "returns"
        ],
        "summary": "`GET /api/v1/returns/:id`",
        "operationId": "get_return",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Return ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Return details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponse"
                }
              }
            }
          },
          "404": {
            "description": "Return not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/returns/{id}/approve": {
      "patch": {
        "tags": [
          "returns"
        ],
        "summary": "`PATCH /api/v1/returns/:id/approve`",
        "operationId": "approve_return",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Return ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Return approved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnResponse"
                }
              }
            }
          },
          "400": {
            "description": "Return cannot be approved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Return not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/returns/{id}/items/{item_id}/disposition": {
      "post": {
        "tags": [
          "returns"
        ],
        "summary": "`POST /api/v1/returns/:id/items/:item_id/disposition`",
        "operationId": "return_item_set_disposition",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Return ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id",
            "in": "path",
            "description": "Return item ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetReturnDispositionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Disposition recorded; stock effect applied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReturnItemResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid disposition / stock effect rejected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "Return not yet received",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Return not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "Item already dispositioned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/revenue-contracts": {
      "get": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_list_contracts",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueContractListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_create_contract",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRevenueContractRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueContractResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/revenue-contracts/{id}": {
      "get": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_get_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Revenue contract ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueContractResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_update_contract",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Revenue contract ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRevenueContractRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueContractResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/revenue-contracts/{id}/obligations": {
      "get": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_list_obligations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Revenue contract ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PerformanceObligationResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/revenue-obligations/{id}/recognize": {
      "post": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_recognize",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Performance obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecognizeRevenueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueScheduleResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/revenue-obligations/{id}/schedule": {
      "get": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_get_schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Performance obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueScheduleResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "revenue_recognition"
        ],
        "operationId": "revenue_recognition_generate_schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Performance obligation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevenueScheduleResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reviews": {
      "get": {
        "tags": [
          "reviews"
        ],
        "summary": "`GET /api/v1/reviews`",
        "operationId": "list_reviews",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "description": "Filter by product ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by review status (pending, approved, rejected).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_rating",
            "in": "query",
            "description": "Filter by minimum rating (1-5).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of reviews",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "reviews"
        ],
        "summary": "`POST /api/v1/reviews`",
        "operationId": "create_review",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Review created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reviews/{id}": {
      "get": {
        "tags": [
          "reviews"
        ],
        "summary": "`GET /api/v1/reviews/{id}`",
        "operationId": "get_review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Review ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Review details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReviewResponse"
                }
              }
            }
          },
          "404": {
            "description": "Review not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "reviews"
        ],
        "summary": "`DELETE /api/v1/reviews/{id}`",
        "operationId": "delete_review",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Review ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Review deleted"
          },
          "404": {
            "description": "Review not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/segments": {
      "get": {
        "tags": [
          "segments"
        ],
        "operationId": "list_segments",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "segments"
        ],
        "operationId": "create_segment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSegmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/segments/{id}": {
      "get": {
        "tags": [
          "segments"
        ],
        "operationId": "get_segment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Segment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "segments"
        ],
        "operationId": "delete_segment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Segment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/segments/{id}/members/{customer_id}": {
      "post": {
        "tags": [
          "segments"
        ],
        "operationId": "add_member",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Segment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Member added"
          }
        }
      },
      "delete": {
        "tags": [
          "segments"
        ],
        "operationId": "remove_member",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Segment ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "path",
            "description": "Customer ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Member removed"
          }
        }
      }
    },
    "/api/v1/serials": {
      "get": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_list",
        "parameters": [
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serial",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "One of `in_production`, `available`, `reserved`, `shipped`, `sold`, `returned`,\n`in_service`, `in_warranty`, `quarantined`, `scrapped`, `recalled`, `lost`, `transferred`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lot_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSerialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/serials/reservations/{reservation_id}/release": {
      "post": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_release_reservation",
        "parameters": [
          {
            "name": "reservation_id",
            "in": "path",
            "description": "Reservation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/serials/{id}": {
      "get": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Serial ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/serials/{id}/reserve": {
      "post": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_reserve",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Serial ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveSerialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialReservationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/serials/{id}/return": {
      "post": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_return",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Serial ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnSerialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/serials/{id}/scrap": {
      "post": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_scrap",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Serial ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScrapSerialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/serials/{id}/ship": {
      "post": {
        "tags": [
          "serials"
        ],
        "operationId": "serials_ship",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Serial ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipSerialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SerialResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/shipments": {
      "get": {
        "tags": [
          "shipments"
        ],
        "summary": "`GET /api/v1/shipments`",
        "operationId": "list_shipments",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "order_id",
            "in": "query",
            "description": "Filter by order ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by shipment status (pending, shipped, `in_transit`, delivered, returned, cancelled).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "carrier",
            "in": "query",
            "description": "Filter by carrier (usps, ups, fedex, dhl, etc.).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tracking_number",
            "in": "query",
            "description": "Filter by tracking number.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of shipments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "shipments"
        ],
        "summary": "`POST /api/v1/shipments`",
        "operationId": "create_shipment",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional client-generated key. Replaying the same key with an identical body returns the original response without creating a duplicate; reusing it with a different body returns 422. Scoped per tenant.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShipmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Shipment created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key reused with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/shipments/{id}": {
      "get": {
        "tags": [
          "shipments"
        ],
        "summary": "`GET /api/v1/shipments/:id`",
        "operationId": "get_shipment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Shipment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Shipment details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Shipment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/shipments/{id}/deliver": {
      "post": {
        "tags": [
          "shipments"
        ],
        "summary": "`POST /api/v1/shipments/:id/deliver`",
        "operationId": "deliver_shipment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Shipment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Shipment marked as delivered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentResponse"
                }
              }
            }
          },
          "404": {
            "description": "Shipment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/shipping-zones": {
      "get": {
        "tags": [
          "shipping"
        ],
        "operationId": "list_zones",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingZoneListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "shipping"
        ],
        "operationId": "create_zone",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShippingZoneRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingZoneResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/shipping-zones/{id}": {
      "get": {
        "tags": [
          "shipping"
        ],
        "operationId": "get_zone",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Shipping zone ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShippingZoneResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "shipping"
        ],
        "operationId": "delete_zone",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Shipping zone ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/stock-snapshots": {
      "get": {
        "tags": [
          "stock_snapshots"
        ],
        "operationId": "stock_snapshots_list",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "stock_snapshots"
        ],
        "operationId": "stock_snapshots_capture",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stock-snapshots/latest": {
      "get": {
        "tags": [
          "stock_snapshots"
        ],
        "operationId": "stock_snapshots_latest",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/stock-snapshots/{id}": {
      "get": {
        "tags": [
          "stock_snapshots"
        ],
        "operationId": "stock_snapshots_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stock snapshot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "stock_snapshots"
        ],
        "operationId": "stock_snapshots_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stock snapshot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/store-credits": {
      "get": {
        "tags": [
          "store_credits"
        ],
        "operationId": "list_store_credits",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreCreditListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "store_credits"
        ],
        "operationId": "create_store_credit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStoreCreditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreCreditResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/store-credits/{id}": {
      "get": {
        "tags": [
          "store_credits"
        ],
        "operationId": "get_store_credit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Store credit ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreCreditResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/store-credits/{id}/adjust": {
      "post": {
        "tags": [
          "store_credits"
        ],
        "operationId": "adjust_store_credit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Store credit ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustStoreCreditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreCreditResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/store-credits/{id}/apply": {
      "post": {
        "tags": [
          "store_credits"
        ],
        "summary": "`POST /api/v1/store-credits/{id}/apply` — debit a store credit (e.g.\nagainst an order). Rejected for non-positive amounts, non-active or\nexpired credits, and insufficient balance.",
        "operationId": "apply_store_credit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Store credit ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyStoreCreditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreCreditTransactionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "422": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/subscriptions": {
      "get": {
        "tags": [
          "subscriptions"
        ],
        "operationId": "list_subscriptions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "subscriptions"
        ],
        "operationId": "create_subscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/subscriptions/{id}": {
      "get": {
        "tags": [
          "subscriptions"
        ],
        "operationId": "get_subscription",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/subscriptions/{id}/cancel": {
      "patch": {
        "tags": [
          "subscriptions"
        ],
        "operationId": "cancel_subscription",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/subscriptions/{id}/pause": {
      "patch": {
        "tags": [
          "subscriptions"
        ],
        "operationId": "pause_subscription",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/subscriptions/{id}/resume": {
      "patch": {
        "tags": [
          "subscriptions"
        ],
        "operationId": "resume_subscription",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Subscription ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/supplier-skus": {
      "get": {
        "tags": [
          "supplier_skus"
        ],
        "operationId": "supplier_skus_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierSkuListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "supplier_skus"
        ],
        "operationId": "supplier_skus_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierSkuRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierSkuResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/supplier-skus/{id}": {
      "get": {
        "tags": [
          "supplier_skus"
        ],
        "operationId": "supplier_skus_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Supplier SKU ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierSkuResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "supplier_skus"
        ],
        "operationId": "supplier_skus_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Supplier SKU ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/suppliers": {
      "get": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_list_suppliers",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_create_supplier",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSupplierRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/suppliers/{id}": {
      "get": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_get_supplier",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Supplier ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_update_supplier",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Supplier ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSupplierRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupplierResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "purchase_orders"
        ],
        "operationId": "purchase_orders_delete_supplier",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Supplier ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/topology-snapshots": {
      "get": {
        "tags": [
          "topology_snapshots"
        ],
        "operationId": "topology_snapshots_list",
        "parameters": [
          {
            "name": "health",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "topology_snapshots"
        ],
        "operationId": "topology_snapshots_capture",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaptureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/topology-snapshots/latest": {
      "get": {
        "tags": [
          "topology_snapshots"
        ],
        "operationId": "topology_snapshots_latest",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/topology-snapshots/{id}": {
      "get": {
        "tags": [
          "topology_snapshots"
        ],
        "operationId": "topology_snapshots_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Snapshot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "topology_snapshots"
        ],
        "operationId": "topology_snapshots_delete_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Snapshot ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        }
      }
    },
    "/api/v1/transfer-orders": {
      "get": {
        "tags": [
          "transfer_orders"
        ],
        "operationId": "transfer_orders_list",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOrderListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "transfer_orders"
        ],
        "operationId": "transfer_orders_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransferOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfer-orders/{id}": {
      "get": {
        "tags": [
          "transfer_orders"
        ],
        "operationId": "transfer_orders_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Transfer order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOrderResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfer-orders/{id}/cancel": {
      "post": {
        "tags": [
          "transfer_orders"
        ],
        "operationId": "transfer_orders_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Transfer order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOrderResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfer-orders/{id}/receive": {
      "post": {
        "tags": [
          "transfer_orders"
        ],
        "operationId": "transfer_orders_receive",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Transfer order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiveLineRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOrderResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/transfer-orders/{id}/ship": {
      "post": {
        "tags": [
          "transfer_orders"
        ],
        "operationId": "transfer_orders_ship",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Transfer order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransferOrderResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/unit-classes": {
      "get": {
        "tags": [
          "units_of_measure"
        ],
        "operationId": "units_of_measure_list_classes",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnitClassResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "units_of_measure"
        ],
        "operationId": "units_of_measure_create_class",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUnitClassRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitClassResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/unit-conversion-rules": {
      "get": {
        "tags": [
          "units_of_measure"
        ],
        "operationId": "units_of_measure_list_rules",
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConversionRuleResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "units_of_measure"
        ],
        "operationId": "units_of_measure_create_rule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversionRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversionRuleResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/units-of-measure": {
      "get": {
        "tags": [
          "units_of_measure"
        ],
        "operationId": "units_of_measure_list_uoms",
        "parameters": [
          {
            "name": "class_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnitOfMeasureResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "units_of_measure"
        ],
        "operationId": "units_of_measure_create_uom",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUnitOfMeasureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitOfMeasureResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-credits": {
      "get": {
        "tags": [
          "vendor_credits"
        ],
        "operationId": "vendor_credits_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorCreditListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "vendor_credits"
        ],
        "operationId": "vendor_credits_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVendorCreditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorCreditResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-credits/{id}": {
      "get": {
        "tags": [
          "vendor_credits"
        ],
        "operationId": "vendor_credits_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor credit ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorCreditResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-credits/{id}/apply": {
      "post": {
        "tags": [
          "vendor_credits"
        ],
        "operationId": "vendor_credits_apply",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor credit ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyVendorCreditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorCreditResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-credits/{id}/cancel": {
      "post": {
        "tags": [
          "vendor_credits"
        ],
        "operationId": "vendor_credits_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor credit ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorCreditResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-returns": {
      "get": {
        "tags": [
          "vendor_returns"
        ],
        "operationId": "vendor_returns_list",
        "parameters": [
          {
            "name": "supplier_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorReturnListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "vendor_returns"
        ],
        "operationId": "vendor_returns_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVendorReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorReturnResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-returns/{id}": {
      "get": {
        "tags": [
          "vendor_returns"
        ],
        "operationId": "vendor_returns_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor return ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorReturnResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-returns/{id}/cancel": {
      "post": {
        "tags": [
          "vendor_returns"
        ],
        "operationId": "vendor_returns_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor return ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorReturnResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-returns/{id}/process": {
      "post": {
        "tags": [
          "vendor_returns"
        ],
        "operationId": "vendor_returns_process",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor return ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProcessVendorReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorReturnResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/vendor-returns/{id}/submit": {
      "post": {
        "tags": [
          "vendor_returns"
        ],
        "operationId": "vendor_returns_submit",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Vendor return ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendorReturnResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-bins": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_list",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "bin_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinListResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBinRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-bins/adjust": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_adjust",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustBinLevelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinLevelResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-bins/move": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_move",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveBetweenBinsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinMovementResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-bins/reconcile": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_reconcile",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sku",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinReconciliationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-bins/{id}": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bin ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bin ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBinRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bin ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-bins/{id}/levels": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_bin_levels",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Bin ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BinLevelListResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-inventory/adjust": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_inventory_adjust",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustInventoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationInventoryResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-inventory/move": {
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_inventory_move",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveInventoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MovementResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-locations": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_location_list",
        "parameters": [
          {
            "name": "warehouse_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "location_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aisle",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_pickable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_receivable",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_location_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLocationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-locations/{id}": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_location_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouse-locations/{id}/inventory": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_location_inventory",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationInventoryListResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouses": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_list",
        "parameters": [
          {
            "name": "warehouse_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarehouseListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarehouseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarehouseResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warehouses/{id}": {
      "get": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Warehouse ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarehouseResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Warehouse ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWarehouseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarehouseResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "warehouse"
        ],
        "operationId": "warehouse_delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Warehouse ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warranties": {
      "get": {
        "tags": [
          "warranties"
        ],
        "operationId": "list_warranties",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarrantyListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "warranties"
        ],
        "operationId": "create_warranty",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWarrantyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarrantyResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/warranties/{id}": {
      "get": {
        "tags": [
          "warranties"
        ],
        "operationId": "get_warranty",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Warranty ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarrantyResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wishlists": {
      "get": {
        "tags": [
          "wishlists"
        ],
        "summary": "`GET /api/v1/wishlists`",
        "operationId": "list_wishlists",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return (default: 50).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of results to skip (default: 0).",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "Filter by customer ID (UUID).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of wishlists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WishlistListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "wishlists"
        ],
        "summary": "`POST /api/v1/wishlists`",
        "operationId": "create_wishlist",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWishlistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Wishlist created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WishlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wishlists/{id}": {
      "get": {
        "tags": [
          "wishlists"
        ],
        "summary": "`GET /api/v1/wishlists/{id}`",
        "operationId": "get_wishlist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Wishlist ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wishlist details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WishlistResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "wishlists"
        ],
        "summary": "`DELETE /api/v1/wishlists/{id}`",
        "operationId": "delete_wishlist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Wishlist ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Wishlist deleted"
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wishlists/{id}/items": {
      "post": {
        "tags": [
          "wishlists"
        ],
        "summary": "`POST /api/v1/wishlists/{id}/items`",
        "operationId": "add_item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Wishlist ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddWishlistItemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Item added to wishlist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WishlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/wishlists/{id}/items/{product_id}": {
      "delete": {
        "tags": [
          "wishlists"
        ],
        "summary": "`DELETE /api/v1/wishlists/{id}/items/{product_id}`",
        "operationId": "remove_item",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Wishlist ID (UUID)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "description": "Product ID (UUID) to remove",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Item removed from wishlist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WishlistResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist or item not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders": {
      "get": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_list",
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bom_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "work_center_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for keyset pagination (opaque token from `next_cursor`).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/tasks/{task_id}/complete": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_complete_task",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "description": "Work order task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteWorkOrderTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderTaskResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/tasks/{task_id}/start": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_start_task",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "description": "Work order task ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderTaskResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}": {
      "get": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_get_one",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}/cancel": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_cancel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}/complete": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_complete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteWorkOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}/hold": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_hold",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}/resume": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_resume",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}/start": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_start",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderResponse"
                }
              }
            }
          },
          "409": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/work-orders/{id}/tasks": {
      "get": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_list_tasks",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderTaskListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "work_orders"
        ],
        "operationId": "work_orders_add_task",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Work order ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkOrderTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkOrderTaskResponse"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "`GET /health` — simple liveness probe.",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Service is alive",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/health/deep": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "`GET /health/deep` — deep health check with DB connectivity and metrics.",
        "operationId": "deep_health",
        "responses": {
          "200": {
            "description": "Deep health report with DB latency and engine counters"
          },
          "500": {
            "description": "Database connectivity check failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "`GET /health/ready` — readiness probe that checks DB connectivity.",
        "operationId": "readiness",
        "responses": {
          "200": {
            "description": "Service is ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service is not ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/metrics": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "`GET /metrics` — Prometheus-compatible operational metrics.",
        "operationId": "metrics",
        "responses": {
          "200": {
            "description": "Prometheus metrics",
            "content": {
              "text/plain": {}
            }
          },
          "401": {
            "description": "Missing or invalid metrics bearer token"
          },
          "403": {
            "description": "Metrics request IP is not allowed"
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "`GET /version` — build & release metadata.",
        "description": "All fields except `version` are best-effort: they're populated from\nenvironment variables the release pipeline injects at compile time\n(`GITHUB_SHA`, `GITHUB_REF_NAME`, `STATESET_RELEASE_TAG`,\n`STATESET_BUILD_TIMESTAMP`, `STATESET_SIGNED`). Local `cargo build`\nruns leave the optional fields unset and `signed = false`, which the\nadmin UI surfaces as \"this binary did not come from a verified\nrelease pipeline\".",
        "operationId": "version",
        "responses": {
          "200": {
            "description": "Build & release metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcknowledgePurchaseOrderRequest": {
        "type": "object",
        "properties": {
          "supplier_reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional reference number from the supplier."
          }
        }
      },
      "ActivityLogListResponse": {
        "type": "object",
        "required": [
          "entries",
          "total"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityLogResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ActivityLogResponse": {
        "type": "object",
        "required": [
          "id",
          "subject_type",
          "subject_id",
          "action",
          "summary",
          "actor_kind",
          "metadata",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "actor": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor_kind": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "subject_id": {
            "type": "string"
          },
          "subject_type": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "AddCartItemRequest": {
        "type": "object",
        "required": [
          "sku",
          "name",
          "quantity",
          "unit_price"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "original_price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal original price as a string."
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "requires_shipping": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "unit_price": {
            "type": "string",
            "description": "Decimal unit price as a string."
          }
        }
      },
      "AddCartonRequest": {
        "type": "object",
        "properties": {
          "height_cm": {
            "type": [
              "string",
              "null"
            ]
          },
          "length_cm": {
            "type": [
              "string",
              "null"
            ]
          },
          "package_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `box`, `envelope`, `tube`, `pallet`, `custom`."
          },
          "weight_kg": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal weight (kg) as a string."
          },
          "width_cm": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AddWishlistItemRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/wishlists/:id/items`.",
        "required": [
          "product_id"
        ],
        "properties": {
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional note about the item."
          },
          "product_id": {
            "type": "string",
            "format": "uuid",
            "description": "Product to add to the wishlist."
          }
        }
      },
      "AddressDto": {
        "type": "object",
        "description": "Address DTO shared by orders and customers.",
        "required": [
          "line1",
          "city",
          "postal_code",
          "country"
        ],
        "properties": {
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AdjustBinLevelRequest": {
        "type": "object",
        "required": [
          "bin_id",
          "sku",
          "quantity",
          "reason"
        ],
        "properties": {
          "bin_id": {
            "type": "integer",
            "format": "int32"
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Signed decimal quantity as a string (positive adds, negative removes).\nThe same delta is applied to warehouse-level stock atomically."
          },
          "reason": {
            "type": "string"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "AdjustInventoryRequest": {
        "type": "object",
        "required": [
          "location_id",
          "sku",
          "quantity",
          "reason"
        ],
        "properties": {
          "location_id": {
            "type": "integer",
            "format": "int32"
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Signed decimal quantity as a string (positive adds, negative removes)."
          },
          "reason": {
            "type": "string"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "AdjustStoreCreditRequest": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AgingBucketResponse": {
        "type": "object",
        "required": [
          "label",
          "min_days",
          "quantity",
          "value"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "max_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "min_days": {
            "type": "integer",
            "format": "int64"
          },
          "quantity": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "AgingLayerRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity",
          "unit_cost",
          "received_at"
        ],
        "properties": {
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Remaining quantity as a string."
          },
          "received_at": {
            "type": "string",
            "description": "Received date in `YYYY-MM-DD` form."
          },
          "sku": {
            "type": "string"
          },
          "unit_cost": {
            "type": "string",
            "description": "Unit cost as a string."
          }
        }
      },
      "ApAgingResponse": {
        "type": "object",
        "required": [
          "current",
          "days_1_30",
          "days_31_60",
          "days_61_90",
          "days_over_90",
          "total"
        ],
        "properties": {
          "current": {
            "type": "string"
          },
          "days_1_30": {
            "type": "string"
          },
          "days_31_60": {
            "type": "string"
          },
          "days_61_90": {
            "type": "string"
          },
          "days_over_90": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        }
      },
      "ApBillListResponse": {
        "type": "object",
        "required": [
          "bills",
          "total"
        ],
        "properties": {
          "bills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApBillResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ApBillResponse": {
        "type": "object",
        "required": [
          "id",
          "bill_number",
          "supplier_id",
          "status",
          "due_date",
          "subtotal",
          "tax_amount",
          "total_amount",
          "amount_paid",
          "amount_due",
          "currency",
          "created_at"
        ],
        "properties": {
          "amount_due": {
            "type": "string"
          },
          "amount_paid": {
            "type": "string"
          },
          "bill_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "tax_amount": {
            "type": "string"
          },
          "total_amount": {
            "type": "string"
          }
        }
      },
      "ApPaymentAllocationRequest": {
        "type": "object",
        "required": [
          "bill_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "bill_id": {
            "type": "string"
          }
        }
      },
      "ApPaymentResponse": {
        "type": "object",
        "required": [
          "id",
          "payment_number",
          "supplier_id",
          "payment_method",
          "amount",
          "currency",
          "status",
          "created_at"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "payment_number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "ApPaymentRunResponse": {
        "type": "object",
        "required": [
          "id",
          "run_number",
          "status",
          "payment_date",
          "payment_method",
          "total_amount",
          "payment_count",
          "created_at"
        ],
        "properties": {
          "approved_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "payment_count": {
            "type": "integer",
            "format": "int32"
          },
          "payment_date": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "run_number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total_amount": {
            "type": "string"
          }
        }
      },
      "ApplyArCreditMemoRequest": {
        "type": "object",
        "required": [
          "invoice_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "invoice_id": {
            "type": "string"
          }
        }
      },
      "ApplyArPaymentRequest": {
        "type": "object",
        "required": [
          "payment_id",
          "applications"
        ],
        "properties": {
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArPaymentApplicationLineRequest"
            }
          },
          "payment_id": {
            "type": "string"
          }
        }
      },
      "ApplyPrepaymentRequest": {
        "type": "object",
        "required": [
          "target_type",
          "target_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to apply as a string."
          },
          "target_id": {
            "type": "string"
          },
          "target_type": {
            "type": "string",
            "description": "`bill` or `payment_obligation`."
          }
        }
      },
      "ApplyStoreCreditRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/store-credits/{id}/apply`.",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to debit from the credit. Must be positive."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional reference (e.g. order ID) recorded on the transaction."
          }
        }
      },
      "ApplyVendorCreditRequest": {
        "type": "object",
        "required": [
          "target_type",
          "target_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to apply as a string."
          },
          "target_id": {
            "type": "string"
          },
          "target_type": {
            "type": "string",
            "description": "`bill` or `payment_obligation`."
          }
        }
      },
      "ApprovePaymentRunRequest": {
        "type": "object",
        "required": [
          "approved_by"
        ],
        "properties": {
          "approved_by": {
            "type": "string"
          }
        }
      },
      "ApprovePurchaseOrderRequest": {
        "type": "object",
        "required": [
          "approved_by"
        ],
        "properties": {
          "approved_by": {
            "type": "string",
            "description": "Name/ID of the approver."
          }
        }
      },
      "ArAgingResponse": {
        "type": "object",
        "required": [
          "current",
          "days_1_30",
          "days_31_60",
          "days_61_90",
          "days_over_90",
          "total",
          "as_of_date"
        ],
        "properties": {
          "as_of_date": {
            "type": "string"
          },
          "current": {
            "type": "string"
          },
          "days_1_30": {
            "type": "string"
          },
          "days_31_60": {
            "type": "string"
          },
          "days_61_90": {
            "type": "string"
          },
          "days_over_90": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        }
      },
      "ArCollectionActivityListResponse": {
        "type": "object",
        "required": [
          "activities",
          "total"
        ],
        "properties": {
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArCollectionActivityResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ArCollectionActivityResponse": {
        "type": "object",
        "required": [
          "id",
          "invoice_id",
          "customer_id",
          "activity_type",
          "created_at"
        ],
        "properties": {
          "activity_type": {
            "type": "string"
          },
          "contact_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "dunning_letter_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "promise_to_pay_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "promise_to_pay_date": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ArCreditMemoListResponse": {
        "type": "object",
        "required": [
          "credit_memos",
          "total"
        ],
        "properties": {
          "credit_memos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArCreditMemoResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ArCreditMemoResponse": {
        "type": "object",
        "required": [
          "id",
          "credit_memo_number",
          "customer_id",
          "reason",
          "amount",
          "applied_amount",
          "unapplied_amount",
          "status",
          "created_at"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "applied_amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "credit_memo_number": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "unapplied_amount": {
            "type": "string"
          }
        }
      },
      "ArCustomerAgingListResponse": {
        "type": "object",
        "required": [
          "customers",
          "total"
        ],
        "properties": {
          "customers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArCustomerAgingResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ArCustomerAgingResponse": {
        "type": "object",
        "required": [
          "customer_id",
          "current",
          "days_1_30",
          "days_31_60",
          "days_61_90",
          "days_over_90",
          "total_outstanding",
          "invoice_count"
        ],
        "properties": {
          "current": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "days_1_30": {
            "type": "string"
          },
          "days_31_60": {
            "type": "string"
          },
          "days_61_90": {
            "type": "string"
          },
          "days_over_90": {
            "type": "string"
          },
          "invoice_count": {
            "type": "integer",
            "format": "int32"
          },
          "total_outstanding": {
            "type": "string"
          }
        }
      },
      "ArCustomerStatementResponse": {
        "type": "object",
        "required": [
          "customer_id",
          "customer_name",
          "period_start",
          "period_end",
          "opening_balance",
          "total_invoices",
          "total_payments",
          "total_credits",
          "closing_balance",
          "line_items"
        ],
        "properties": {
          "closing_balance": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "customer_name": {
            "type": "string"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArStatementLineResponse"
            }
          },
          "opening_balance": {
            "type": "string"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "total_credits": {
            "type": "string"
          },
          "total_invoices": {
            "type": "string"
          },
          "total_payments": {
            "type": "string"
          }
        }
      },
      "ArDunningInvoiceListResponse": {
        "type": "object",
        "required": [
          "invoices",
          "total"
        ],
        "properties": {
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArDunningInvoiceResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ArDunningInvoiceResponse": {
        "type": "object",
        "required": [
          "id",
          "invoice_number",
          "customer_id",
          "status",
          "total",
          "balance_due",
          "due_date"
        ],
        "properties": {
          "balance_due": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        }
      },
      "ArPaymentApplicationLineRequest": {
        "type": "object",
        "required": [
          "invoice_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "invoice_id": {
            "type": "string"
          }
        }
      },
      "ArPaymentApplicationListResponse": {
        "type": "object",
        "required": [
          "applications",
          "total"
        ],
        "properties": {
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArPaymentApplicationResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ArPaymentApplicationResponse": {
        "type": "object",
        "required": [
          "id",
          "payment_id",
          "invoice_id",
          "applied_amount",
          "applied_date"
        ],
        "properties": {
          "applied_amount": {
            "type": "string"
          },
          "applied_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string"
          },
          "payment_id": {
            "type": "string"
          }
        }
      },
      "ArStatementLineResponse": {
        "type": "object",
        "required": [
          "date",
          "transaction_type",
          "reference_number",
          "description",
          "balance"
        ],
        "properties": {
          "balance": {
            "type": "string"
          },
          "credit": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": "string"
          },
          "debit": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "reference_number": {
            "type": "string"
          },
          "transaction_type": {
            "type": "string"
          }
        }
      },
      "ArWriteOffResponse": {
        "type": "object",
        "required": [
          "id",
          "write_off_number",
          "invoice_id",
          "customer_id",
          "amount",
          "reason",
          "reversed",
          "created_at"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "reversed": {
            "type": "boolean"
          },
          "write_off_number": {
            "type": "string"
          }
        }
      },
      "AssignTaskRequest": {
        "type": "object",
        "required": [
          "assigned_to"
        ],
        "properties": {
          "assigned_to": {
            "type": "string"
          }
        }
      },
      "BackorderListResponse": {
        "type": "object",
        "required": [
          "backorders",
          "total"
        ],
        "properties": {
          "backorders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BackorderResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "BackorderResponse": {
        "type": "object",
        "required": [
          "id",
          "backorder_number",
          "order_id",
          "customer_id",
          "sku",
          "quantity_ordered",
          "quantity_fulfilled",
          "quantity_remaining",
          "status",
          "priority",
          "created_at"
        ],
        "properties": {
          "backorder_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "promised_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_fulfilled": {
            "type": "string"
          },
          "quantity_ordered": {
            "type": "string"
          },
          "quantity_remaining": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "BalanceSheetLineResponse": {
        "type": "object",
        "required": [
          "account_id",
          "account_number",
          "account_name",
          "balance",
          "indent_level",
          "is_total"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "account_number": {
            "type": "string"
          },
          "balance": {
            "type": "string",
            "description": "Decimal balance as a string."
          },
          "indent_level": {
            "type": "integer",
            "format": "int32"
          },
          "is_total": {
            "type": "boolean"
          }
        }
      },
      "BalanceSheetResponse": {
        "type": "object",
        "required": [
          "as_of_date",
          "total_assets",
          "total_liabilities",
          "total_equity",
          "assets",
          "liabilities",
          "equity"
        ],
        "properties": {
          "as_of_date": {
            "type": "string"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetLineResponse"
            }
          },
          "equity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetLineResponse"
            }
          },
          "liabilities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetLineResponse"
            }
          },
          "total_assets": {
            "type": "string",
            "description": "Decimal total assets as a string."
          },
          "total_equity": {
            "type": "string",
            "description": "Decimal total equity as a string."
          },
          "total_liabilities": {
            "type": "string",
            "description": "Decimal total liabilities as a string."
          }
        }
      },
      "BinLevelListResponse": {
        "type": "object",
        "required": [
          "levels",
          "total"
        ],
        "properties": {
          "levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BinLevelResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "BinLevelResponse": {
        "type": "object",
        "required": [
          "bin_id",
          "warehouse_id",
          "sku",
          "quantity_on_hand",
          "quantity_allocated",
          "quantity_available",
          "updated_at"
        ],
        "properties": {
          "bin_id": {
            "type": "integer",
            "format": "int32"
          },
          "quantity_allocated": {
            "type": "string"
          },
          "quantity_available": {
            "type": "string"
          },
          "quantity_on_hand": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "BinListResponse": {
        "type": "object",
        "required": [
          "bins",
          "total"
        ],
        "properties": {
          "bins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BinResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "BinMovementResponse": {
        "type": "object",
        "required": [
          "id",
          "movement_type",
          "sku",
          "quantity",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "from_bin_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "id": {
            "type": "string"
          },
          "movement_type": {
            "type": "string"
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "to_bin_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "BinReconciliationResponse": {
        "type": "object",
        "required": [
          "warehouse_id",
          "sku",
          "bin_on_hand",
          "warehouse_on_hand",
          "variance",
          "is_balanced"
        ],
        "properties": {
          "bin_on_hand": {
            "type": "string"
          },
          "is_balanced": {
            "type": "boolean"
          },
          "sku": {
            "type": "string"
          },
          "variance": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "warehouse_on_hand": {
            "type": "string"
          }
        }
      },
      "BinResponse": {
        "type": "object",
        "required": [
          "id",
          "warehouse_id",
          "code",
          "bin_type",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "aisle": {
            "type": [
              "string",
              "null"
            ]
          },
          "bin_type": {
            "type": "string"
          },
          "capacity": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "is_active": {
            "type": "boolean"
          },
          "position": {
            "type": [
              "string",
              "null"
            ]
          },
          "rack": {
            "type": [
              "string",
              "null"
            ]
          },
          "shelf": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "zone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BomComponentListResponse": {
        "type": "object",
        "required": [
          "components",
          "total"
        ],
        "properties": {
          "components": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BomComponentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "BomComponentResponse": {
        "type": "object",
        "required": [
          "id",
          "bom_id",
          "name",
          "quantity",
          "unit_of_measure"
        ],
        "properties": {
          "bom_id": {
            "type": "string"
          },
          "component_sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "unit_of_measure": {
            "type": "string"
          }
        }
      },
      "BomListResponse": {
        "type": "object",
        "required": [
          "boms",
          "total"
        ],
        "properties": {
          "boms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BomResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "BomResponse": {
        "type": "object",
        "required": [
          "id",
          "bom_number",
          "product_id",
          "name",
          "revision",
          "status",
          "component_count",
          "created_at"
        ],
        "properties": {
          "bom_number": {
            "type": "string"
          },
          "component_count": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "revision": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "BulkCreateRequest": {
        "type": "object",
        "required": [
          "mappings"
        ],
        "properties": {
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateFieldMappingRequest"
            }
          }
        }
      },
      "BulkDeleteRequest": {
        "type": "object",
        "required": [
          "ids"
        ],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BulkResultResponse": {
        "type": "object",
        "required": [
          "affected"
        ],
        "properties": {
          "affected": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "CaptureLineRequest": {
        "type": "object",
        "required": [
          "product_id",
          "sku",
          "quantity_on_hand",
          "quantity_available"
        ],
        "properties": {
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "type": "string"
          },
          "quantity_available": {
            "type": "string",
            "description": "Available quantity as a string."
          },
          "quantity_on_hand": {
            "type": "string",
            "description": "On-hand quantity as a string."
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CaptureRequest": {
        "type": "object",
        "required": [
          "lines"
        ],
        "properties": {
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CaptureLineRequest"
            }
          }
        }
      },
      "CartAddressRequest": {
        "type": "object",
        "required": [
          "line1",
          "city",
          "postal_code",
          "country"
        ],
        "properties": {
          "city": {
            "type": "string"
          },
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CartItemResponse": {
        "type": "object",
        "required": [
          "id",
          "sku",
          "name",
          "quantity",
          "unit_price",
          "discount_amount",
          "total"
        ],
        "properties": {
          "discount_amount": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "sku": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          }
        }
      },
      "CartListResponse": {
        "type": "object",
        "required": [
          "carts",
          "total"
        ],
        "properties": {
          "carts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CartResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CartResponse": {
        "type": "object",
        "required": [
          "id",
          "cart_number",
          "status",
          "currency",
          "items",
          "subtotal",
          "tax_amount",
          "shipping_amount",
          "discount_amount",
          "grand_total",
          "created_at"
        ],
        "properties": {
          "cart_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount_amount": {
            "type": "string"
          },
          "grand_total": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CartItemResponse"
            }
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_amount": {
            "type": "string"
          },
          "shipping_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "tax_amount": {
            "type": "string"
          }
        }
      },
      "CartonListResponse": {
        "type": "object",
        "required": [
          "cartons",
          "total"
        ],
        "properties": {
          "cartons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CartonResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CartonResponse": {
        "type": "object",
        "required": [
          "id",
          "pack_task_id",
          "carton_number",
          "package_type",
          "label_printed",
          "created_at"
        ],
        "properties": {
          "carton_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "label_printed": {
            "type": "boolean"
          },
          "pack_task_id": {
            "type": "string"
          },
          "package_type": {
            "type": "string"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "weight_kg": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ChannelListResponse": {
        "type": "object",
        "required": [
          "channels",
          "total"
        ],
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ChannelResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "channel_type",
          "status",
          "api_locked",
          "created_at"
        ],
        "properties": {
          "api_locked": {
            "type": "boolean"
          },
          "channel_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "integration": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "ChannelSalesRowResponse": {
        "type": "object",
        "required": [
          "channel",
          "order_count",
          "total_revenue",
          "total_units"
        ],
        "properties": {
          "channel": {
            "type": "string"
          },
          "order_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_revenue": {
            "type": "string"
          },
          "total_units": {
            "type": "string"
          }
        }
      },
      "CheckoutResultResponse": {
        "type": "object",
        "required": [
          "cart_id",
          "order_id",
          "order_number",
          "total_charged",
          "currency"
        ],
        "properties": {
          "cart_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "payment_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_charged": {
            "type": "string"
          }
        }
      },
      "CloseBooksInventoryRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity",
          "valuation"
        ],
        "properties": {
          "quantity": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "valuation": {
            "type": "string"
          }
        }
      },
      "CloseBooksLineRequest": {
        "type": "object",
        "required": [
          "sku",
          "cost"
        ],
        "properties": {
          "cost": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CloseBooksRequest": {
        "type": "object",
        "properties": {
          "inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CloseBooksInventoryRequest"
            }
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CloseBooksLineRequest"
            }
          }
        }
      },
      "CloseBooksResponse": {
        "type": "object",
        "required": [
          "zero_cost_skus",
          "zero_valuation_items",
          "zero_cost_count",
          "zero_valuation_count",
          "is_ready"
        ],
        "properties": {
          "is_ready": {
            "type": "boolean"
          },
          "zero_cost_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "zero_cost_skus": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "zero_valuation_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "zero_valuation_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZeroValuationItemResponse"
            }
          }
        }
      },
      "CloseMonthRequest": {
        "type": "object",
        "required": [
          "period_id"
        ],
        "properties": {
          "closed_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actor recorded as the closer. Defaults to `api`."
          },
          "dry_run": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Compute counts/amounts per step without writing anything."
          },
          "period_id": {
            "type": "string",
            "description": "Accounting period to close."
          },
          "skip_depreciation": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Skip posting scheduled fixed-asset depreciation."
          },
          "skip_fx_revaluation": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Skip FX revaluation of foreign-currency accounts."
          },
          "skip_period_close": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Skip the final period close (closing entries + close period)."
          },
          "skip_revenue_recognition": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Skip recognizing deferred revenue through period end."
          }
        }
      },
      "CloseMonthResponse": {
        "type": "object",
        "required": [
          "period_id",
          "period_name",
          "dry_run",
          "depreciation",
          "revenue_recognition",
          "fx_revaluation",
          "period_close",
          "period_status"
        ],
        "properties": {
          "closing_entry": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JournalEntryResponse",
                "description": "Posted closing entry; absent for dry runs or skipped closes."
              }
            ]
          },
          "depreciation": {
            "$ref": "#/components/schemas/CloseMonthStepResponse",
            "description": "Step 1: scheduled depreciation due through period end."
          },
          "dry_run": {
            "type": "boolean"
          },
          "fx_revaluation": {
            "$ref": "#/components/schemas/CloseMonthStepResponse",
            "description": "Step 3: FX revaluation as of period end."
          },
          "period_close": {
            "$ref": "#/components/schemas/CloseMonthStepResponse",
            "description": "Step 4: closing entries + close period."
          },
          "period_id": {
            "type": "string"
          },
          "period_name": {
            "type": "string"
          },
          "period_status": {
            "type": "string",
            "description": "Period status after the run (`closed` after a real close)."
          },
          "revenue_recognition": {
            "$ref": "#/components/schemas/CloseMonthStepResponse",
            "description": "Step 2: deferred revenue recognized through period end."
          }
        }
      },
      "CloseMonthStepResponse": {
        "type": "object",
        "required": [
          "status",
          "entry_count",
          "total_amount",
          "warnings"
        ],
        "properties": {
          "entry_count": {
            "type": "integer",
            "format": "int64",
            "description": "Entries posted (or that would be posted in a dry run).",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "description": "One of `executed`, `skipped`, `dry_run`."
          },
          "total_amount": {
            "type": "string",
            "description": "Decimal total amount for the step as a string."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Per-item failures that did not abort the close."
          }
        }
      },
      "ClosePeriodRequest": {
        "type": "object",
        "properties": {
          "closed_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actor recorded as the closer. Defaults to `api`."
          }
        }
      },
      "CogsLineRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity",
          "revenue",
          "cost",
          "transaction_date"
        ],
        "properties": {
          "cost": {
            "type": "string"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "revenue": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "transaction_date": {
            "type": "string",
            "description": "Transaction date (`YYYY-MM-DD`)."
          }
        }
      },
      "CogsRowResponse": {
        "type": "object",
        "required": [
          "sku",
          "quantity",
          "revenue",
          "cogs",
          "gross_margin"
        ],
        "properties": {
          "cogs": {
            "type": "string"
          },
          "gross_margin": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "revenue": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CompanyListResponse": {
        "type": "object",
        "required": [
          "companies",
          "total"
        ],
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CompanyResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "currency",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "payment_terms_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "CompleteJobRequest": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        }
      },
      "CompletePickRequest": {
        "type": "object",
        "required": [
          "quantity_picked"
        ],
        "properties": {
          "completed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_picked": {
            "type": "string",
            "description": "Decimal quantity picked as a string."
          },
          "quantity_short": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal quantity short as a string."
          },
          "serial_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "short_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompletePutAwayRequest": {
        "type": "object",
        "properties": {
          "actual_location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "completed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CompleteShipRequest": {
        "type": "object",
        "required": [
          "tracking_number"
        ],
        "properties": {
          "shipped_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal shipping cost as a string."
          },
          "tracking_number": {
            "type": "string"
          }
        }
      },
      "CompleteWorkOrderRequest": {
        "type": "object",
        "required": [
          "quantity_completed"
        ],
        "properties": {
          "quantity_completed": {
            "type": "string",
            "description": "Decimal quantity completed as a string."
          }
        }
      },
      "CompleteWorkOrderTaskRequest": {
        "type": "object",
        "properties": {
          "actual_hours": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal actual hours as a string."
          }
        }
      },
      "ConsumeLotRequest": {
        "type": "object",
        "required": [
          "quantity"
        ],
        "properties": {
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Defaults to `api`."
          }
        }
      },
      "ConsumptionRecordRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity",
          "consumed_at"
        ],
        "properties": {
          "consumed_at": {
            "type": "string",
            "description": "Date consumed (`YYYY-MM-DD`)."
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "ConsumptionRequest": {
        "type": "object",
        "required": [
          "from",
          "to",
          "records"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsumptionRecordRequest"
            }
          },
          "to": {
            "type": "string"
          }
        }
      },
      "ConsumptionResponse": {
        "type": "object",
        "required": [
          "from",
          "to",
          "days",
          "rows",
          "total_quantity"
        ],
        "properties": {
          "days": {
            "type": "integer",
            "format": "int64"
          },
          "from": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsumptionRowResponse"
            }
          },
          "to": {
            "type": "string"
          },
          "total_quantity": {
            "type": "string"
          }
        }
      },
      "ConsumptionRowResponse": {
        "type": "object",
        "required": [
          "sku",
          "total_quantity",
          "event_count",
          "avg_daily"
        ],
        "properties": {
          "avg_daily": {
            "type": "string"
          },
          "event_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "sku": {
            "type": "string"
          },
          "total_quantity": {
            "type": "string"
          }
        }
      },
      "ContactResponse": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ConversionResponse": {
        "type": "object",
        "required": [
          "original_amount",
          "base_currency",
          "converted_amount",
          "quote_currency",
          "rate"
        ],
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "converted_amount": {
            "type": "string"
          },
          "original_amount": {
            "type": "string"
          },
          "quote_currency": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          }
        }
      },
      "ConversionRuleResponse": {
        "type": "object",
        "required": [
          "id",
          "rule_type",
          "from_uom_id",
          "to_uom_id",
          "factor"
        ],
        "properties": {
          "factor": {
            "type": "string"
          },
          "from_uom_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "rule_type": {
            "type": "string"
          },
          "to_uom_id": {
            "type": "string"
          }
        }
      },
      "ConvertCurrencyRequest": {
        "type": "object",
        "required": [
          "amount",
          "base_currency",
          "quote_currency"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "base_currency": {
            "type": "string"
          },
          "quote_currency": {
            "type": "string"
          }
        }
      },
      "CounterOfferRequest": {
        "type": "object",
        "description": "Request body for a counter-offer.",
        "required": [
          "from_agent_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "from_agent_id": {
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateApBillItemRequest": {
        "type": "object",
        "required": [
          "description",
          "quantity",
          "unit_price"
        ],
        "properties": {
          "account_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "po_line_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Purchase order line this bill line references (for three-way matching)."
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "tax_rate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional decimal tax rate as a string."
          },
          "unit_price": {
            "type": "string",
            "description": "Decimal unit price as a string."
          }
        }
      },
      "CreateApBillRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "due_date",
          "items"
        ],
        "properties": {
          "due_date": {
            "type": "string",
            "description": "RFC 3339 due date, e.g. `2026-08-01T00:00:00Z`."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateApBillItemRequest"
            }
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "CreateApPaymentRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "payment_method",
          "amount"
        ],
        "properties": {
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApPaymentAllocationRequest"
            }
          },
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "bank_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "check_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "type": "string",
            "description": "One of `check`, `ach`, `wire`, `credit_card`, `cash`, `other`."
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "CreateApPaymentRunRequest": {
        "type": "object",
        "required": [
          "payment_date",
          "payment_method",
          "bill_ids"
        ],
        "properties": {
          "bill_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_date": {
            "type": "string",
            "description": "RFC 3339 payment date."
          },
          "payment_method": {
            "type": "string",
            "description": "One of `check`, `ach`, `wire`, `credit_card`, `cash`, `other`."
          }
        }
      },
      "CreateArCollectionActivityRequest": {
        "type": "object",
        "required": [
          "invoice_id",
          "activity_type"
        ],
        "properties": {
          "activity_type": {
            "type": "string",
            "description": "One of `dunning_letter_sent`, `phone_call`, `email`, `in_person_visit`,\n`promise_to_pay`, `payment_plan_created`, `sent_to_collections`,\n`write_off_approved`, `dispute_logged`, `dispute_resolved`, `note`."
          },
          "contact_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_result": {
            "type": [
              "string",
              "null"
            ]
          },
          "dunning_letter_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `reminder_1`, `reminder_2`, `reminder_3`, `demand_letter`, `collection_notice`."
          },
          "invoice_id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "promise_to_pay_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal promised amount as a string."
          },
          "promise_to_pay_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 promised payment date."
          }
        }
      },
      "CreateArCreditMemoRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "reason",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "customer_id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "original_invoice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": "string",
            "description": "One of `returned_goods`, `pricing_error`, `overpayment`, `damaged`,\n`service_credit`, `goodwill_adjustment`, `other`."
          }
        }
      },
      "CreateArWriteOffRequest": {
        "type": "object",
        "required": [
          "invoice_id",
          "amount",
          "reason"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "approved_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": "string",
            "description": "One of `uncollectible`, `bankruptcy`, `customer_dispute`, `small_balance`,\n`account_closed`, `deceased`, `other`."
          }
        }
      },
      "CreateBackorderRequest": {
        "type": "object",
        "required": [
          "order_id",
          "customer_id",
          "sku",
          "quantity"
        ],
        "properties": {
          "customer_id": {
            "type": "string"
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 expected availability date."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_id": {
            "type": "string"
          },
          "order_line_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `low`, `normal`, `high`, `critical`."
          },
          "promised_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 date promised to the customer."
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CreateBinRequest": {
        "type": "object",
        "required": [
          "warehouse_id",
          "code"
        ],
        "properties": {
          "aisle": {
            "type": [
              "string",
              "null"
            ]
          },
          "bin_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `pick`, `bulk`, `receiving`, `staging`, `quarantine`, `returns`. Default `pick`."
          },
          "capacity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional per-SKU maximum on-hand quantity (decimal string)."
          },
          "code": {
            "type": "string",
            "description": "Unique per warehouse."
          },
          "position": {
            "type": [
              "string",
              "null"
            ]
          },
          "rack": {
            "type": [
              "string",
              "null"
            ]
          },
          "shelf": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "zone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateBomComponentRequest": {
        "type": "object",
        "required": [
          "name",
          "quantity"
        ],
        "properties": {
          "component_product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "component_sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "unit_of_measure": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateBomRequest": {
        "type": "object",
        "required": [
          "product_id",
          "name"
        ],
        "properties": {
          "components": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateBomComponentRequest"
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "revision": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateCartRequest": {
        "type": "object",
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 4217 currency code, e.g. `USD`."
          },
          "customer_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_in_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddCartItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateChannelRequest": {
        "type": "object",
        "required": [
          "name",
          "channel_type"
        ],
        "properties": {
          "channel_type": {
            "type": "string",
            "description": "One of `sales_channel`, `fulfillment_channel`, `end_to_end_channel`."
          },
          "integration": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateCompanyRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "payment_terms_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateContactRequest": {
        "type": "object",
        "required": [
          "first_name"
        ],
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateConversionRuleRequest": {
        "type": "object",
        "required": [
          "rule_type",
          "from_uom_id",
          "to_uom_id",
          "factor"
        ],
        "properties": {
          "factor": {
            "type": "string",
            "description": "Multiplier (`to_qty = from_qty × factor`) as a string."
          },
          "from_uom_id": {
            "type": "string"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "rule_type": {
            "type": "string",
            "description": "`SYSTEM` (global) or `SKU` (product-specific)."
          },
          "to_uom_id": {
            "type": "string"
          }
        }
      },
      "CreateCreditTermsRequest": {
        "type": "object",
        "description": "Request body for creating credit terms.",
        "required": [
          "creditor_agent_id",
          "debtor_agent_id",
          "credit_limit"
        ],
        "properties": {
          "credit_limit": {
            "type": "string",
            "description": "Credit limit (exact decimal; accepts a JSON string or number)."
          },
          "creditor_agent_id": {
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "debtor_agent_id": {
            "type": "string"
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateCustomerRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/customers`.",
        "required": [
          "email",
          "first_name",
          "last_name"
        ],
        "properties": {
          "accepts_marketing": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateCycleCountLineRequest": {
        "type": "object",
        "required": [
          "sku",
          "expected_quantity"
        ],
        "properties": {
          "expected_quantity": {
            "type": "string",
            "description": "Decimal expected quantity as a string."
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CreateCycleCountRequest": {
        "type": "object",
        "required": [
          "warehouse_id",
          "lines"
        ],
        "properties": {
          "counted_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateCycleCountLineRequest"
            }
          },
          "location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "scheduled_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC3339 timestamp for the scheduled count date."
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateEdiDocumentRequest": {
        "type": "object",
        "required": [
          "document_type"
        ],
        "properties": {
          "direction": {
            "type": [
              "string",
              "null"
            ],
            "description": "`inbound` or `outbound`."
          },
          "document_type": {
            "type": "string"
          },
          "partner": {
            "type": [
              "string",
              "null"
            ]
          },
          "payload": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateFieldMappingRequest": {
        "type": "object",
        "required": [
          "integration_account",
          "mapping_group",
          "source_field",
          "destination_field"
        ],
        "properties": {
          "destination_field": {
            "type": "string"
          },
          "fallback": {
            "type": [
              "string",
              "null"
            ]
          },
          "integration_account": {
            "type": "string"
          },
          "mapping_group": {
            "type": "string"
          },
          "source_field": {
            "type": "string"
          },
          "template": {
            "type": [
              "string",
              "null"
            ]
          },
          "transform": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `none`, `uppercase`, `lowercase`, `trim`."
          }
        }
      },
      "CreateFixedAssetRequest": {
        "type": "object",
        "required": [
          "name",
          "category",
          "acquisition_date",
          "acquisition_cost",
          "useful_life_months",
          "depreciation_method"
        ],
        "properties": {
          "acquisition_cost": {
            "type": "string",
            "description": "Decimal cost as a string."
          },
          "acquisition_date": {
            "type": "string",
            "description": "ISO date (`YYYY-MM-DD`)."
          },
          "asset_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": "string",
            "description": "One of `land`, `building`, `machinery`, `equipment`, `vehicle`,\n`furniture_and_fixtures`, `computer_hardware`, `software`,\n`leasehold_improvement`, `other`."
          },
          "declining_balance_rate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Declining-balance rate as a decimal string (required for `declining_balance`)."
          },
          "depreciation_method": {
            "type": "string",
            "description": "One of `straight_line`, `declining_balance`, `units_of_production`."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "in_service_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO date; when supplied the asset is created in service."
          },
          "location_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "salvage_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal salvage value as a string (default `0`)."
          },
          "useful_life_months": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateGiftCardRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/gift-cards`.",
        "required": [
          "initial_balance"
        ],
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO currency code (default: USD)."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional expiration date (RFC 3339)."
          },
          "initial_balance": {
            "type": "string",
            "description": "Initial balance (exact decimal; accepts a JSON string or number)."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional gift message."
          },
          "recipient_email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional recipient email."
          }
        }
      },
      "CreateGlAccountRequest": {
        "type": "object",
        "required": [
          "account_number",
          "name",
          "account_type"
        ],
        "properties": {
          "account_number": {
            "type": "string",
            "description": "Structured account code (e.g. `\"1010\"`)."
          },
          "account_sub_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional sub-type (e.g. `cash`, `accounts_receivable`, `sales_revenue`)."
          },
          "account_type": {
            "type": "string",
            "description": "One of `asset`, `liability`, `equity`, `revenue`, `expense`."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO-4217 currency code (e.g. `USD`)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_header": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_posting": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "parent_account_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateGlPeriodRequest": {
        "type": "object",
        "required": [
          "period_name",
          "fiscal_year",
          "period_number",
          "start_date",
          "end_date"
        ],
        "properties": {
          "end_date": {
            "type": "string",
            "description": "Last date of the period (inclusive), `YYYY-MM-DD`."
          },
          "fiscal_year": {
            "type": "integer",
            "format": "int32"
          },
          "period_name": {
            "type": "string"
          },
          "period_number": {
            "type": "integer",
            "format": "int32"
          },
          "start_date": {
            "type": "string",
            "description": "First date of the period (inclusive), `YYYY-MM-DD`."
          }
        }
      },
      "CreateInboundShipmentItemRequest": {
        "type": "object",
        "required": [
          "product_id",
          "sku",
          "quantity_expected"
        ],
        "properties": {
          "product_id": {
            "type": "string"
          },
          "quantity_expected": {
            "type": "string",
            "description": "Expected quantity as a string."
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CreateInboundShipmentRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "items"
        ],
        "properties": {
          "carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateInboundShipmentItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateInspectionItemRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity_to_inspect"
        ],
        "properties": {
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_to_inspect": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "serial_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CreateInspectionRequest": {
        "type": "object",
        "required": [
          "inspection_type",
          "reference_type",
          "reference_id"
        ],
        "properties": {
          "inspection_type": {
            "type": "string",
            "description": "One of `receiving`, `in_process`, `final`, `random`."
          },
          "inspector_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateInspectionItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_id": {
            "type": "string"
          },
          "reference_type": {
            "type": "string"
          }
        }
      },
      "CreateIntegrationMappingRequest": {
        "type": "object",
        "required": [
          "integration",
          "mapping_group",
          "field_name",
          "external_value",
          "internal_value"
        ],
        "properties": {
          "external_value": {
            "type": "string"
          },
          "field_name": {
            "type": "string"
          },
          "integration": {
            "type": "string"
          },
          "internal_value": {
            "type": "string"
          },
          "mapping_group": {
            "type": "string"
          }
        }
      },
      "CreateInvoiceRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/invoices`.",
        "required": [
          "customer_id"
        ],
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateJournalEntryLineRequest": {
        "type": "object",
        "required": [
          "account_id"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "credit_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal credit amount as a string. Defaults to `\"0\"`."
          },
          "debit_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal debit amount as a string. Defaults to `\"0\"`."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateJournalEntryRequest": {
        "type": "object",
        "required": [
          "entry_date",
          "description",
          "lines"
        ],
        "properties": {
          "auto_post": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Post immediately after creation when balanced."
          },
          "description": {
            "type": "string"
          },
          "entry_date": {
            "type": "string",
            "description": "Entry date in `YYYY-MM-DD` format. Must fall in an open period."
          },
          "entry_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `standard`, `adjusting`, `closing`, `reversing`, `opening`."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateJournalEntryLineRequest"
            }
          }
        }
      },
      "CreateLocationRequest": {
        "type": "object",
        "required": [
          "warehouse_id"
        ],
        "properties": {
          "aisle": {
            "type": [
              "string",
              "null"
            ]
          },
          "bin": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_pickable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_receivable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "location_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `bulk`, `pick`, `staging`, `receiving`, `shipping`, `quarantine`,\n`returns`, `production`, `packing`, `cross_dock`."
          },
          "max_volume_m3": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal maximum volume (m3) as a string."
          },
          "max_weight_kg": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal maximum weight (kg) as a string."
          },
          "rack": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "zone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateLotRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity"
        ],
        "properties": {
          "cost_per_unit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal unit cost as a string."
          },
          "expiration_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Lot number; auto-generated when omitted."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "production_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "sku": {
            "type": "string"
          },
          "supplier_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_lot": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateLoyaltyProgramRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/loyalty/programs`.",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description."
          },
          "name": {
            "type": "string",
            "description": "Program name."
          },
          "points_per_dollar": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Points earned per dollar spent.",
            "minimum": 0
          }
        }
      },
      "CreateNcrRequest": {
        "type": "object",
        "required": [
          "source",
          "severity",
          "sku",
          "quantity_affected",
          "description"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "inspection_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_affected": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "serial_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "severity": {
            "type": "string",
            "description": "One of `critical`, `major`, `minor` (per `Severity`)."
          },
          "sku": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "description": "One of `inspection`, `customer_complaint`, `internal`, `supplier`, `audit` (per `NonConformanceSource`)."
          }
        }
      },
      "CreateNegotiationRequest": {
        "type": "object",
        "description": "Request body for creating a negotiation.",
        "required": [
          "buyer_agent_id",
          "seller_agent_id",
          "initial_offer"
        ],
        "properties": {
          "auto_accept_below": {
            "type": [
              "string",
              "null"
            ]
          },
          "auto_reject_above": {
            "type": [
              "string",
              "null"
            ]
          },
          "buyer_agent_id": {
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_in_hours": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "initial_offer": {
            "type": "string"
          },
          "max_rounds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "seller_agent_id": {
            "type": "string"
          }
        }
      },
      "CreateObligationRequest": {
        "type": "object",
        "required": [
          "description",
          "allocated_amount",
          "recognition_method"
        ],
        "properties": {
          "allocated_amount": {
            "type": "string",
            "description": "Decimal allocated amount as a string."
          },
          "description": {
            "type": "string"
          },
          "end": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO date; required for `ratable_over_time`."
          },
          "recognition_method": {
            "type": "string",
            "description": "One of `point_in_time`, `ratable_over_time`, `milestone`."
          },
          "standalone_selling_price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal standalone selling price as a string."
          },
          "start": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO date; required for `ratable_over_time`."
          }
        }
      },
      "CreateOrderItemRequest": {
        "type": "object",
        "description": "A single line item in a create-order request.",
        "required": [
          "product_id",
          "sku",
          "name",
          "quantity",
          "unit_price"
        ],
        "properties": {
          "discount": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "sku": {
            "type": "string"
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit_price": {
            "type": "string"
          },
          "variant_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateOrderRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/orders`.",
        "required": [
          "customer_id",
          "items"
        ],
        "properties": {
          "billing_address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AddressDto",
                "description": "Billing address."
              }
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO currency code (default: USD)."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid",
            "description": "The customer placing the order."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateOrderItemRequest"
            },
            "description": "Line items for the order."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional notes."
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "Payment method identifier."
          },
          "shipping_address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AddressDto",
                "description": "Shipping address."
              }
            ]
          },
          "shipping_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shipping method identifier."
          },
          "stock_policy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StockPolicyDto",
                "description": "What to do when a line cannot be fully reserved from stock.\n\n`allow_backorder` (default) reserves what is available and backorders\nthe remainder; `reject_if_insufficient` fails the whole request with\nHTTP 400 and creates nothing."
              }
            ]
          }
        }
      },
      "CreatePaymentObligationRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "amount",
          "due_date"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount owed as a string (must be positive)."
          },
          "due_date": {
            "type": "string",
            "description": "Due date in ISO `YYYY-MM-DD` form."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "CreatePaymentRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/payments`.",
        "required": [
          "order_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreatePrepaymentRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Prepaid amount as a string (must be positive)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "CreatePriceLevelRequest": {
        "type": "object",
        "required": [
          "name",
          "code"
        ],
        "properties": {
          "adjustment_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `none`, `percentage_discount`, `percentage_markup`."
          },
          "adjustment_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Percentage value as a string (e.g. `\"10\"`)."
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreatePriceScheduleRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC3339 window end."
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC3339 window start."
          }
        }
      },
      "CreateProductRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/products`.",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "product_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateProductionBatchRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "work_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreatePromotionRequest": {
        "type": "object",
        "required": [
          "name",
          "promotion_type"
        ],
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_uses": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "promotion_type": {
            "type": "string"
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreatePurchaseOrderItemRequest": {
        "type": "object",
        "required": [
          "sku",
          "name",
          "quantity",
          "unit_cost"
        ],
        "properties": {
          "discount_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal discount amount as a string."
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "sku": {
            "type": "string"
          },
          "supplier_sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal tax amount as a string."
          },
          "unit_cost": {
            "type": "string",
            "description": "Decimal unit cost as a string."
          },
          "unit_of_measure": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreatePurchaseOrderRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "items"
        ],
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 4217 currency code."
          },
          "discount_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal discount amount as a string."
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePurchaseOrderItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp (defaults to now)."
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `due_on_receipt`, `net_15`, `net_30`, `net_45`, `net_60`, `net_90`,\n`2_10_net_30`, `prepaid`, `cash_on_delivery`, `letter_of_credit`."
          },
          "ship_to_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal shipping cost as a string."
          },
          "supplier_id": {
            "type": "string"
          },
          "supplier_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal tax amount as a string."
          }
        }
      },
      "CreatePutAwayRequest": {
        "type": "object",
        "required": [
          "receipt_id",
          "receipt_item_id",
          "sku",
          "to_location_id",
          "quantity"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "from_location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "receipt_id": {
            "type": "string"
          },
          "receipt_item_id": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "to_location_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateQualityHoldRequest": {
        "type": "object",
        "required": [
          "sku",
          "quantity",
          "reason",
          "hold_type",
          "placed_by"
        ],
        "properties": {
          "hold_type": {
            "type": "string",
            "description": "One of the `HoldType` values, e.g. `quality_inspection`, `damage`, `recall`."
          },
          "inspection_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "ncr_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "placed_by": {
            "type": "string"
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "reason": {
            "type": "string"
          },
          "serial_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CreateReceiptItemRequest": {
        "type": "object",
        "required": [
          "sku",
          "expected_quantity"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "expected_quantity": {
            "type": "string",
            "description": "Decimal expected quantity as a string."
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "po_line_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "unit_cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal unit cost as a string."
          }
        }
      },
      "CreateReceiptRequest": {
        "type": "object",
        "required": [
          "warehouse_id",
          "items"
        ],
        "properties": {
          "carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateReceiptItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "receipt_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `purchase_order`, `transfer`, `return`, `adjustment`, `production`, `other`."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateRefundRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/payments/:id/refund`.",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateReturnItemRequest": {
        "type": "object",
        "description": "A single item in a create-return request.",
        "required": [
          "order_item_id",
          "quantity"
        ],
        "properties": {
          "condition": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_item_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateReturnRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/returns`.",
        "required": [
          "order_id",
          "reason",
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateReturnItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "reason_details": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateRevenueContractRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "transaction_price",
          "effective_date",
          "obligations"
        ],
        "properties": {
          "contract_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": "string"
          },
          "effective_date": {
            "type": "string",
            "description": "ISO date (`YYYY-MM-DD`)."
          },
          "invoice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "obligations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateObligationRequest"
            }
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_price": {
            "type": "string",
            "description": "Decimal transaction price as a string."
          }
        }
      },
      "CreateReviewRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/reviews`.",
        "required": [
          "product_id",
          "customer_id",
          "rating"
        ],
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "Review body text."
          },
          "customer_id": {
            "type": "string",
            "format": "uuid",
            "description": "Customer who wrote the review."
          },
          "product_id": {
            "type": "string",
            "format": "uuid",
            "description": "Product being reviewed."
          },
          "rating": {
            "type": "integer",
            "format": "int32",
            "description": "Star rating (1-5).",
            "minimum": 0
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Review headline."
          },
          "verified_purchase": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the reviewer actually purchased the product."
          }
        }
      },
      "CreateSegmentRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "segment_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateSerialRequest": {
        "type": "object",
        "required": [
          "sku"
        ],
        "properties": {
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "serial": {
            "type": [
              "string",
              "null"
            ],
            "description": "Serial string; auto-generated when omitted."
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "CreateShipmentRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/shipments`.",
        "required": [
          "order_id"
        ],
        "properties": {
          "carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "recipient_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateShippingZoneRequest": {
        "type": "object",
        "required": [
          "name",
          "countries"
        ],
        "properties": {
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "postal_codes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "regions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateStoreCreditRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateSubscriptionRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "plan_id"
        ],
        "properties": {
          "coupon_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "payment_method_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "skip_trial": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CreateSupplierRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 4217 currency code."
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "lead_time_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "minimum_order": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal minimum order amount as a string."
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateSupplierSkuRequest": {
        "type": "object",
        "required": [
          "product_id",
          "supplier_id",
          "sku"
        ],
        "properties": {
          "lead_time_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_order_qty": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "unit_cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional unit cost as a string (e.g. `\"9.99\"`)."
          }
        }
      },
      "CreateTransferOrderItemRequest": {
        "type": "object",
        "required": [
          "product_id",
          "quantity"
        ],
        "properties": {
          "product_id": {
            "type": "string"
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string (e.g. `\"10\"`)."
          }
        }
      },
      "CreateTransferOrderRequest": {
        "type": "object",
        "required": [
          "source_warehouse_id",
          "destination_warehouse_id",
          "items"
        ],
        "properties": {
          "destination_warehouse_id": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateTransferOrderItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_warehouse_id": {
            "type": "string"
          }
        }
      },
      "CreateUnitClassRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateUnitOfMeasureRequest": {
        "type": "object",
        "required": [
          "unit_class_id",
          "name",
          "abbreviation",
          "factor"
        ],
        "properties": {
          "abbreviation": {
            "type": "string"
          },
          "factor": {
            "type": "string",
            "description": "Conversion factor relative to the class base unit, as a string."
          },
          "name": {
            "type": "string"
          },
          "unit_class_id": {
            "type": "string"
          }
        }
      },
      "CreateVendorCreditRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Credit amount as a string (must be positive)."
          },
          "memo": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          },
          "vendor_return_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateVendorReturnItemRequest": {
        "type": "object",
        "required": [
          "product_id",
          "quantity",
          "unit_cost"
        ],
        "properties": {
          "product_id": {
            "type": "string"
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `defective`, `overage`, `wrong_item`, `other`."
          },
          "unit_cost": {
            "type": "string",
            "description": "Decimal unit cost as a string."
          }
        }
      },
      "CreateVendorReturnRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateVendorReturnItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "CreateWarehouseRequest": {
        "type": "object",
        "required": [
          "code",
          "name"
        ],
        "properties": {
          "address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WarehouseAddressBody"
              }
            ]
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `distribution`, `manufacturing`, `retail`, `third_party`, `consignment`, `returns`."
          }
        }
      },
      "CreateWarrantyRequest": {
        "type": "object",
        "required": [
          "order_id",
          "product_id"
        ],
        "properties": {
          "duration_months": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "warranty_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateWaveRequest": {
        "type": "object",
        "required": [
          "warehouse_id",
          "order_ids"
        ],
        "properties": {
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Order IDs (UUIDs) to include in the wave."
          },
          "priority": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateWishlistRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/wishlists`.",
        "required": [
          "customer_id"
        ],
        "properties": {
          "customer_id": {
            "type": "string",
            "format": "uuid",
            "description": "Customer who owns the wishlist."
          },
          "is_public": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the wishlist is visible to others."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable name for the wishlist."
          }
        }
      },
      "CreateWorkOrderRequest": {
        "type": "object",
        "required": [
          "product_id",
          "quantity_to_build"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "bom_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `low`, `normal`, `high`, `urgent`."
          },
          "product_id": {
            "type": "string"
          },
          "quantity_to_build": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "scheduled_end": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "scheduled_start": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "tasks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/CreateWorkOrderTaskRequest"
            }
          },
          "work_center_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateWorkOrderTaskRequest": {
        "type": "object",
        "required": [
          "task_name"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimated_hours": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal estimated hours as a string."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "task_name": {
            "type": "string"
          }
        }
      },
      "CreditAmountRequest": {
        "type": "object",
        "description": "Request body for charging or paying.",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount (exact decimal; accepts a JSON string or number)."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreditTermsResponse": {
        "type": "object",
        "description": "Response body for credit terms.",
        "required": [
          "id",
          "creditor_agent_id",
          "debtor_agent_id",
          "credit_limit",
          "outstanding_balance",
          "available_credit",
          "currency",
          "payment_terms",
          "status"
        ],
        "properties": {
          "available_credit": {
            "type": "string"
          },
          "credit_limit": {
            "type": "string"
          },
          "creditor_agent_id": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "debtor_agent_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "outstanding_balance": {
            "type": "string"
          },
          "payment_terms": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "CustomerListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/customers` (list).",
        "required": [
          "customers",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "customers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerResponse"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CustomerResponse": {
        "type": "object",
        "description": "Response body for a single customer.",
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "status",
          "accepts_marketing",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "accepts_marketing": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CycleCountLineResponse": {
        "type": "object",
        "required": [
          "id",
          "sku",
          "expected_quantity"
        ],
        "properties": {
          "counted_quantity": {
            "type": [
              "string",
              "null"
            ]
          },
          "expected_quantity": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "variance": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CycleCountListResponse": {
        "type": "object",
        "required": [
          "cycle_counts",
          "total",
          "has_more"
        ],
        "properties": {
          "cycle_counts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CycleCountResponse"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "CycleCountResponse": {
        "type": "object",
        "required": [
          "id",
          "warehouse_id",
          "status",
          "lines",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "counted_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CycleCountLineResponse"
            }
          },
          "location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "scheduled_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DashboardResponse": {
        "type": "object",
        "required": [
          "open_count",
          "total_outstanding",
          "overdue_count",
          "overdue_amount"
        ],
        "properties": {
          "open_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "overdue_amount": {
            "type": "string"
          },
          "overdue_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_outstanding": {
            "type": "string"
          }
        }
      },
      "DepreciationEntryResponse": {
        "type": "object",
        "required": [
          "period",
          "amount",
          "accumulated",
          "book_value",
          "status"
        ],
        "properties": {
          "accumulated": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "book_value": {
            "type": "string"
          },
          "period": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": "string"
          }
        }
      },
      "DepreciationScheduleResponse": {
        "type": "object",
        "required": [
          "asset_id",
          "total_depreciation",
          "entries"
        ],
        "properties": {
          "asset_id": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DepreciationEntryResponse"
            }
          },
          "total_depreciation": {
            "type": "string"
          }
        }
      },
      "DisposeFixedAssetRequest": {
        "type": "object",
        "required": [
          "date",
          "proceeds"
        ],
        "properties": {
          "date": {
            "type": "string",
            "description": "ISO date (`YYYY-MM-DD`)."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "proceeds": {
            "type": "string",
            "description": "Decimal proceeds as a string."
          }
        }
      },
      "DispositionNcrRequest": {
        "type": "object",
        "required": [
          "disposition"
        ],
        "properties": {
          "corrective_action": {
            "type": [
              "string",
              "null"
            ]
          },
          "disposition": {
            "type": "string",
            "description": "One of the `Disposition` values, e.g. `use_as_is`, `rework`, `scrap`, `return_to_supplier`."
          },
          "disposition_quantity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal quantity as a string."
          },
          "preventive_action": {
            "type": [
              "string",
              "null"
            ]
          },
          "root_cause": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EdiCountResponse": {
        "type": "object",
        "required": [
          "key",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "key": {
            "type": "string"
          }
        }
      },
      "EdiDocumentListResponse": {
        "type": "object",
        "required": [
          "documents",
          "total"
        ],
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdiDocumentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "EdiDocumentResponse": {
        "type": "object",
        "required": [
          "id",
          "document_type",
          "direction",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "partner": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "EdiSummaryResponse": {
        "type": "object",
        "required": [
          "total",
          "by_status",
          "by_type"
        ],
        "properties": {
          "by_status": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdiCountResponse"
            }
          },
          "by_type": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EdiCountResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "EnqueueJobRequest": {
        "type": "object",
        "required": [
          "payload"
        ],
        "properties": {
          "payload": {
            "type": "string"
          },
          "payload_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "`zpl` or `pdf`."
          },
          "printer_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EnrollCustomerRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/loyalty/enroll`.",
        "required": [
          "program_id",
          "customer_id"
        ],
        "properties": {
          "customer_id": {
            "type": "string",
            "format": "uuid",
            "description": "Customer to enroll."
          },
          "program_id": {
            "type": "string",
            "format": "uuid",
            "description": "Loyalty program to enroll in."
          }
        }
      },
      "ErrorBody": {
        "type": "object",
        "description": "JSON body for error responses.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "description": "Inner detail of the error response.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "invariant": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable commerce-invariant code, present only when the failure violated\na published invariant (see `docs/src/advanced/invariants.md`)."
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ExchangeRateListResponse": {
        "type": "object",
        "required": [
          "rates",
          "total"
        ],
        "properties": {
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExchangeRateResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ExchangeRateResponse": {
        "type": "object",
        "required": [
          "base_currency",
          "quote_currency",
          "rate",
          "updated_at"
        ],
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "quote_currency": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "FieldMappingListResponse": {
        "type": "object",
        "required": [
          "mappings",
          "total"
        ],
        "properties": {
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldMappingResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "FieldMappingResponse": {
        "type": "object",
        "required": [
          "id",
          "integration_account",
          "mapping_group",
          "source_field",
          "destination_field",
          "transform",
          "is_active"
        ],
        "properties": {
          "destination_field": {
            "type": "string"
          },
          "fallback": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "integration_account": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "mapping_group": {
            "type": "string"
          },
          "source_field": {
            "type": "string"
          },
          "template": {
            "type": [
              "string",
              "null"
            ]
          },
          "transform": {
            "type": "string"
          }
        }
      },
      "FixedAssetListResponse": {
        "type": "object",
        "required": [
          "fixed_assets",
          "total",
          "has_more"
        ],
        "properties": {
          "fixed_assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FixedAssetResponse"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "FixedAssetResponse": {
        "type": "object",
        "required": [
          "id",
          "asset_number",
          "name",
          "category",
          "status",
          "acquisition_date",
          "acquisition_cost",
          "salvage_value",
          "useful_life_months",
          "accumulated_depreciation",
          "book_value",
          "currency",
          "created_at"
        ],
        "properties": {
          "accumulated_depreciation": {
            "type": "string"
          },
          "acquisition_cost": {
            "type": "string"
          },
          "acquisition_date": {
            "type": "string"
          },
          "asset_number": {
            "type": "string"
          },
          "book_value": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "disposal_gain_loss": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "in_service_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "salvage_value": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "useful_life_months": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "FulfillBackorderRequest": {
        "type": "object",
        "required": [
          "quantity"
        ],
        "properties": {
          "fulfilled_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `inventory`, `purchase_order`, `transfer`, `production`."
          }
        }
      },
      "GiftCardAmountRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/gift-cards/{id}/charge` and `/refund`.",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to charge (debit) or refund (credit). Must be positive."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional reference (e.g. order ID) recorded on the transaction."
          }
        }
      },
      "GiftCardListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/gift-cards` (list).",
        "required": [
          "gift_cards",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "gift_cards": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GiftCardResponse"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "GiftCardResponse": {
        "type": "object",
        "description": "Response body for a single gift card.",
        "required": [
          "id",
          "code",
          "initial_balance",
          "current_balance",
          "currency",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "current_balance": {
            "type": "string"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "initial_balance": {
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "recipient_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GiftCardTransactionResponse": {
        "type": "object",
        "description": "A gift card ledger transaction.",
        "required": [
          "id",
          "gift_card_id",
          "amount",
          "balance_after",
          "transaction_type",
          "created_at"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "balance_after": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "gift_card_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "transaction_type": {
            "type": "string"
          }
        }
      },
      "GlAccountListResponse": {
        "type": "object",
        "required": [
          "accounts",
          "total"
        ],
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlAccountResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "GlAccountResponse": {
        "type": "object",
        "required": [
          "id",
          "account_number",
          "name",
          "account_type",
          "is_header",
          "is_posting",
          "normal_balance",
          "currency",
          "status",
          "current_balance",
          "created_at"
        ],
        "properties": {
          "account_number": {
            "type": "string"
          },
          "account_sub_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "current_balance": {
            "type": "string",
            "description": "Decimal balance as a string."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_header": {
            "type": "boolean"
          },
          "is_posting": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "normal_balance": {
            "type": "string"
          },
          "parent_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "GlPeriodListResponse": {
        "type": "object",
        "required": [
          "periods",
          "total"
        ],
        "properties": {
          "periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GlPeriodResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "GlPeriodResponse": {
        "type": "object",
        "required": [
          "id",
          "period_name",
          "fiscal_year",
          "period_number",
          "start_date",
          "end_date",
          "status",
          "created_at"
        ],
        "properties": {
          "closed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "end_date": {
            "type": "string"
          },
          "fiscal_year": {
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "type": "string"
          },
          "locked_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "locked_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "period_name": {
            "type": "string"
          },
          "period_number": {
            "type": "integer",
            "format": "int32"
          },
          "start_date": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "description": "Response body for `GET /health`.",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "tenant_cache": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TenantCacheResponse"
              }
            ]
          }
        }
      },
      "InboundShipmentItemResponse": {
        "type": "object",
        "required": [
          "id",
          "product_id",
          "sku",
          "quantity_expected",
          "quantity_received"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "quantity_expected": {
            "type": "string"
          },
          "quantity_received": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "InboundShipmentListResponse": {
        "type": "object",
        "required": [
          "inbound_shipments",
          "total"
        ],
        "properties": {
          "inbound_shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboundShipmentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "InboundShipmentResponse": {
        "type": "object",
        "required": [
          "id",
          "number",
          "supplier_id",
          "status",
          "items",
          "created_at"
        ],
        "properties": {
          "carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboundShipmentItemResponse"
            }
          },
          "number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "IncomeStatementLineResponse": {
        "type": "object",
        "required": [
          "account_id",
          "account_number",
          "account_name",
          "amount",
          "indent_level",
          "is_total"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "account_number": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "description": "Decimal amount as a string."
          },
          "indent_level": {
            "type": "integer",
            "format": "int32"
          },
          "is_total": {
            "type": "boolean"
          }
        }
      },
      "IncomeStatementResponse": {
        "type": "object",
        "required": [
          "period_start",
          "period_end",
          "total_revenue",
          "total_expenses",
          "net_income",
          "revenue_lines",
          "expense_lines"
        ],
        "properties": {
          "expense_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncomeStatementLineResponse"
            }
          },
          "net_income": {
            "type": "string",
            "description": "Decimal net income as a string."
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "revenue_lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncomeStatementLineResponse"
            }
          },
          "total_expenses": {
            "type": "string",
            "description": "Decimal total expenses as a string."
          },
          "total_revenue": {
            "type": "string",
            "description": "Decimal total revenue as a string."
          }
        }
      },
      "IngestLineRequest": {
        "type": "object",
        "required": [
          "external_sku",
          "quantity"
        ],
        "properties": {
          "external_sku": {
            "type": "string"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Quantity as a string."
          }
        }
      },
      "IngestOrderRequest": {
        "type": "object",
        "required": [
          "external_order_id",
          "items"
        ],
        "properties": {
          "channel_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_order_id": {
            "type": "string"
          },
          "external_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestLineRequest"
            }
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "InspectionListResponse": {
        "type": "object",
        "required": [
          "inspections",
          "total",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "inspections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InspectionResponse"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "InspectionResponse": {
        "type": "object",
        "required": [
          "id",
          "inspection_number",
          "inspection_type",
          "reference_type",
          "reference_id",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "inspection_number": {
            "type": "string"
          },
          "inspection_type": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_id": {
            "type": "string"
          },
          "reference_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "IntegrationMappingListResponse": {
        "type": "object",
        "required": [
          "mappings",
          "total"
        ],
        "properties": {
          "mappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IntegrationMappingResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "IntegrationMappingResponse": {
        "type": "object",
        "required": [
          "id",
          "integration",
          "mapping_group",
          "field_name",
          "external_value",
          "internal_value",
          "is_active"
        ],
        "properties": {
          "external_value": {
            "type": "string"
          },
          "field_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "integration": {
            "type": "string"
          },
          "internal_value": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "mapping_group": {
            "type": "string"
          }
        }
      },
      "InventoryAdjustRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/inventory/:sku/adjust`.",
        "required": [
          "quantity",
          "reason"
        ],
        "properties": {
          "location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Deprecated: location-scoped adjustments are not supported by this endpoint.\n\nSupplying this field will return a validation error."
          },
          "quantity": {
            "type": "string",
            "description": "Signed quantity change (+/−)."
          },
          "reason": {
            "type": "string",
            "description": "Reason for the adjustment."
          }
        }
      },
      "InventoryAgingRequest": {
        "type": "object",
        "required": [
          "layers"
        ],
        "properties": {
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "description": "As-of date (`YYYY-MM-DD`); defaults to today when omitted."
          },
          "layers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgingLayerRequest"
            }
          }
        }
      },
      "InventoryAgingResponse": {
        "type": "object",
        "required": [
          "as_of",
          "buckets",
          "total_quantity",
          "total_value"
        ],
        "properties": {
          "as_of": {
            "type": "string"
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgingBucketResponse"
            }
          },
          "total_quantity": {
            "type": "string"
          },
          "total_value": {
            "type": "string"
          }
        }
      },
      "InventoryItemResponse": {
        "type": "object",
        "description": "Response body for a single inventory item (list view).",
        "required": [
          "id",
          "sku",
          "name",
          "unit_of_measure",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "unit_of_measure": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "InventoryListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/inventory` (list).",
        "required": [
          "items",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryItemResponse"
            }
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "InventoryResponse": {
        "type": "object",
        "description": "Response body for inventory stock levels.",
        "required": [
          "sku",
          "name",
          "total_on_hand",
          "total_allocated",
          "total_available"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "total_allocated": {
            "type": "string"
          },
          "total_available": {
            "type": "string"
          },
          "total_on_hand": {
            "type": "string"
          }
        }
      },
      "InvoiceListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/invoices` (list).",
        "required": [
          "invoices",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceResponse"
            }
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "InvoiceResponse": {
        "type": "object",
        "description": "Response body for a single invoice.",
        "required": [
          "id",
          "invoice_number",
          "customer_id",
          "status",
          "invoice_type",
          "invoice_date",
          "due_date",
          "currency",
          "subtotal",
          "tax_amount",
          "total",
          "amount_paid",
          "balance_due",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "amount_paid": {
            "type": "string"
          },
          "balance_due": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "due_date": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_date": {
            "type": "string",
            "format": "date-time"
          },
          "invoice_number": {
            "type": "string"
          },
          "invoice_type": {
            "type": "string"
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "tax_amount": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "JobResponse": {
        "type": "object",
        "required": [
          "id",
          "station_id",
          "payload_kind",
          "payload",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "payload_kind": {
            "type": "string"
          },
          "printer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "station_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "JournalEntryLineResponse": {
        "type": "object",
        "required": [
          "id",
          "line_number",
          "account_id",
          "debit_amount",
          "credit_amount",
          "currency"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit_amount": {
            "type": "string",
            "description": "Decimal credit amount as a string."
          },
          "currency": {
            "type": "string"
          },
          "debit_amount": {
            "type": "string",
            "description": "Decimal debit amount as a string."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "line_number": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "JournalEntryListResponse": {
        "type": "object",
        "required": [
          "journal_entries",
          "total"
        ],
        "properties": {
          "journal_entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEntryResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "JournalEntryResponse": {
        "type": "object",
        "required": [
          "id",
          "entry_number",
          "entry_date",
          "period_id",
          "entry_type",
          "source",
          "description",
          "total_debits",
          "total_credits",
          "is_balanced",
          "status",
          "lines",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "entry_date": {
            "type": "string"
          },
          "entry_number": {
            "type": "string"
          },
          "entry_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_balanced": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JournalEntryLineResponse"
            }
          },
          "period_id": {
            "type": "string"
          },
          "posted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "posted_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversed_entry_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reversing_entry_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total_credits": {
            "type": "string",
            "description": "Decimal total credits as a string."
          },
          "total_debits": {
            "type": "string",
            "description": "Decimal total debits as a string."
          }
        }
      },
      "LinkBillRequest": {
        "type": "object",
        "required": [
          "bill_id"
        ],
        "properties": {
          "bill_id": {
            "type": "string"
          }
        }
      },
      "LocationInventoryListResponse": {
        "type": "object",
        "required": [
          "inventory",
          "total"
        ],
        "properties": {
          "inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationInventoryResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "LocationInventoryResponse": {
        "type": "object",
        "required": [
          "location_id",
          "sku",
          "quantity_on_hand",
          "quantity_reserved",
          "quantity_available",
          "updated_at"
        ],
        "properties": {
          "location_id": {
            "type": "integer",
            "format": "int32"
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_available": {
            "type": "string"
          },
          "quantity_on_hand": {
            "type": "string"
          },
          "quantity_reserved": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "LocationListResponse": {
        "type": "object",
        "required": [
          "locations",
          "total"
        ],
        "properties": {
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "LocationResponse": {
        "type": "object",
        "required": [
          "id",
          "warehouse_id",
          "code",
          "location_type",
          "is_pickable",
          "is_receivable",
          "is_active",
          "created_at"
        ],
        "properties": {
          "aisle": {
            "type": [
              "string",
              "null"
            ]
          },
          "bin": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_pickable": {
            "type": "boolean"
          },
          "is_receivable": {
            "type": "boolean"
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "location_type": {
            "type": "string"
          },
          "rack": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "zone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LockChannelRequest": {
        "type": "object",
        "required": [
          "locked"
        ],
        "properties": {
          "locked": {
            "type": "boolean"
          }
        }
      },
      "LockPeriodRequest": {
        "type": "object",
        "properties": {
          "locked_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actor recorded as the locker. Defaults to `api`."
          }
        }
      },
      "LotListResponse": {
        "type": "object",
        "required": [
          "lots",
          "total"
        ],
        "properties": {
          "lots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LotResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "LotReservationResponse": {
        "type": "object",
        "required": [
          "reservation_id"
        ],
        "properties": {
          "reservation_id": {
            "type": "string"
          }
        }
      },
      "LotResponse": {
        "type": "object",
        "required": [
          "id",
          "lot_number",
          "sku",
          "status",
          "quantity_produced",
          "quantity_remaining",
          "quantity_reserved",
          "quantity_available",
          "production_date",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "expiration_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "lot_number": {
            "type": "string"
          },
          "production_date": {
            "type": "string"
          },
          "quantity_available": {
            "type": "string"
          },
          "quantity_produced": {
            "type": "string"
          },
          "quantity_remaining": {
            "type": "string"
          },
          "quantity_reserved": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "LotTransactionResponse": {
        "type": "object",
        "required": [
          "id",
          "lot_id",
          "transaction_type",
          "quantity",
          "reference_type",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lot_id": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "reference_type": {
            "type": "string"
          },
          "transaction_type": {
            "type": "string"
          }
        }
      },
      "LoyaltyAccountResponse": {
        "type": "object",
        "description": "Response body for a single loyalty account.",
        "required": [
          "id",
          "program_id",
          "customer_id",
          "points_balance",
          "tier",
          "lifetime_points",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "lifetime_points": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "points_balance": {
            "type": "integer",
            "format": "int64"
          },
          "program_id": {
            "type": "string",
            "format": "uuid"
          },
          "tier": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LoyaltyProgramListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/loyalty/programs` (list).",
        "required": [
          "programs",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "programs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltyProgramResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "LoyaltyProgramResponse": {
        "type": "object",
        "description": "Response body for a single loyalty program.",
        "required": [
          "id",
          "name",
          "description",
          "points_per_dollar",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "points_per_dollar": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MapLineRequest": {
        "type": "object",
        "properties": {
          "ignore_item": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "non_physical": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "description": "Response body for a message.",
        "required": [
          "id",
          "conversation_id",
          "from_agent_id",
          "to_agent_id",
          "message_type",
          "status",
          "sequence_number",
          "attempts",
          "created_at"
        ],
        "properties": {
          "attempts": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "conversation_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "from_agent_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "message_type": {
            "type": "string"
          },
          "sequence_number": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "to_agent_id": {
            "type": "string"
          }
        }
      },
      "MoveBetweenBinsRequest": {
        "type": "object",
        "required": [
          "from_bin_id",
          "to_bin_id",
          "sku",
          "quantity"
        ],
        "properties": {
          "from_bin_id": {
            "type": "integer",
            "format": "int32"
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "to_bin_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MoveInventoryRequest": {
        "type": "object",
        "required": [
          "from_location_id",
          "to_location_id",
          "sku",
          "quantity"
        ],
        "properties": {
          "from_location_id": {
            "type": "integer",
            "format": "int32"
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "performed_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "to_location_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MovementResponse": {
        "type": "object",
        "required": [
          "id",
          "movement_type",
          "sku",
          "quantity",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "from_location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "id": {
            "type": "string"
          },
          "movement_type": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          },
          "to_location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "NcrListResponse": {
        "type": "object",
        "required": [
          "ncrs",
          "total"
        ],
        "properties": {
          "ncrs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NcrResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "NcrResponse": {
        "type": "object",
        "required": [
          "id",
          "ncr_number",
          "source",
          "severity",
          "status",
          "sku",
          "quantity_affected",
          "description",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "disposition": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "ncr_number": {
            "type": "string"
          },
          "quantity_affected": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "NegotiationResponse": {
        "type": "object",
        "description": "Response body for a negotiation.",
        "required": [
          "id",
          "buyer_agent_id",
          "seller_agent_id",
          "status",
          "current_offer",
          "currency",
          "rounds",
          "max_rounds",
          "offer_count",
          "created_at"
        ],
        "properties": {
          "buyer_agent_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "current_offer": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "max_rounds": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offer_count": {
            "type": "integer",
            "minimum": 0
          },
          "rounds": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "seller_agent_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "OrderItemResponse": {
        "type": "object",
        "description": "A single line item in an order response.",
        "required": [
          "id",
          "product_id",
          "sku",
          "name",
          "quantity",
          "unit_price",
          "total"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "shipped_quantity": {
            "type": "integer",
            "format": "int32",
            "description": "Units of this line that have shipped so far (`<= quantity`)."
          },
          "sku": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          }
        }
      },
      "OrderListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/orders` (list).",
        "required": [
          "orders",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "OrderResponse": {
        "type": "object",
        "description": "Response body for a single order.",
        "required": [
          "id",
          "order_number",
          "customer_id",
          "status",
          "total_amount",
          "currency",
          "payment_status",
          "fulfillment_status",
          "items",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "fulfillment_status": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItemResponse"
            }
          },
          "order_number": {
            "type": "string"
          },
          "payment_status": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total_amount": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PackTaskListResponse": {
        "type": "object",
        "required": [
          "packs",
          "total"
        ],
        "properties": {
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PackTaskResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PackTaskResponse": {
        "type": "object",
        "required": [
          "id",
          "order_id",
          "status",
          "carton_count",
          "created_at"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "carton_count": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "total_weight_kg": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PairResponse": {
        "type": "object",
        "required": [
          "station",
          "token"
        ],
        "properties": {
          "station": {
            "$ref": "#/components/schemas/StationResponse"
          },
          "token": {
            "type": "string",
            "description": "One-time bearer token — store it now; it cannot be retrieved again."
          }
        }
      },
      "PairStationRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "printers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PaymentListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/payments` (list).",
        "required": [
          "payments",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PaymentObligationListResponse": {
        "type": "object",
        "required": [
          "payment_obligations",
          "total"
        ],
        "properties": {
          "payment_obligations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentObligationResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PaymentObligationResponse": {
        "type": "object",
        "required": [
          "id",
          "number",
          "supplier_id",
          "amount",
          "amount_paid",
          "outstanding",
          "currency",
          "due_date",
          "status"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "amount_paid": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "due_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "outstanding": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "PaymentResponse": {
        "type": "object",
        "description": "Response body for a single payment.",
        "required": [
          "id",
          "payment_number",
          "status",
          "payment_method",
          "amount",
          "currency",
          "amount_refunded",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "amount_refunded": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "payment_method": {
            "type": "string"
          },
          "payment_number": {
            "type": "string"
          },
          "processor": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PerformanceObligationResponse": {
        "type": "object",
        "required": [
          "id",
          "contract_id",
          "description",
          "allocated_amount",
          "recognized_amount",
          "deferred_amount",
          "recognition_method"
        ],
        "properties": {
          "allocated_amount": {
            "type": "string"
          },
          "contract_id": {
            "type": "string"
          },
          "deferred_amount": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "recognition_method": {
            "type": "string"
          },
          "recognized_amount": {
            "type": "string"
          }
        }
      },
      "PickTaskListResponse": {
        "type": "object",
        "required": [
          "picks",
          "total"
        ],
        "properties": {
          "picks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PickTaskResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PickTaskResponse": {
        "type": "object",
        "required": [
          "id",
          "order_id",
          "warehouse_id",
          "status",
          "sku",
          "source_location_id",
          "quantity_requested",
          "quantity_picked",
          "quantity_short",
          "created_at"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "quantity_picked": {
            "type": "string"
          },
          "quantity_requested": {
            "type": "string"
          },
          "quantity_short": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "source_location_id": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "wave_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PlaceInServiceRequest": {
        "type": "object",
        "required": [
          "date"
        ],
        "properties": {
          "date": {
            "type": "string",
            "description": "ISO date (`YYYY-MM-DD`)."
          }
        }
      },
      "PostDepreciationRequest": {
        "type": "object",
        "properties": {
          "periods": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Number of scheduled periods to post (default 1).",
            "minimum": 0
          }
        }
      },
      "PostJournalEntryRequest": {
        "type": "object",
        "properties": {
          "posted_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actor recorded as the poster. Defaults to `api`."
          }
        }
      },
      "PrepaymentListResponse": {
        "type": "object",
        "required": [
          "prepayments",
          "total"
        ],
        "properties": {
          "prepayments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PrepaymentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PrepaymentResponse": {
        "type": "object",
        "required": [
          "id",
          "number",
          "supplier_id",
          "amount",
          "remaining",
          "currency",
          "status"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "remaining": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "PriceLevelEntryResponse": {
        "type": "object",
        "required": [
          "product_id",
          "price"
        ],
        "properties": {
          "price": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          }
        }
      },
      "PriceLevelListResponse": {
        "type": "object",
        "required": [
          "price_levels",
          "total"
        ],
        "properties": {
          "price_levels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceLevelResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PriceLevelResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "code",
          "adjustment_type",
          "adjustment_value",
          "currency",
          "is_active"
        ],
        "properties": {
          "adjustment_type": {
            "type": "string"
          },
          "adjustment_value": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "PriceScheduleEntryResponse": {
        "type": "object",
        "required": [
          "product_id",
          "price"
        ],
        "properties": {
          "price": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          }
        }
      },
      "PriceScheduleListResponse": {
        "type": "object",
        "required": [
          "price_schedules",
          "total"
        ],
        "properties": {
          "price_schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceScheduleResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PriceScheduleResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "currency",
          "is_active",
          "priority"
        ],
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "starts_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProcessVendorReturnRequest": {
        "type": "object",
        "properties": {
          "generate_credit": {
            "type": "boolean",
            "description": "Whether to generate a vendor credit on processing."
          }
        }
      },
      "ProductListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/products` (list).",
        "required": [
          "products",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ProductResponse": {
        "type": "object",
        "description": "Response body for a single product.",
        "required": [
          "id",
          "name",
          "slug",
          "description",
          "status",
          "product_type",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "product_type": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ProductionBatchListResponse": {
        "type": "object",
        "required": [
          "production_batches",
          "total"
        ],
        "properties": {
          "production_batches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductionBatchResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ProductionBatchResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "work_order_ids",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "work_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PromotionListResponse": {
        "type": "object",
        "required": [
          "promotions",
          "total"
        ],
        "properties": {
          "promotions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromotionResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PromotionResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "promotion_type",
          "status",
          "created_at"
        ],
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "discount_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "promotion_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PurchaseOrderItemResponse": {
        "type": "object",
        "required": [
          "id",
          "purchase_order_id",
          "sku",
          "name",
          "quantity_ordered",
          "quantity_received",
          "unit_cost",
          "line_total",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "line_total": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order_id": {
            "type": "string"
          },
          "quantity_ordered": {
            "type": "string"
          },
          "quantity_received": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "supplier_sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit_cost": {
            "type": "string"
          }
        }
      },
      "PurchaseOrderItemsResponse": {
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrderItemResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PurchaseOrderListResponse": {
        "type": "object",
        "required": [
          "purchase_orders",
          "total",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "purchase_orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrderResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PurchaseOrderResponse": {
        "type": "object",
        "required": [
          "id",
          "po_number",
          "supplier_id",
          "status",
          "payment_terms",
          "currency",
          "subtotal",
          "tax_amount",
          "shipping_cost",
          "discount_amount",
          "total",
          "items",
          "created_at"
        ],
        "properties": {
          "approved_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "discount_amount": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurchaseOrderItemResponse"
            }
          },
          "payment_terms": {
            "type": "string"
          },
          "po_number": {
            "type": "string"
          },
          "shipping_cost": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "supplier_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        }
      },
      "PurgatoryLineResponse": {
        "type": "object",
        "required": [
          "id",
          "external_sku",
          "quantity",
          "ignore_item",
          "non_physical",
          "resolved"
        ],
        "properties": {
          "external_sku": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ignore_item": {
            "type": "boolean"
          },
          "non_physical": {
            "type": "boolean"
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "resolved": {
            "type": "boolean"
          }
        }
      },
      "PurgatoryListResponse": {
        "type": "object",
        "required": [
          "orders",
          "total"
        ],
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurgatoryOrderResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PurgatoryOrderResponse": {
        "type": "object",
        "required": [
          "id",
          "external_order_id",
          "is_posted",
          "ready_to_post",
          "unresolved_count",
          "items"
        ],
        "properties": {
          "external_order_id": {
            "type": "string"
          },
          "external_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_posted": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PurgatoryLineResponse"
            }
          },
          "ready_to_post": {
            "type": "boolean"
          },
          "unresolved_count": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PutAwayListResponse": {
        "type": "object",
        "required": [
          "put_aways",
          "total"
        ],
        "properties": {
          "put_aways": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PutAwayResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PutAwayResponse": {
        "type": "object",
        "required": [
          "id",
          "receipt_id",
          "receipt_item_id",
          "sku",
          "to_location_id",
          "quantity",
          "status",
          "created_at"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "from_location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "id": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "receipt_id": {
            "type": "string"
          },
          "receipt_item_id": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "to_location_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "QualityHoldListResponse": {
        "type": "object",
        "required": [
          "holds",
          "total"
        ],
        "properties": {
          "holds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QualityHoldResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "QualityHoldResponse": {
        "type": "object",
        "required": [
          "id",
          "sku",
          "quantity_held",
          "reason",
          "hold_type",
          "placed_by",
          "placed_at"
        ],
        "properties": {
          "hold_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "placed_at": {
            "type": "string"
          },
          "placed_by": {
            "type": "string"
          },
          "quantity_held": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "released_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "released_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "QuarantineLotRequest": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ReadyResponse": {
        "type": "object",
        "description": "Response body for `GET /health/ready`.",
        "required": [
          "status",
          "database"
        ],
        "properties": {
          "database": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tenant_cache": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TenantCacheResponse"
              }
            ]
          }
        }
      },
      "ReceiptItemListResponse": {
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiptItemResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ReceiptItemResponse": {
        "type": "object",
        "required": [
          "id",
          "receipt_id",
          "line_number",
          "sku",
          "expected_quantity",
          "received_quantity",
          "rejected_quantity",
          "status"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "expected_quantity": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "line_number": {
            "type": "integer",
            "format": "int32"
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "receipt_id": {
            "type": "string"
          },
          "received_quantity": {
            "type": "string"
          },
          "rejected_quantity": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "unit_cost": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReceiptListResponse": {
        "type": "object",
        "required": [
          "receipts",
          "total"
        ],
        "properties": {
          "receipts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiptResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ReceiptResponse": {
        "type": "object",
        "required": [
          "id",
          "receipt_number",
          "receipt_type",
          "status",
          "warehouse_id",
          "expected_quantity",
          "received_quantity",
          "put_away_quantity",
          "created_at"
        ],
        "properties": {
          "carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "expected_quantity": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "put_away_quantity": {
            "type": "string"
          },
          "receipt_number": {
            "type": "string"
          },
          "receipt_type": {
            "type": "string"
          },
          "received_quantity": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ReceiveItemLineRequest": {
        "type": "object",
        "required": [
          "receipt_item_id",
          "quantity_received"
        ],
        "properties": {
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_received": {
            "type": "string",
            "description": "Decimal quantity received as a string."
          },
          "quantity_rejected": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal quantity rejected as a string."
          },
          "receipt_item_id": {
            "type": "string"
          },
          "rejection_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "serial_numbers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ReceiveItemsRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceiveItemLineRequest"
            }
          },
          "received_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "receiving_location_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "ReceiveLineRequest": {
        "type": "object",
        "required": [
          "item_id",
          "quantity"
        ],
        "properties": {
          "item_id": {
            "type": "string"
          },
          "quantity": {
            "type": "string",
            "description": "Quantity to receive as a string."
          }
        }
      },
      "ReceivePurchaseOrderItemRequest": {
        "type": "object",
        "required": [
          "item_id",
          "quantity_received"
        ],
        "properties": {
          "item_id": {
            "type": "string",
            "description": "PO line item ID."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_received": {
            "type": "string",
            "description": "Decimal quantity received as a string."
          }
        }
      },
      "ReceivePurchaseOrderRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReceivePurchaseOrderItemRequest"
            }
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RecognizeRevenueRequest": {
        "type": "object",
        "required": [
          "through"
        ],
        "properties": {
          "through": {
            "type": "string",
            "description": "Recognize deferred entries with a period start on or before this ISO date."
          }
        }
      },
      "RecordActivityRequest": {
        "type": "object",
        "required": [
          "subject_type",
          "subject_id",
          "action",
          "summary"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "actor": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor_kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `user`, `system`, `integration`, `agent`."
          },
          "metadata": {
            "type": "object"
          },
          "subject_id": {
            "type": "string"
          },
          "subject_type": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "RecordCycleCountLineRequest": {
        "type": "object",
        "required": [
          "sku",
          "counted_quantity"
        ],
        "properties": {
          "counted_quantity": {
            "type": "string",
            "description": "Decimal counted quantity as a string."
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "RecordCycleCountRequest": {
        "type": "object",
        "required": [
          "counts"
        ],
        "properties": {
          "counts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecordCycleCountLineRequest"
            }
          }
        }
      },
      "RecordInspectionResultRequest": {
        "type": "object",
        "required": [
          "item_id",
          "quantity_passed",
          "quantity_failed",
          "result"
        ],
        "properties": {
          "defect_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "item_id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity_failed": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "quantity_passed": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "result": {
            "type": "string",
            "description": "One of `pass`, `fail`, `conditional_pass`, `pending` (per `InspectionResult`)."
          }
        }
      },
      "RecordInvoicePaymentRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/invoices/:id/payments`.",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RecordPaymentRequest": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Payment amount as a string."
          }
        }
      },
      "ReleaseQualityHoldRequest": {
        "type": "object",
        "required": [
          "released_by"
        ],
        "properties": {
          "release_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "released_by": {
            "type": "string"
          }
        }
      },
      "ReserveLotRequest": {
        "type": "object",
        "required": [
          "quantity"
        ],
        "properties": {
          "expires_in_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "quantity": {
            "type": "string",
            "description": "Decimal quantity as a string."
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Defaults to `api`."
          }
        }
      },
      "ReserveSerialRequest": {
        "type": "object",
        "properties": {
          "expires_in_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Defaults to `api`."
          },
          "reserved_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ResolveResponse": {
        "type": "object",
        "properties": {
          "internal_value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReturnItemResponse": {
        "type": "object",
        "description": "A return line item with its disposition.",
        "required": [
          "id",
          "return_id",
          "order_item_id",
          "sku",
          "name",
          "quantity",
          "condition",
          "refund_amount"
        ],
        "properties": {
          "condition": {
            "type": "string"
          },
          "disposition": {
            "type": [
              "string",
              "null"
            ]
          },
          "disposition_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "disposition_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "order_item_id": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "refund_amount": {
            "type": "string"
          },
          "return_id": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "ReturnListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/returns` (list).",
        "required": [
          "returns",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReturnResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ReturnResponse": {
        "type": "object",
        "description": "Response body for a single return.",
        "required": [
          "id",
          "order_id",
          "customer_id",
          "status",
          "reason",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "refund_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReturnSerialRequest": {
        "type": "object",
        "required": [
          "return_id"
        ],
        "properties": {
          "return_id": {
            "type": "string"
          }
        }
      },
      "RevaluationLineResponse": {
        "type": "object",
        "required": [
          "account_id",
          "account_number",
          "account_name",
          "currency",
          "foreign_balance",
          "carrying_value",
          "rate",
          "revalued_value",
          "adjustment",
          "unrealized_gain_loss"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "account_number": {
            "type": "string"
          },
          "adjustment": {
            "type": "string",
            "description": "`revalued_value - carrying_value`."
          },
          "carrying_value": {
            "type": "string",
            "description": "Value currently carried on the books (base currency)."
          },
          "currency": {
            "type": "string",
            "description": "Account currency (differs from the base currency)."
          },
          "foreign_balance": {
            "type": "string",
            "description": "Outstanding balance in the account's own currency."
          },
          "rate": {
            "type": "string",
            "description": "Exchange rate used (1 account-currency unit in base units)."
          },
          "revalued_value": {
            "type": "string",
            "description": "`foreign_balance * rate` rounded to base-currency precision."
          },
          "unrealized_gain_loss": {
            "type": "string",
            "description": "Unrealized FX gain (positive) or loss (negative) in base currency."
          }
        }
      },
      "RevaluationResponse": {
        "type": "object",
        "required": [
          "as_of_date",
          "base_currency",
          "total_unrealized_gain_loss",
          "lines"
        ],
        "properties": {
          "as_of_date": {
            "type": "string"
          },
          "base_currency": {
            "type": "string"
          },
          "journal_entry": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JournalEntryResponse",
                "description": "Balanced posted adjusting entry; absent when no adjustment was needed."
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevaluationLineResponse"
            }
          },
          "total_unrealized_gain_loss": {
            "type": "string"
          }
        }
      },
      "RevalueRequest": {
        "type": "object",
        "properties": {
          "as_of_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Effective date in `YYYY-MM-DD` format; must fall in an open period.\nDefaults to today (UTC)."
          },
          "base_currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO-4217 base currency (e.g. `USD`). Defaults to the store's\nconfigured base currency."
          }
        }
      },
      "RevenueContractListResponse": {
        "type": "object",
        "required": [
          "revenue_contracts",
          "total",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "revenue_contracts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevenueContractResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "RevenueContractResponse": {
        "type": "object",
        "required": [
          "id",
          "contract_number",
          "customer_id",
          "status",
          "transaction_price",
          "total_recognized",
          "deferred_balance",
          "currency",
          "effective_date",
          "obligations",
          "created_at"
        ],
        "properties": {
          "contract_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "deferred_balance": {
            "type": "string"
          },
          "effective_date": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "obligations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PerformanceObligationResponse"
            }
          },
          "status": {
            "type": "string"
          },
          "total_recognized": {
            "type": "string"
          },
          "transaction_price": {
            "type": "string"
          }
        }
      },
      "RevenueScheduleEntryResponse": {
        "type": "object",
        "required": [
          "period",
          "period_start",
          "amount",
          "status"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "period": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "period_start": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "RevenueScheduleResponse": {
        "type": "object",
        "required": [
          "obligation_id",
          "total_amount",
          "recognized_total",
          "deferred_total",
          "entries"
        ],
        "properties": {
          "deferred_total": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RevenueScheduleEntryResponse"
            }
          },
          "obligation_id": {
            "type": "string"
          },
          "recognized_total": {
            "type": "string"
          },
          "total_amount": {
            "type": "string"
          }
        }
      },
      "ReverseJournalEntryRequest": {
        "type": "object",
        "properties": {
          "reversal_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reversal date in `YYYY-MM-DD` format. Defaults to today (UTC)."
          }
        }
      },
      "ReviewListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/reviews` (list).",
        "required": [
          "reviews",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "reviews": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReviewResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ReviewResponse": {
        "type": "object",
        "description": "Response body for a single review.",
        "required": [
          "id",
          "product_id",
          "customer_id",
          "rating",
          "title",
          "body",
          "status",
          "verified_purchase",
          "helpful_count",
          "created_at"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "helpful_count": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          },
          "rating": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "verified_purchase": {
            "type": "boolean"
          }
        }
      },
      "SalesByChannelRequest": {
        "type": "object",
        "required": [
          "from",
          "to",
          "records"
        ],
        "properties": {
          "from": {
            "type": "string",
            "description": "Inclusive window start (`YYYY-MM-DD`)."
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesRecordRequest"
            }
          },
          "to": {
            "type": "string",
            "description": "Inclusive window end (`YYYY-MM-DD`)."
          }
        }
      },
      "SalesByChannelResponse": {
        "type": "object",
        "required": [
          "from",
          "to",
          "rows",
          "total_orders",
          "total_revenue",
          "total_units"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelSalesRowResponse"
            }
          },
          "to": {
            "type": "string"
          },
          "total_orders": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_revenue": {
            "type": "string"
          },
          "total_units": {
            "type": "string"
          }
        }
      },
      "SalesRecordRequest": {
        "type": "object",
        "required": [
          "channel",
          "revenue",
          "units",
          "order_date"
        ],
        "properties": {
          "channel": {
            "type": "string"
          },
          "order_date": {
            "type": "string",
            "description": "Order date in `YYYY-MM-DD` form."
          },
          "revenue": {
            "type": "string",
            "description": "Revenue as a string."
          },
          "units": {
            "type": "string",
            "description": "Units as a string."
          }
        }
      },
      "ScrapSerialRequest": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "SegmentListResponse": {
        "type": "object",
        "required": [
          "segments",
          "total"
        ],
        "properties": {
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SegmentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "SegmentResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "segment_type",
          "member_count",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "member_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "segment_type": {
            "type": "string"
          }
        }
      },
      "SendArDunningRequest": {
        "type": "object",
        "required": [
          "letter_type"
        ],
        "properties": {
          "letter_type": {
            "type": "string",
            "description": "One of `reminder_1`, `reminder_2`, `reminder_3`, `demand_letter`, `collection_notice`."
          },
          "sent_by": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SendMessageRequest": {
        "type": "object",
        "description": "Request body for sending an A2A message.",
        "required": [
          "to_agent_id",
          "from_agent_id",
          "message_type",
          "payload"
        ],
        "properties": {
          "conversation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "from_agent_id": {
            "type": "string"
          },
          "message_type": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "to_agent_id": {
            "type": "string"
          }
        }
      },
      "SerialListResponse": {
        "type": "object",
        "required": [
          "serials",
          "total"
        ],
        "properties": {
          "serials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SerialResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "SerialReservationResponse": {
        "type": "object",
        "required": [
          "reservation_id",
          "serial_id",
          "reference_type"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_type": {
            "type": "string"
          },
          "reservation_id": {
            "type": "string"
          },
          "serial_id": {
            "type": "string"
          }
        }
      },
      "SerialResponse": {
        "type": "object",
        "required": [
          "id",
          "serial",
          "sku",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lot_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "serial": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "sold_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          }
        }
      },
      "SetCartPaymentRequest": {
        "type": "object",
        "required": [
          "payment_method"
        ],
        "properties": {
          "billing_address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CartAddressRequest"
              }
            ]
          },
          "payment_method": {
            "type": "string"
          },
          "payment_token": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SetCartShippingRequest": {
        "type": "object",
        "required": [
          "shipping_address"
        ],
        "properties": {
          "shipping_address": {
            "$ref": "#/components/schemas/CartAddressRequest"
          },
          "shipping_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal shipping amount as a string."
          },
          "shipping_carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_method": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SetEntryRequest": {
        "type": "object",
        "required": [
          "product_id",
          "price"
        ],
        "properties": {
          "price": {
            "type": "string",
            "description": "Scheduled price as a string."
          },
          "product_id": {
            "type": "string"
          }
        }
      },
      "SetExchangeRateRequest": {
        "type": "object",
        "required": [
          "base_currency",
          "quote_currency",
          "rate"
        ],
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "quote_currency": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          }
        }
      },
      "SetReturnDispositionRequest": {
        "type": "object",
        "description": "Request body for `POST /api/v1/returns/{id}/items/{item_id}/disposition`.",
        "required": [
          "disposition"
        ],
        "properties": {
          "bin_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Explicit target bin; otherwise the warehouse's `returns` (restock) or\n`quarantine` bin is used when one exists."
          },
          "disposition": {
            "type": "string",
            "description": "One of `restock`, `refurbish`, `scrap`, `return_to_vendor`, `quarantine`."
          },
          "disposition_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Warehouse receiving the stock (default 1)."
          }
        }
      },
      "SetStatusRequest": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "`pending`, `sent`, `acknowledged`, `processed`, `error`."
          }
        }
      },
      "ShipOrderLineRequest": {
        "type": "object",
        "description": "One line of a partial-shipment request.",
        "required": [
          "order_item_id",
          "quantity"
        ],
        "properties": {
          "order_item_id": {
            "type": "string",
            "format": "uuid",
            "description": "Order line ID (UUID)."
          },
          "quantity": {
            "type": "integer",
            "format": "int32",
            "description": "Units shipped now; must be positive and no more than the line's unshipped remainder."
          }
        }
      },
      "ShipOrderRequest": {
        "type": "object",
        "description": "Optional request body for `PATCH /api/v1/orders/{id}/ship`.\n\nOmit the body (or `lines`) to ship every remaining unit. Explicit `lines`\nship only those units: the order becomes `partially_shipped` until every\nunit has shipped, then `shipped`.",
        "properties": {
          "lines": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ShipOrderLineRequest"
            },
            "description": "Per-line shipped quantities; `null`/absent ships all remaining units."
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Carrier tracking number to record on the order."
          }
        }
      },
      "ShipSerialRequest": {
        "type": "object",
        "required": [
          "shipment_id"
        ],
        "properties": {
          "shipment_id": {
            "type": "string"
          }
        }
      },
      "ShipTaskListResponse": {
        "type": "object",
        "required": [
          "ships",
          "total"
        ],
        "properties": {
          "ships": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipTaskResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ShipTaskResponse": {
        "type": "object",
        "required": [
          "id",
          "order_id",
          "shipment_id",
          "pack_task_id",
          "status",
          "created_at"
        ],
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "carrier": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "pack_task_id": {
            "type": "string"
          },
          "shipment_id": {
            "type": "string"
          },
          "shipping_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ShipmentListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/shipments` (list).",
        "required": [
          "shipments",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ShipmentResponse": {
        "type": "object",
        "description": "Response body for a single shipment.",
        "required": [
          "id",
          "shipment_number",
          "order_id",
          "status",
          "carrier",
          "shipping_method",
          "recipient_name",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "carrier": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "estimated_delivery": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "recipient_name": {
            "type": "string"
          },
          "shipment_number": {
            "type": "string"
          },
          "shipped_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "shipping_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_method": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tracking_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ShippingZoneListResponse": {
        "type": "object",
        "required": [
          "zones",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "zones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShippingZoneResponse"
            }
          }
        }
      },
      "ShippingZoneResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "countries",
          "is_active",
          "priority",
          "created_at"
        ],
        "properties": {
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "SnapshotLineResponse": {
        "type": "object",
        "required": [
          "product_id",
          "sku",
          "quantity_on_hand",
          "quantity_available"
        ],
        "properties": {
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "type": "string"
          },
          "quantity_available": {
            "type": "string"
          },
          "quantity_on_hand": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      },
      "SnapshotListResponse": {
        "type": "object",
        "required": [
          "snapshots",
          "total"
        ],
        "properties": {
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnapshotSummary"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "SnapshotResponse": {
        "type": "object",
        "required": [
          "id",
          "total_skus",
          "total_units",
          "captured_at",
          "lines"
        ],
        "properties": {
          "captured_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnapshotLineResponse"
            }
          },
          "total_skus": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_units": {
            "type": "string"
          }
        }
      },
      "SnapshotSummary": {
        "type": "object",
        "required": [
          "id",
          "total_skus",
          "total_units",
          "captured_at"
        ],
        "properties": {
          "captured_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_skus": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total_units": {
            "type": "string"
          }
        }
      },
      "StationResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "printers",
          "revoked"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "last_seen_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "printers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "revoked": {
            "type": "boolean"
          }
        }
      },
      "StockPolicyDto": {
        "type": "string",
        "description": "Stock policy accepted by `POST /api/v1/orders` (`stock_policy`).",
        "enum": [
          "allow_backorder",
          "reject_if_insufficient"
        ]
      },
      "StoreCreditListResponse": {
        "type": "object",
        "required": [
          "store_credits",
          "total"
        ],
        "properties": {
          "store_credits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreCreditResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "StoreCreditResponse": {
        "type": "object",
        "required": [
          "id",
          "customer_id",
          "original_balance",
          "current_balance",
          "currency",
          "status",
          "reason",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "current_balance": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "original_balance": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "StoreCreditTransactionResponse": {
        "type": "object",
        "description": "A store credit ledger transaction.",
        "required": [
          "id",
          "store_credit_id",
          "amount",
          "balance_after",
          "transaction_type",
          "created_at"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "balance_after": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "store_credit_id": {
            "type": "string"
          },
          "transaction_type": {
            "type": "string"
          }
        }
      },
      "SubscriptionListResponse": {
        "type": "object",
        "required": [
          "subscriptions",
          "total"
        ],
        "properties": {
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "SubscriptionResponse": {
        "type": "object",
        "required": [
          "id",
          "customer_id",
          "status",
          "billing_interval",
          "price",
          "currency",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "billing_interval": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "customer_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "SupplierListResponse": {
        "type": "object",
        "required": [
          "suppliers",
          "total"
        ],
        "properties": {
          "suppliers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierResponse"
            }
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "SupplierResponse": {
        "type": "object",
        "required": [
          "id",
          "supplier_code",
          "name",
          "payment_terms",
          "currency",
          "is_active",
          "created_at"
        ],
        "properties": {
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "lead_time_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "minimum_order": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "payment_terms": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_code": {
            "type": "string"
          }
        }
      },
      "SupplierSkuListResponse": {
        "type": "object",
        "required": [
          "supplier_skus",
          "total"
        ],
        "properties": {
          "supplier_skus": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierSkuResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "SupplierSkuResponse": {
        "type": "object",
        "required": [
          "id",
          "product_id",
          "supplier_id",
          "sku",
          "currency",
          "is_preferred"
        ],
        "properties": {
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_preferred": {
            "type": "boolean"
          },
          "product_id": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "unit_cost": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "TenantCacheResponse": {
        "type": "object",
        "description": "Tenant cache status included in health and readiness responses.",
        "required": [
          "enabled",
          "max_cached_dbs",
          "cached_dbs",
          "in_use_cached_dbs",
          "hits",
          "misses",
          "evictions",
          "rejections"
        ],
        "properties": {
          "cached_dbs": {
            "type": "integer",
            "minimum": 0
          },
          "enabled": {
            "type": "boolean"
          },
          "evictions": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "hits": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "in_use_cached_dbs": {
            "type": "integer",
            "minimum": 0
          },
          "max_cached_dbs": {
            "type": "integer",
            "minimum": 0
          },
          "misses": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "rejections": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ThreeWayMatchLineResponse": {
        "type": "object",
        "required": [
          "bill_item_id",
          "description",
          "received_quantity",
          "billed_quantity",
          "billed_unit_cost",
          "quantity_variance",
          "price_variance",
          "matched",
          "issues"
        ],
        "properties": {
          "bill_item_id": {
            "type": "string"
          },
          "billed_quantity": {
            "type": "string"
          },
          "billed_unit_cost": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "matched": {
            "type": "boolean"
          },
          "ordered_quantity": {
            "type": [
              "string",
              "null"
            ]
          },
          "ordered_unit_cost": {
            "type": [
              "string",
              "null"
            ]
          },
          "po_line_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_variance": {
            "type": "string"
          },
          "quantity_variance": {
            "type": "string"
          },
          "received_quantity": {
            "type": "string"
          }
        }
      },
      "ThreeWayMatchResponse": {
        "type": "object",
        "required": [
          "bill_id",
          "match_status",
          "tolerance_percent",
          "lines"
        ],
        "properties": {
          "bill_id": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ThreeWayMatchLineResponse"
            }
          },
          "match_status": {
            "type": "string",
            "description": "One of `not_required`, `pending`, `matched`, `variance`."
          },
          "tolerance_percent": {
            "type": "string"
          },
          "variance_line_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Number of lines with variances (present when `match_status` is `variance`).",
            "minimum": 0
          }
        }
      },
      "TransactionCogsRequest": {
        "type": "object",
        "required": [
          "from",
          "to",
          "lines"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CogsLineRequest"
            }
          },
          "to": {
            "type": "string"
          }
        }
      },
      "TransactionCogsResponse": {
        "type": "object",
        "required": [
          "from",
          "to",
          "rows",
          "total_revenue",
          "total_cogs",
          "gross_margin",
          "gross_margin_pct"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "gross_margin": {
            "type": "string"
          },
          "gross_margin_pct": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CogsRowResponse"
            }
          },
          "to": {
            "type": "string"
          },
          "total_cogs": {
            "type": "string"
          },
          "total_revenue": {
            "type": "string"
          }
        }
      },
      "TransferOrderItemResponse": {
        "type": "object",
        "required": [
          "id",
          "product_id",
          "quantity",
          "quantity_received"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "quantity_received": {
            "type": "string"
          }
        }
      },
      "TransferOrderListResponse": {
        "type": "object",
        "required": [
          "transfer_orders",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "transfer_orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferOrderResponse"
            }
          }
        }
      },
      "TransferOrderResponse": {
        "type": "object",
        "required": [
          "id",
          "number",
          "source_warehouse_id",
          "destination_warehouse_id",
          "status",
          "items",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "destination_warehouse_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferOrderItemResponse"
            }
          },
          "number": {
            "type": "string"
          },
          "source_warehouse_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "TrialBalanceLineResponse": {
        "type": "object",
        "required": [
          "account_id",
          "account_number",
          "account_name",
          "account_type",
          "debit_balance",
          "credit_balance"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "account_number": {
            "type": "string"
          },
          "account_type": {
            "type": "string"
          },
          "credit_balance": {
            "type": "string",
            "description": "Decimal credit balance as a string."
          },
          "debit_balance": {
            "type": "string",
            "description": "Decimal debit balance as a string."
          }
        }
      },
      "TrialBalanceResponse": {
        "type": "object",
        "required": [
          "as_of_date",
          "total_debits",
          "total_credits",
          "is_balanced",
          "lines"
        ],
        "properties": {
          "as_of_date": {
            "type": "string"
          },
          "is_balanced": {
            "type": "boolean"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrialBalanceLineResponse"
            }
          },
          "total_credits": {
            "type": "string",
            "description": "Decimal total credits as a string."
          },
          "total_debits": {
            "type": "string",
            "description": "Decimal total debits as a string."
          }
        }
      },
      "UnitClassResponse": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "base_uom_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "UnitOfMeasureResponse": {
        "type": "object",
        "required": [
          "id",
          "unit_class_id",
          "name",
          "abbreviation",
          "factor",
          "is_base"
        ],
        "properties": {
          "abbreviation": {
            "type": "string"
          },
          "factor": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_base": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "unit_class_id": {
            "type": "string"
          }
        }
      },
      "UpdateBinRequest": {
        "type": "object",
        "properties": {
          "aisle": {
            "type": [
              "string",
              "null"
            ]
          },
          "bin_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "capacity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string; send `\"\"` to clear the capacity."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "position": {
            "type": [
              "string",
              "null"
            ]
          },
          "rack": {
            "type": [
              "string",
              "null"
            ]
          },
          "shelf": {
            "type": [
              "string",
              "null"
            ]
          },
          "zone": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateBomRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "revision": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `draft`, `active`, `obsolete`."
          }
        }
      },
      "UpdateCartItemRequest": {
        "type": "object",
        "properties": {
          "discount_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal discount amount as a string."
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "unit_price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal unit price as a string."
          }
        }
      },
      "UpdateChannelRequest": {
        "type": "object",
        "properties": {
          "integration": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateCustomerRequest": {
        "type": "object",
        "description": "Request body for `PATCH /api/v1/customers/:id`.",
        "properties": {
          "accepts_marketing": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateFieldMappingRequest": {
        "type": "object",
        "properties": {
          "destination_field": {
            "type": [
              "string",
              "null"
            ]
          },
          "fallback": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "template": {
            "type": [
              "string",
              "null"
            ]
          },
          "transform": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateFixedAssetRequest": {
        "type": "object",
        "properties": {
          "category": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "salvage_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal salvage value as a string."
          },
          "useful_life_months": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "UpdateIntegrationMappingRequest": {
        "type": "object",
        "properties": {
          "internal_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "UpdatePriceLevelRequest": {
        "type": "object",
        "properties": {
          "adjustment_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "adjustment_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateProductRequest": {
        "type": "object",
        "description": "Request body for `PATCH /api/v1/products/:id`.",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdatePurchaseOrderRequest": {
        "type": "object",
        "properties": {
          "discount_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal discount amount as a string."
          },
          "expected_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "ship_to_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipping_cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal shipping cost as a string."
          },
          "supplier_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal tax amount as a string."
          }
        }
      },
      "UpdateRevenueContractRequest": {
        "type": "object",
        "properties": {
          "effective_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO date (`YYYY-MM-DD`)."
          },
          "invoice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `draft`, `active`, `completed`, `cancelled`."
          }
        }
      },
      "UpdateSupplierRequest": {
        "type": "object",
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 4217 currency code."
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "lead_time_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "minimum_order": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal minimum order amount as a string."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateWarehouseRequest": {
        "type": "object",
        "properties": {
          "address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WarehouseAddressBody"
              }
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateWorkOrderRequest": {
        "type": "object",
        "properties": {
          "assigned_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `low`, `normal`, `high`, `urgent`."
          },
          "quantity_to_build": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal quantity as a string."
          },
          "scheduled_end": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "scheduled_start": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 timestamp."
          },
          "work_center_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "VendorCreditListResponse": {
        "type": "object",
        "required": [
          "vendor_credits",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "vendor_credits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VendorCreditResponse"
            }
          }
        }
      },
      "VendorCreditResponse": {
        "type": "object",
        "required": [
          "id",
          "number",
          "supplier_id",
          "amount",
          "remaining",
          "currency",
          "status"
        ],
        "properties": {
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "remaining": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          }
        }
      },
      "VendorReturnListResponse": {
        "type": "object",
        "required": [
          "vendor_returns",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "vendor_returns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VendorReturnResponse"
            }
          }
        }
      },
      "VendorReturnResponse": {
        "type": "object",
        "required": [
          "id",
          "number",
          "supplier_id",
          "status",
          "total_credit",
          "credit_generated",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "credit_generated": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "supplier_id": {
            "type": "string"
          },
          "total_credit": {
            "type": "string"
          }
        }
      },
      "VersionResponse": {
        "type": "object",
        "description": "Response body for `GET /version` — build & release metadata.\n\nAll fields except `version` are best-effort: they're set at compile\ntime from environment variables the release pipeline injects. When a\nbuild runs without those variables set (e.g. local `cargo build`),\nthe corresponding fields are `None` and operators can interpret that\nas \"this binary did not come from a verified release pipeline\".\n\nThe companion admin route (Phase 4.4) consumes this endpoint to\ndisplay sigstore-verified release information so operators can audit\nwhat's actually running in production.",
        "required": [
          "version",
          "signed"
        ],
        "properties": {
          "built_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "RFC 3339 build timestamp, if injected via\n`STATESET_BUILD_TIMESTAMP` at compile time."
          },
          "git_commit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Git commit SHA (full or short) of the build, if injected via\n`GITHUB_SHA` at compile time. `None` for unverified local builds."
          },
          "git_ref": {
            "type": [
              "string",
              "null"
            ],
            "description": "Git branch or tag name, if injected via `GITHUB_REF_NAME`."
          },
          "release_tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "Release tag (e.g. `v1.0.3`) if this binary came from a tagged\nrelease. Distinct from `git_ref` because release builds set this\nexplicitly via `STATESET_RELEASE_TAG`."
          },
          "signed": {
            "type": "boolean",
            "description": "Whether this binary's release artifacts were signed via sigstore.\n`true` when the release pipeline injected `STATESET_SIGNED=true`;\n`false` (the default) for local builds, dev builds, and any\nrelease where signing was skipped or failed."
          },
          "version": {
            "type": "string",
            "description": "Package version from `Cargo.toml` (always present)."
          }
        }
      },
      "WarehouseAddressBody": {
        "type": "object",
        "properties": {
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "street1": {
            "type": [
              "string",
              "null"
            ]
          },
          "street2": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "WarehouseListResponse": {
        "type": "object",
        "required": [
          "warehouses",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "warehouses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarehouseResponse"
            }
          }
        }
      },
      "WarehouseResponse": {
        "type": "object",
        "required": [
          "id",
          "code",
          "name",
          "warehouse_type",
          "is_active",
          "created_at"
        ],
        "properties": {
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_type": {
            "type": "string"
          }
        }
      },
      "WarrantyListResponse": {
        "type": "object",
        "required": [
          "warranties",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "warranties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarrantyResponse"
            }
          }
        }
      },
      "WarrantyResponse": {
        "type": "object",
        "required": [
          "id",
          "warranty_number",
          "order_id",
          "product_id",
          "warranty_type",
          "status",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "warranty_number": {
            "type": "string"
          },
          "warranty_type": {
            "type": "string"
          }
        }
      },
      "WaveListResponse": {
        "type": "object",
        "required": [
          "waves",
          "total"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "waves": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WaveResponse"
            }
          }
        }
      },
      "WaveResponse": {
        "type": "object",
        "required": [
          "id",
          "wave_number",
          "warehouse_id",
          "status",
          "order_count",
          "pick_count",
          "completed_pick_count",
          "priority",
          "created_at"
        ],
        "properties": {
          "completed_pick_count": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "order_count": {
            "type": "integer",
            "format": "int32"
          },
          "pick_count": {
            "type": "integer",
            "format": "int32"
          },
          "priority": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "wave_number": {
            "type": "string"
          }
        }
      },
      "WishlistItemResponse": {
        "type": "object",
        "description": "A single item in a wishlist.",
        "required": [
          "product_id",
          "added_at"
        ],
        "properties": {
          "added_at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WishlistListResponse": {
        "type": "object",
        "description": "Response body for `GET /api/v1/wishlists` (list).",
        "required": [
          "wishlists",
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "offset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "wishlists": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WishlistResponse"
            }
          }
        }
      },
      "WishlistResponse": {
        "type": "object",
        "description": "Response body for a single wishlist.",
        "required": [
          "id",
          "customer_id",
          "name",
          "is_public",
          "items",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_public": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WishlistItemResponse"
            }
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkOrderListResponse": {
        "type": "object",
        "required": [
          "work_orders",
          "total",
          "has_more"
        ],
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether more results are available after this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor for fetching the next page (keyset pagination)."
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "work_orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderResponse"
            }
          }
        }
      },
      "WorkOrderResponse": {
        "type": "object",
        "required": [
          "id",
          "work_order_number",
          "product_id",
          "status",
          "priority",
          "quantity_to_build",
          "quantity_completed",
          "created_at"
        ],
        "properties": {
          "bom_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "quantity_completed": {
            "type": "string"
          },
          "quantity_to_build": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "work_order_number": {
            "type": "string"
          }
        }
      },
      "WorkOrderTaskListResponse": {
        "type": "object",
        "required": [
          "tasks",
          "total"
        ],
        "properties": {
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkOrderTaskResponse"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "WorkOrderTaskResponse": {
        "type": "object",
        "required": [
          "id",
          "work_order_id",
          "sequence",
          "task_name",
          "status"
        ],
        "properties": {
          "actual_hours": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimated_hours": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "sequence": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "task_name": {
            "type": "string"
          },
          "work_order_id": {
            "type": "string"
          }
        }
      },
      "WorkOrdersRequest": {
        "type": "object",
        "required": [
          "work_order_ids"
        ],
        "properties": {
          "work_order_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WriteOffFixedAssetRequest": {
        "type": "object",
        "required": [
          "date"
        ],
        "properties": {
          "date": {
            "type": "string",
            "description": "ISO date (`YYYY-MM-DD`)."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ZeroValuationItemResponse": {
        "type": "object",
        "required": [
          "sku",
          "quantity"
        ],
        "properties": {
          "quantity": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "health",
      "description": "Health check endpoints"
    },
    {
      "name": "orders",
      "description": "Order lifecycle management"
    },
    {
      "name": "customers",
      "description": "Customer management"
    },
    {
      "name": "products",
      "description": "Product catalog"
    },
    {
      "name": "inventory",
      "description": "Stock and inventory management"
    },
    {
      "name": "returns",
      "description": "Return request processing"
    },
    {
      "name": "shipments",
      "description": "Shipment tracking and management"
    },
    {
      "name": "payments",
      "description": "Payment transaction management"
    },
    {
      "name": "invoices",
      "description": "Invoice management"
    },
    {
      "name": "reviews",
      "description": "Product review management"
    },
    {
      "name": "wishlists",
      "description": "Customer wishlist management"
    },
    {
      "name": "gift_cards",
      "description": "Gift card management"
    },
    {
      "name": "loyalty",
      "description": "Loyalty program management"
    },
    {
      "name": "negotiations",
      "description": "Agent-to-agent price negotiation"
    },
    {
      "name": "a2a",
      "description": "Agent-to-agent messaging and credit terms"
    },
    {
      "name": "subscriptions",
      "description": "Recurring subscription management"
    },
    {
      "name": "store_credits",
      "description": "Store credit management"
    },
    {
      "name": "promotions",
      "description": "Promotion and discount management"
    },
    {
      "name": "currency",
      "description": "Exchange rates and currency conversion"
    },
    {
      "name": "warranties",
      "description": "Product warranty management"
    },
    {
      "name": "segments",
      "description": "Customer segment management"
    },
    {
      "name": "shipping",
      "description": "Shipping zone management"
    },
    {
      "name": "events",
      "description": "Real-time event streaming"
    },
    {
      "name": "activity_logs",
      "description": "Record-level activity history"
    },
    {
      "name": "channels",
      "description": "Sales channel management"
    },
    {
      "name": "companies",
      "description": "B2B company account management"
    },
    {
      "name": "edi_documents",
      "description": "EDI document exchange"
    },
    {
      "name": "inbound_shipments",
      "description": "Inbound shipment receiving"
    },
    {
      "name": "integration_field_mappings",
      "description": "Integration field-level mappings"
    },
    {
      "name": "integration_mappings",
      "description": "External integration record mappings"
    },
    {
      "name": "payment_obligations",
      "description": "Payment obligation tracking"
    },
    {
      "name": "prepayments",
      "description": "Customer and vendor prepayments"
    },
    {
      "name": "price_levels",
      "description": "Customer price level management"
    },
    {
      "name": "price_schedules",
      "description": "Scheduled pricing management"
    },
    {
      "name": "print_stations",
      "description": "Warehouse print station management"
    },
    {
      "name": "production_batches",
      "description": "Production batch tracking"
    },
    {
      "name": "purgatory",
      "description": "Quarantined record review"
    },
    {
      "name": "reports",
      "description": "Computed business reports"
    },
    {
      "name": "stock_snapshots",
      "description": "Point-in-time inventory snapshots"
    },
    {
      "name": "supplier_skus",
      "description": "Supplier SKU catalog"
    },
    {
      "name": "topology_snapshots",
      "description": "Network topology snapshots"
    },
    {
      "name": "transfer_orders",
      "description": "Inter-warehouse transfer orders"
    },
    {
      "name": "units_of_measure",
      "description": "Unit of measure definitions"
    },
    {
      "name": "vendor_credits",
      "description": "Vendor credit management"
    },
    {
      "name": "vendor_returns",
      "description": "Return-to-vendor processing"
    },
    {
      "name": "purchase_orders",
      "description": "Supplier procurement: purchase order lifecycle (draft → approval → send → acknowledge → receive → complete) and supplier management"
    },
    {
      "name": "general_ledger",
      "description": "Chart of accounts, journal entries, accounting periods, and financial reports (trial balance, balance sheet, income statement)"
    },
    {
      "name": "accounts_payable",
      "description": "Supplier bills, AP payments and allocations, payment runs, and AP aging"
    },
    {
      "name": "accounts_receivable",
      "description": "AR aging, payment application, credit memos, write-offs, dunning, and customer statements"
    },
    {
      "name": "warehouse",
      "description": "Warehouses, storage locations, and location-level inventory (adjust/move)"
    },
    {
      "name": "fulfillment",
      "description": "Outbound fulfillment: waves, pick tasks, pack tasks and cartons, ship tasks"
    },
    {
      "name": "receiving",
      "description": "Inbound receiving: goods receipts, item receipt, and put-away tasks"
    },
    {
      "name": "work_orders",
      "description": "Manufacturing work order lifecycle and shop-floor tasks"
    },
    {
      "name": "quality",
      "description": "Quality control: inspections, non-conformance reports, and quality holds"
    },
    {
      "name": "bom",
      "description": "Bills of materials: BOM revisions, components, and status control"
    },
    {
      "name": "lots",
      "description": "Lot/batch tracking: creation, consumption, reservations, quarantine, and expiry queries"
    },
    {
      "name": "serials",
      "description": "Serial number tracking: creation, lookup, reservations, and lifecycle transitions"
    },
    {
      "name": "fixed_assets",
      "description": "Fixed-asset register: acquisition, depreciation schedules, disposal, and write-off"
    },
    {
      "name": "revenue_recognition",
      "description": "Revenue contracts, performance obligations, and recognition schedules (ASC 606)"
    },
    {
      "name": "carts",
      "description": "Cart and checkout sessions: items, shipping, payment, completion"
    },
    {
      "name": "backorders",
      "description": "Backorder creation, fulfillment, and cancellation"
    }
  ]
}
