{
  "openapi": "3.0.3",
  "info": {
    "title": "ELPOS external business API",
    "version": "1.3.0",
    "description": "Native Odoo 20 CE CRM, Sales, Purchase, Accounting, Inventory and POS export integration. One revocable hashed random Bearer token per configured company/service user, scoped permissions plus native ACLs. No session fallback/CORS. Server host/dbfilter selects database; no database selector. HTTPS required outside local development. Synthetic IDs/examples only. Existing resource writes create drafts. Additive /sales records complete manual POS or confirmed/invoiced sales; no provider verification, no automatic sale delivery validation. Lists are bounded ID-cursor scans, not snapshots or deletion/nested-line change feeds; periodically reconcile complete scans. Document details may truncate after 100 lines/payments; inspect flags. No production credentials/customer data in documentation or query strings. Contacts/products/leads include archived records with active=false for reconciliation. Historical documents and authorized replays remain readable when their contact/product is archived; new document references must be active. Additive /delivery namespace supports actual driver stock, accepted-quantity credit/partial sales, later manual payments, linked returns and separate refunds, and optional external eKassa metadata owned by ELCRM. No provider calls or independent fiscal verification. Existing1.1 behavior remains unchanged. API1.3 adds native read-only pricing, accounting, analytics, stock valuation, POS session/cash movement and exact-customer export. Document /lines and POS /payments cursors retrieve all authorized child rows beyond the embedded100. Current debt is posted receivable residuals, separate from POS purchase totals; never add invoice-linked POS totals to debt. ID scans are not snapshots; repeat complete scans for reconciliation. Trial balance includes all posted history before date_from, with no implicit fiscal-year reset. Amounts use company currency unless a native currency field explicitly says otherwise. POS closing_difference means closing minus opening, not counted-versus-expected cash variance; cash_variance is available only for closed sessions with saved ce_mobile_api close evidence; otherwise null. Raw POS statement lines include corrections. stock-valuations exports product.value adjustments; value_kind distinguishes move_total from unit_cost; current move values are on stock-moves."
  },
  "servers": [
    {
      "url": "/api/elpos/v1",
      "description": "Same origin"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Authenticated API/company status",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ping": {
      "get": {
        "operationId": "ping",
        "summary": "Authenticated API/company status",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/contacts": {
      "get": {
        "operationId": "listContact",
        "summary": "List contacts",
        "description": "Requires contacts:read and native service-user access. Exact configured company; contacts/products may be shared. Includes archived records; inspect active flag.",
        "tags": [
          "contacts"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createContact",
        "summary": "Create contacts",
        "tags": [
          "contacts"
        ],
        "description": "Requires contacts:write plus native create/read access. JSON body <=65536 bytes, <=100 lines. Native amounts/taxes/defaults. No confirm/post/pay/validate/delete. Required integration-wide key; canonical body and route must remain unchanged on retry. Current authorization and child access are checked on replay. First creation/journal atomic; validation failure rolls both back.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreate"
              },
              "example": {
                "name": "Example customer",
                "email": "customer@example.invalid"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Native record created; replayed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactCreated"
                }
              }
            }
          },
          "200": {
            "description": "Saved response, replayed=true; original record remains unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactCreated"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/contacts/{id}": {
      "get": {
        "operationId": "getContact",
        "summary": "Get contacts detail",
        "description": "Requires contacts:read and native service-user access. Exact configured company; contacts/products may be shared. Document details have at most 100 lines and POS 100 payments; inspect truncation flags. Includes archived records; inspect active flag.",
        "tags": [
          "contacts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/products": {
      "get": {
        "operationId": "listProduct",
        "summary": "List products",
        "description": "Requires products:read and native service-user access. Exact configured company; contacts/products may be shared. Includes archived records; inspect active flag.",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/products/{id}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Get products detail",
        "description": "Requires products:read and native service-user access. Exact configured company; contacts/products may be shared. Document details have at most 100 lines and POS 100 payments; inspect truncation flags. Includes archived records; inspect active flag.",
        "tags": [
          "products"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stock": {
      "get": {
        "operationId": "listStock",
        "summary": "List stock",
        "description": "Requires stock:read and native service-user access. Exact configured company; contacts/products may be shared. Existing stock.quant rows at internal locations; on-hand/reserved quantities only.",
        "tags": [
          "stock"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stock/{id}": {
      "get": {
        "operationId": "getStock",
        "summary": "Get stock detail",
        "description": "Requires stock:read and native service-user access. Exact configured company; contacts/products may be shared. Existing stock.quant rows at internal locations; on-hand/reserved quantities only. Document details have at most 100 lines and POS 100 payments; inspect truncation flags.",
        "tags": [
          "stock"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/leads": {
      "get": {
        "operationId": "listLead",
        "summary": "List leads",
        "description": "Requires leads:read and native service-user access. Exact configured company; contacts/products may be shared. Includes archived records; inspect active flag.",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createLead",
        "summary": "Create leads",
        "tags": [
          "leads"
        ],
        "description": "Requires leads:write plus native create/read access. JSON body <=65536 bytes, <=100 lines. Native amounts/taxes/defaults. No confirm/post/pay/validate/delete. Required integration-wide key; canonical body and route must remain unchanged on retry. Current authorization and child access are checked on replay. First creation/journal atomic; validation failure rolls both back. New referenced contacts/products must be active. Archived references do not prevent authorized historical reads/replays.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadCreate"
              },
              "example": {
                "name": "Example CRM request",
                "partner_id": 10
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Native record created; replayed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadCreated"
                }
              }
            }
          },
          "200": {
            "description": "Saved response, replayed=true; original record remains unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadCreated"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/leads/{id}": {
      "get": {
        "operationId": "getLead",
        "summary": "Get leads detail",
        "description": "Requires leads:read and native service-user access. Exact configured company; contacts/products may be shared. Document details have at most 100 lines and POS 100 payments; inspect truncation flags. Includes archived records; inspect active flag.",
        "tags": [
          "leads"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sale-orders": {
      "get": {
        "operationId": "listSaleOrder",
        "summary": "List sale-orders",
        "description": "Requires sale-orders:read and native service-user access. Exact configured company; contacts/products may be shared.",
        "tags": [
          "sale-orders"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaleOrderPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSaleOrder",
        "summary": "Create sale-orders native draft",
        "tags": [
          "sale-orders"
        ],
        "description": "Requires sale-orders:write plus native create/read access. JSON body <=65536 bytes, <=100 lines. Native amounts/taxes/defaults. No confirm/post/pay/validate/delete. Required integration-wide key; canonical body and route must remain unchanged on retry. Current authorization and child access are checked on replay. First creation/journal atomic; validation failure rolls both back. New referenced contacts/products must be active. Archived references do not prevent authorized historical reads/replays.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaleOrderCreate"
              },
              "example": {
                "partner_id": 10,
                "client_order_ref": "crm-example-001",
                "lines": [
                  {
                    "product_id": 20,
                    "quantity": 2,
                    "price_unit": 100
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Native record created; replayed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaleOrderCreated"
                }
              }
            }
          },
          "200": {
            "description": "Saved response, replayed=true; original record remains unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaleOrderCreated"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sale-orders/{id}": {
      "get": {
        "operationId": "getSaleOrder",
        "summary": "Get sale-orders detail",
        "description": "Requires sale-orders:read and native service-user access. Exact configured company; contacts/products may be shared. Document details have at most 100 lines and POS 100 payments; inspect truncation flags.",
        "tags": [
          "sale-orders"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SaleOrderDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchase-orders": {
      "get": {
        "operationId": "listPurchaseOrder",
        "summary": "List purchase-orders",
        "description": "Requires purchase-orders:read and native service-user access. Exact configured company; contacts/products may be shared.",
        "tags": [
          "purchase-orders"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createPurchaseOrder",
        "summary": "Create purchase-orders native draft",
        "tags": [
          "purchase-orders"
        ],
        "description": "Requires purchase-orders:write plus native create/read access. JSON body <=65536 bytes, <=100 lines. Native amounts/taxes/defaults. No confirm/post/pay/validate/delete. Required integration-wide key; canonical body and route must remain unchanged on retry. Current authorization and child access are checked on replay. First creation/journal atomic; validation failure rolls both back. New referenced contacts/products must be active. Archived references do not prevent authorized historical reads/replays.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseOrderCreate"
              },
              "example": {
                "partner_id": 10,
                "partner_ref": "erp-example-001",
                "lines": [
                  {
                    "product_id": 20,
                    "quantity": 2,
                    "price_unit": 80
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Native record created; replayed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderCreated"
                }
              }
            }
          },
          "200": {
            "description": "Saved response, replayed=true; original record remains unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderCreated"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/purchase-orders/{id}": {
      "get": {
        "operationId": "getPurchaseOrder",
        "summary": "Get purchase-orders detail",
        "description": "Requires purchase-orders:read and native service-user access. Exact configured company; contacts/products may be shared. Document details have at most 100 lines and POS 100 payments; inspect truncation flags.",
        "tags": [
          "purchase-orders"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOrderDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "operationId": "listInvoice",
        "summary": "List invoices",
        "description": "Requires invoices:read and native service-user access. Exact configured company; contacts/products may be shared.",
        "tags": [
          "invoices"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createInvoice",
        "summary": "Create invoices native draft",
        "tags": [
          "invoices"
        ],
        "description": "Requires invoices:write plus native create/read access. JSON body <=65536 bytes, <=100 lines. Native amounts/taxes/defaults. No confirm/post/pay/validate/delete. Required integration-wide key; canonical body and route must remain unchanged on retry. Current authorization and child access are checked on replay. First creation/journal atomic; validation failure rolls both back. New referenced contacts/products must be active. Archived references do not prevent authorized historical reads/replays.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceCreate"
              },
              "example": {
                "partner_id": 10,
                "move_type": "out_invoice",
                "ref": "crm-example-001",
                "lines": [
                  {
                    "product_id": 20,
                    "quantity": 2,
                    "price_unit": 100
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Native record created; replayed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCreated"
                }
              }
            }
          },
          "200": {
            "description": "Saved response, replayed=true; original record remains unique.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceCreated"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{id}": {
      "get": {
        "operationId": "getInvoice",
        "summary": "Get invoices detail",
        "description": "Requires invoices:read and native service-user access. Exact configured company; contacts/products may be shared. Document details have at most 100 lines and POS 100 payments; inspect truncation flags.",
        "tags": [
          "invoices"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments": {
      "get": {
        "operationId": "listPayment",
        "summary": "List payments",
        "description": "Requires payments:read and native service-user access. Exact configured company; contacts/products may be shared. Native account.payment only; POS payments are embedded in pos-orders detail.",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/payments/{id}": {
      "get": {
        "operationId": "getPayment",
        "summary": "Get payments detail",
        "description": "Requires payments:read and native service-user access. Exact configured company; contacts/products may be shared. Native account.payment only; POS payments are embedded in pos-orders detail. Document details have at most 100 lines and POS 100 payments; inspect truncation flags.",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pos-orders": {
      "get": {
        "operationId": "listPOSOrder",
        "summary": "List pos-orders",
        "description": "Requires pos-orders:read and native service-user access. Exact configured company; contacts/products may be shared. Native POS states/payments; export does not imply accounting session-close posting.",
        "tags": [
          "pos-orders"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Inclusive UTC YYYY-MM-DD HH:MM:SS parent write_date filter. Not a snapshot, deletion feed, or nested-line change feed. Restart scans at after_id=0 with overlap; periodically full-scan and reconcile.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$"
            },
            "example": "2026-10-01 00:00:00"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/POSOrderPage"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pos-orders/{id}": {
      "get": {
        "operationId": "getPOSOrder",
        "summary": "Get pos-orders detail",
        "description": "Requires pos-orders:read and native service-user access. Exact configured company; contacts/products may be shared. Native POS states/payments; export does not imply accounting session-close posting. Document details have at most 100 lines and POS 100 payments; inspect truncation flags.",
        "tags": [
          "pos-orders"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/POSOrderDetail"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales": {
      "post": {
        "operationId": "createCompletedSale",
        "summary": "Record a complete manual POS or invoiced sale",
        "tags": [
          "sales"
        ],
        "description": "Requires sales:write plus native read/create/write rights. Manual recording only: provider_verified is always false. POS uses the explicitly opened locked session and native POS payments; configured fiscal hooks are asynchronous and current.fiscal reports actual native state. Sale mode confirms the order, posts one customer invoice, registers inbound manual payments and reconciles receivables. Native invoice_payment_state may remain in_payment pending bank reconciliation. Native deliveries are not auto-validated; inspect current.pickings. Positive untracked ordinary products only, no combos, rewards, refunds, provider/terminal/pay-later/change/overpayments. POS HR, restaurant, presets and cash rounding configurations are unsupported. Sale products must invoice ordered quantity. Payments must exactly equal native taxes-inclusive total in native currency precision. All documents, payment effects and delivery journal commit or roll back together. Original record is immutable; current is regenerated on first response and replay under current ACL/company and original-reference checks. Retry unknown/lost responses with the same key/body. GET detail is limited to sales created by this integration.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletedSaleCreate"
              },
              "examples": {
                "pos": {
                  "value": {
                    "mode": "pos",
                    "config_id": 10,
                    "session_id": 12,
                    "lines": [
                      {
                        "product_id": 20,
                        "quantity": 2,
                        "price_unit": 100
                      }
                    ],
                    "payments": [
                      {
                        "payment_method_id": 5,
                        "amount": 200
                      }
                    ],
                    "expected_total": 200
                  }
                },
                "sale": {
                  "value": {
                    "mode": "sale",
                    "partner_id": 10,
                    "lines": [
                      {
                        "product_id": 20,
                        "quantity": 2,
                        "price_unit": 100
                      }
                    ],
                    "payments": [
                      {
                        "journal_id": 4,
                        "payment_method_line_id": 6,
                        "amount": 200
                      }
                    ],
                    "expected_total": 200
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Native sale and manual payment recorded; immutable record and actual current states; replayed=false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompletedSaleResult"
                }
              }
            }
          },
          "200": {
            "description": "Original record plus freshly checked actual current native states; replayed=true.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompletedSaleResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales-options": {
      "get": {
        "operationId": "salesOptions",
        "summary": "Discover permitted POS sessions or manual accounting journals",
        "tags": [
          "sales"
        ],
        "description": "Requires sales:read and native ACLs. mode defaults to pos. POS items contain config ID, opened session, supported flag and manual payment methods. Sale items contain journal ID/type/currency and inbound manual method-line IDs with outstanding accounts. Options are advisory: POST rechecks current configuration, company, currency, methods and permissions. Results are ID-paginated; continue even if an item has no supported methods. Manual recording does not verify provider collection.",
        "parameters": [
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pos",
                "sale"
              ],
              "default": "pos"
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Permitted company-scoped native options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesOptions"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sales/{mode}/{id}": {
      "get": {
        "operationId": "completedSaleDetail",
        "summary": "Read original delivery plus actual current native sale states",
        "tags": [
          "sales"
        ],
        "description": "Requires sales:read plus current native read ACL/rules on original and current referenced records. Restricted to this integration-created sales. No mutation; record remains immutable and current reports actual order/payment/invoice/fiscal/picking states.",
        "parameters": [
          {
            "name": "mode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pos",
                "sale"
              ]
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Original record and actual native current states.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompletedSaleResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/options": {
      "get": {
        "operationId": "deliveryOptions",
        "summary": "Discover fixed namespace/native delivery configuration",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:read and native ACL. Namespace is assigned in Settings, never client-selected. No secrets. Configuration/mapping inputs need delivery:configure. Company-currency and one-step ordinary stock only.",
        "responses": {
          "200": {
            "description": "Permitted fixed namespace options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryOptions"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/lookup": {
      "get": {
        "operationId": "deliveryLookup",
        "summary": "Recover namespace entity/event/attempt and actual native states",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:read. Exactly one selector: kind+external_id OR event_id OR idempotency_key. Unknown/failed-rolled-back operations are404. Never creates effects. Rechecks all original/current native permissions, including after token replacement.",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "configuration",
                "product",
                "customer",
                "order",
                "trip",
                "load",
                "stock-return",
                "trip-close",
                "delivery-result",
                "payment",
                "return",
                "refund",
                "receipt"
              ]
            }
          },
          {
            "name": "external_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            }
          },
          {
            "name": "idempotency_key",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Immutable original result and current native settlement/stock/fiscal states.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/configuration": {
      "post": {
        "operationId": "deliveryConfiguration",
        "summary": "Delivery configuration",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:configure. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryConfigurationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/bindings": {
      "post": {
        "operationId": "deliveryBindings",
        "summary": "Delivery bindings",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:configure. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryBindingCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/orders": {
      "post": {
        "operationId": "deliveryOrders",
        "summary": "Delivery orders",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Native confirmed planned order uses skip_procurement. No invoice, debt or stock effect until acceptance. item_id is original CRM ORDER LINE UUID, product_external_id is distinct catalog mapping. Version/prices/UoM/taxes immutable.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryOrderCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/trips": {
      "post": {
        "operationId": "deliveryTrips",
        "summary": "Delivery trips",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryTripCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/trips/{trip_external_id}/loads": {
      "post": {
        "operationId": "deliveryTripsLoads",
        "summary": "Delivery trips/{trip_external_id}/loads",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          },
          {
            "name": "trip_external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryStockCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/trips/{trip_external_id}/stock-returns": {
      "post": {
        "operationId": "deliveryTripsStockReturns",
        "summary": "Delivery trips/{trip_external_id}/stock-returns",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Records actual returned original-line quantities, never invents return on trip close. Unaccepted goods create no credit/refund.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          },
          {
            "name": "trip_external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryStockCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/trips/{trip_external_id}/close": {
      "post": {
        "operationId": "deliveryTripsClose",
        "summary": "Delivery trips/{trip_external_id}/close",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Kind trip-close; never auto-return stock. Both physical quant and original-line allocation balances must be zero, otherwise409 trip_not_empty.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          },
          {
            "name": "trip_external_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryTripClose"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/delivery-results": {
      "post": {
        "operationId": "deliveryDeliveryResults",
        "summary": "Delivery delivery-results",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Accepted quantities create exactly one completed driver-to-customer picking plus posted partial native invoice at original line price/tax. Allzero refusal creates no financial/stock documents. Optional payments none/partial/full; embedded payment needs delivery:payments. Grossaccepted cannot exceedplan or loaded line allowance. Example10cakes*500 load10,accept8,invoice4000,collect3000=>debt1000,driver2; explicit stock-return2 returnsWH,close onlyzero.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryResultCreate"
              },
              "examples": {
                "credit1000": {
                  "summary": "Accepted invoice1000 with no payment =>debt1000",
                  "value": {
                    "event_id": "event-accept-1",
                    "external_id": "result-1",
                    "order_external_id": "order-1",
                    "order_version": "v1",
                    "trip_external_id": "trip-1",
                    "stop_id": "stop-1",
                    "occurred_at": "2026-10-20T12:00:00Z",
                    "lines": [
                      {
                        "item_id": "crm-order-line-uuid",
                        "accepted_quantity": 1
                      }
                    ],
                    "payments": []
                  }
                },
                "cash400": {
                  "summary": "Invoice1000, cash400 =>debt600",
                  "value": {
                    "event_id": "event-accept-1",
                    "external_id": "result-1",
                    "order_external_id": "order-1",
                    "order_version": "v1",
                    "trip_external_id": "trip-1",
                    "stop_id": "stop-1",
                    "occurred_at": "2026-10-20T12:00:00Z",
                    "lines": [
                      {
                        "item_id": "crm-order-line-uuid",
                        "accepted_quantity": 1
                      }
                    ],
                    "payments": [
                      {
                        "external_id": "cash400",
                        "amount": 400,
                        "journal_id": 10,
                        "payment_method_line_id": 11,
                        "source": "cash_collected",
                        "occurred_at": "2026-10-20T12:00:00Z",
                        "payment_date": "2026-10-20"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/payments": {
      "post": {
        "operationId": "deliveryPayments",
        "summary": "Delivery payments",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:payments. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Explicit allocations create one native inbound manual payment perinvoice allocation under ONE externalpayment/entity, returned payment_ids+allocationmapping. No payment for unconfirmed bank: source elcrm_confirmed_bank needs source_reference+confirmed_at. Native reconciliation residual limits apply.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryPaymentCreate"
              },
              "example": {
                "event_id": "event-bank600",
                "external_id": "bank600",
                "order_external_id": "order-1",
                "currency": "KGS",
                "amount": 600,
                "journal_id": 12,
                "payment_method_line_id": 13,
                "source": "elcrm_confirmed_bank",
                "source_reference": "elcrm-bank-payment-uuid",
                "confirmed_at": "2026-10-20T12:10:00Z",
                "occurred_at": "2026-10-20T12:10:00Z",
                "payment_date": "2026-10-20",
                "allocations": [
                  {
                    "delivery_result_external_id": "result-1",
                    "amount": 600
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/returns": {
      "post": {
        "operationId": "deliveryReturns",
        "summary": "Delivery returns",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:write. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Original accepted moves/line prices/taxes only; native linked customerreturn+partialcreditnote. Credit first clears originalinvoice debt, remaining credit is refundable; no monetary payout.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryReturnCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/refunds": {
      "post": {
        "operationId": "deliveryRefunds",
        "summary": "Delivery refunds",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:refunds. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Separate outbound native manual customerpayment <=locked creditnote residual. No acquirer refund call.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryRefundCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/delivery/fiscal-receipts": {
      "post": {
        "operationId": "deliveryFiscalReceipts",
        "summary": "Delivery fiscal-receipts",
        "tags": [
          "delivery"
        ],
        "description": "Requires delivery:receipts. Strict immutable event_id and stable external_id, namespace-scoped independently of HTTP key/token; Idempotency-Key remains exact route/body identity. Same business intent with fresh event/key creates no second native effect. All returned errors roll back native and technical effects. Current is freshly recomputed, company-currency only,100lines/20payments. No provider/fiscal/acquiring network calls. See DELIVERY_CONTRACT.md. Optional external eKassa report, provider/environment fixed namespace. Separate providerreceipt and register/drive/document uniqueness constraints include environment. Fiscalsign1077 required. Amount/currency must equal native target; no URLfetch/no POS fiscalqueue. reported_by_elcrm,independently_verified=false; absentreceipt awaiting_external ornone.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,128}$"
            },
            "example": "crm-example-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryReceiptCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New native operation and immutable source event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "200": {
            "description": "Same namespace business intent recovered; zero extra native effects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryResult"
                }
              }
            }
          },
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/pricelists": {
      "get": {
        "operationId": "listExportPricelists",
        "summary": "Read native pricelists",
        "description": "Read native pricelists. Requires pricelists:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPricelistsPage"
                }
              }
            }
          }
        }
      }
    },
    "/pricelists/{record_id}": {
      "get": {
        "operationId": "getExportPricelists",
        "summary": "Read one native pricelists",
        "description": "Read one native pricelists. Requires pricelists:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPricelists"
                }
              }
            }
          }
        }
      }
    },
    "/pricelist-rules": {
      "get": {
        "operationId": "listExportPricelistRules",
        "summary": "Read native pricelist-rules",
        "description": "Read native pricelist-rules. Requires pricelist-rules:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pricelist_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPricelistRulesPage"
                }
              }
            }
          }
        }
      }
    },
    "/pricelist-rules/{record_id}": {
      "get": {
        "operationId": "getExportPricelistRules",
        "summary": "Read one native pricelist-rules",
        "description": "Read one native pricelist-rules. Requires pricelist-rules:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPricelistRules"
                }
              }
            }
          }
        }
      }
    },
    "/accounts": {
      "get": {
        "operationId": "listExportAccounts",
        "summary": "Read native accounts",
        "description": "Read native accounts. Requires accounts:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAccountsPage"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{record_id}": {
      "get": {
        "operationId": "getExportAccounts",
        "summary": "Read one native accounts",
        "description": "Read one native accounts. Requires accounts:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAccounts"
                }
              }
            }
          }
        }
      }
    },
    "/journals": {
      "get": {
        "operationId": "listExportJournals",
        "summary": "Read native journals",
        "description": "Read native journals. Requires journals:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournalsPage"
                }
              }
            }
          }
        }
      }
    },
    "/journals/{record_id}": {
      "get": {
        "operationId": "getExportJournals",
        "summary": "Read one native journals",
        "description": "Read one native journals. Requires journals:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournals"
                }
              }
            }
          }
        }
      }
    },
    "/journal-entries": {
      "get": {
        "operationId": "listExportJournalEntries",
        "summary": "Read native journal-entries",
        "description": "Read native journal-entries. Requires journal-entries:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "journal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournalEntriesPage"
                }
              }
            }
          }
        }
      }
    },
    "/journal-entries/{record_id}": {
      "get": {
        "operationId": "getExportJournalEntries",
        "summary": "Read one native journal-entries",
        "description": "Read one native journal-entries. Requires journal-entries:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournalEntries"
                }
              }
            }
          }
        }
      }
    },
    "/journal-items": {
      "get": {
        "operationId": "listExportJournalItems",
        "summary": "Read native journal-items",
        "description": "Read native journal-items. Requires journal-items:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "journal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "move_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournalItemsPage"
                }
              }
            }
          }
        }
      }
    },
    "/journal-items/{record_id}": {
      "get": {
        "operationId": "getExportJournalItems",
        "summary": "Read one native journal-items",
        "description": "Read one native journal-items. Requires journal-items:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournalItems"
                }
              }
            }
          }
        }
      }
    },
    "/analytic-accounts": {
      "get": {
        "operationId": "listExportAnalyticAccounts",
        "summary": "Read native analytic-accounts",
        "description": "Read native analytic-accounts. Requires analytic-accounts:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAnalyticAccountsPage"
                }
              }
            }
          }
        }
      }
    },
    "/analytic-accounts/{record_id}": {
      "get": {
        "operationId": "getExportAnalyticAccounts",
        "summary": "Read one native analytic-accounts",
        "description": "Read one native analytic-accounts. Requires analytic-accounts:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAnalyticAccounts"
                }
              }
            }
          }
        }
      }
    },
    "/analytic-lines": {
      "get": {
        "operationId": "listExportAnalyticLines",
        "summary": "Read native analytic-lines",
        "description": "Read native analytic-lines. Requires analytic-lines:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "partner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAnalyticLinesPage"
                }
              }
            }
          }
        }
      }
    },
    "/analytic-lines/{record_id}": {
      "get": {
        "operationId": "getExportAnalyticLines",
        "summary": "Read one native analytic-lines",
        "description": "Read one native analytic-lines. Requires analytic-lines:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportAnalyticLines"
                }
              }
            }
          }
        }
      }
    },
    "/stock-moves": {
      "get": {
        "operationId": "listExportStockMoves",
        "summary": "Read native stock-moves",
        "description": "Read native stock-moves. Requires stock-moves:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "picking_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStockMovesPage"
                }
              }
            }
          }
        }
      }
    },
    "/stock-moves/{record_id}": {
      "get": {
        "operationId": "getExportStockMoves",
        "summary": "Read one native stock-moves",
        "description": "Read one native stock-moves. Requires stock-moves:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStockMoves"
                }
              }
            }
          }
        }
      }
    },
    "/stock-move-lines": {
      "get": {
        "operationId": "listExportStockMoveLines",
        "summary": "Read native stock-move-lines",
        "description": "Read native stock-move-lines. Requires stock-move-lines:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "move_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "picking_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStockMoveLinesPage"
                }
              }
            }
          }
        }
      }
    },
    "/stock-move-lines/{record_id}": {
      "get": {
        "operationId": "getExportStockMoveLines",
        "summary": "Read one native stock-move-lines",
        "description": "Read one native stock-move-lines. Requires stock-move-lines:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStockMoveLines"
                }
              }
            }
          }
        }
      }
    },
    "/stock-valuations": {
      "get": {
        "operationId": "listExportStockValuations",
        "summary": "Read native stock-valuations",
        "description": "Read native stock-valuations. Requires stock-valuations:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "move_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStockValuationsPage"
                }
              }
            }
          }
        }
      }
    },
    "/stock-valuations/{record_id}": {
      "get": {
        "operationId": "getExportStockValuations",
        "summary": "Read one native stock-valuations",
        "description": "Read one native stock-valuations. Requires stock-valuations:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportStockValuations"
                }
              }
            }
          }
        }
      }
    },
    "/pos-sessions": {
      "get": {
        "operationId": "listExportPosSessions",
        "summary": "Read native pos-sessions",
        "description": "Read native pos-sessions. Requires pos-sessions:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "config_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPosSessionsPage"
                }
              }
            }
          }
        }
      }
    },
    "/pos-sessions/{record_id}": {
      "get": {
        "operationId": "getExportPosSessions",
        "summary": "Read one native pos-sessions",
        "description": "Read one native pos-sessions. Requires pos-sessions:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPosSessions"
                }
              }
            }
          }
        }
      }
    },
    "/pos-cash-movements": {
      "get": {
        "operationId": "listExportPosCashMovements",
        "summary": "Read native pos-cash-movements",
        "description": "Read native pos-cash-movements. Requires pos-cash-movements:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pos_session_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPosCashMovementsPage"
                }
              }
            }
          }
        }
      }
    },
    "/pos-cash-movements/{record_id}": {
      "get": {
        "operationId": "getExportPosCashMovements",
        "summary": "Read one native pos-cash-movements",
        "description": "Read one native pos-cash-movements. Requires pos-cash-movements:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPosCashMovements"
                }
              }
            }
          }
        }
      }
    },
    "/reconciliations": {
      "get": {
        "operationId": "listExportReconciliations",
        "summary": "Read native reconciliations",
        "description": "Read native reconciliations. Requires reconciliations:read and native ACLs; exact integration company or documented shared records. ID cursor is not a snapshot.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "debit_move_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "credit_move_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportReconciliationsPage"
                }
              }
            }
          }
        }
      }
    },
    "/reconciliations/{record_id}": {
      "get": {
        "operationId": "getExportReconciliations",
        "summary": "Read one native reconciliations",
        "description": "Read one native reconciliations. Requires reconciliations:read and native ACLs.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportReconciliations"
                }
              }
            }
          }
        }
      }
    },
    "/sale-orders/{record_id}/lines": {
      "get": {
        "operationId": "listSaleOrdersLines",
        "summary": "All authorized native document lines using ID continuation",
        "description": "All authorized native document lines using ID continuation. Requires sale-orders:read; parent ACL/company is checked on every page.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentLinePage"
                }
              }
            }
          }
        }
      }
    },
    "/purchase-orders/{record_id}/lines": {
      "get": {
        "operationId": "listPurchaseOrdersLines",
        "summary": "All authorized native document lines using ID continuation",
        "description": "All authorized native document lines using ID continuation. Requires purchase-orders:read; parent ACL/company is checked on every page.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentLinePage"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{record_id}/lines": {
      "get": {
        "operationId": "listInvoicesLines",
        "summary": "All authorized native document lines using ID continuation",
        "description": "All authorized native document lines using ID continuation. Requires invoices:read; parent ACL/company is checked on every page.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentLinePage"
                }
              }
            }
          }
        }
      }
    },
    "/pos-orders/{record_id}/lines": {
      "get": {
        "operationId": "listPosOrdersLines",
        "summary": "All authorized native document lines using ID continuation",
        "description": "All authorized native document lines using ID continuation. Requires pos-orders:read; parent ACL/company is checked on every page.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentLinePage"
                }
              }
            }
          }
        }
      }
    },
    "/pos-orders/{record_id}/payments": {
      "get": {
        "operationId": "listPOSOrderPayments",
        "summary": "All authorized native POS payments using ID continuation",
        "description": "All authorized native POS payments using ID continuation. Requires pos-orders:read.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/POSPaymentPage"
                }
              }
            }
          }
        }
      }
    },
    "/journal-entries/{record_id}/lines": {
      "get": {
        "operationId": "listJournalEntryLines",
        "summary": "All authorized native journal entry lines",
        "description": "All authorized native journal entry lines. Requires journal-entries:read and journal-items:read.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJournalItemsPage"
                }
              }
            }
          }
        }
      }
    },
    "/customer-balances": {
      "get": {
        "operationId": "customerBalances",
        "summary": "Current posted receivable residuals for each authorized exact partner; debt=sum positive residuals, credit=absolute sum negative residuals, balance=debt-credit",
        "description": "Current posted receivable residuals for each authorized exact partner; debt=sum positive residuals, credit=absolute sum negative residuals, balance=debt-credit. Contacts with zero debt are included. No historic-as-of debt. Requires contacts:read and journal-items:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerBalancePage"
                }
              }
            }
          }
        }
      }
    },
    "/contacts/{record_id}/ledger": {
      "get": {
        "operationId": "customerLedger",
        "summary": "Exact native partner_id receivable journal items",
        "description": "Exact native partner_id receivable journal items. Date filters apply to transaction rows/period totals; current_summary always uses all current posted residuals. No commercial-partner or child-contact expansion. Requires contacts:read and journal-items:read.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerLedger"
                }
              }
            }
          }
        }
      }
    },
    "/contacts/{record_id}/pos-orders": {
      "get": {
        "operationId": "customerPOSOrders",
        "summary": "POS purchase history for exact native partner_id; excludes anonymous sales and other contacts",
        "description": "POS purchase history for exact native partner_id; excludes anonymous sales and other contacts. Detail and /lines /payments retrieve items and payments; account_move_id may be aggregate, invoice_id only for is_singly_invoiced. Debt is calculated independently from posted receivables. Requires contacts:read and pos-orders:read.",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/POSOrderPage"
                }
              }
            }
          }
        }
      }
    },
    "/trial-balance": {
      "get": {
        "operationId": "trialBalance",
        "summary": "Technical posted ledger trial balance in company currency",
        "description": "Technical posted ledger trial balance in company currency. Opening includes all posted history before date_from for all account types, no fiscal-year reset; period dates inclusive. Complete aggregates per account independent of row cursor. Includes accounts with zero activity; no cross-currency amount_currency sum. Requires accounts:read and journal-items:read.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "after_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "default": 0
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrialBalance"
                }
              }
            }
          }
        }
      }
    },
    "/customer-prices": {
      "get": {
        "operationId": "customerPrices",
        "summary": "Native Odoo20 pricelist unit price for partner/product/quantity/UoM/date",
        "description": "Native Odoo20 pricelist unit price for partner/product/quantity/UoM/date. Uses partner assigned pricelist unless an authorized list is supplied. Price follows native pricelist convention before fiscal-position/final tax processing. Validates all reachable base pricelists (max100) and rules (max1000 per list), with ACL/company checks. Requires pricelists:read and native contact/product/pricelist access.",
        "parameters": [
          {
            "name": "partner_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "product_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "exclusiveMinimum": true,
              "minimum": 0
            }
          },
          {
            "name": "pricelist_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "uom_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Valid Bearer token required; session cookies never authenticate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Valid Bearer token required; session cookies never authenticate."
                  }
                }
              }
            }
          },
          "403": {
            "description": "Missing API scope or native Odoo ACL/rule.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "Missing API scope or native Odoo ACL/rule."
                  }
                }
              }
            }
          },
          "404": {
            "description": "Absent record, foreign company, or inaccessible record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Absent record, foreign company, or inaccessible record."
                  }
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different canonical body or route.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Idempotency-Key already used with a different canonical body or route."
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid JSON, request fields, bounds, or native business configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "Invalid JSON, request fields, bounds, or native business configuration."
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal failure; transaction rolled back, no details disclosed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal failure; transaction rolled back, no details disclosed."
                  }
                }
              }
            }
          },
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerPrice"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "elpos_<integration-id>_<random-secret>",
        "description": "Raw generated token. The system stores SHA-256 only; rotate/disable to revoke. Use Authorization header only."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 200
              },
              "message": {
                "type": "string",
                "maxLength": 1000
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Health": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "api_version": {
            "type": "string",
            "enum": [
              "1"
            ]
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 200
            }
          },
          "writes": {
            "type": "string",
            "enum": [
              "native_drafts_only"
            ]
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          },
          "sales_writes": {
            "type": "string",
            "enum": [
              "native_manual_sales"
            ]
          },
          "delivery_api_version": {
            "type": "string",
            "enum": [
              "1.2"
            ]
          },
          "accounting_api_version": {
            "type": "string",
            "enum": [
              "1.3"
            ]
          }
        },
        "required": [
          "api_version",
          "company_id",
          "capabilities",
          "writes",
          "currency",
          "accounting_api_version"
        ]
      },
      "ContactCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "email": {
            "type": "string",
            "maxLength": 254
          },
          "phone": {
            "type": "string",
            "maxLength": 80
          },
          "street": {
            "type": "string",
            "maxLength": 1000
          },
          "city": {
            "type": "string",
            "maxLength": 200
          },
          "zip": {
            "type": "string",
            "maxLength": 40
          },
          "vat": {
            "type": "string",
            "maxLength": 80
          }
        },
        "required": [
          "name"
        ]
      },
      "LeadCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "email_from": {
            "type": "string",
            "maxLength": 254
          },
          "phone": {
            "type": "string",
            "maxLength": 80
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          }
        },
        "required": [
          "name"
        ]
      },
      "SaleLineCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": true,
            "minimum": 0,
            "maximum": 1000000000000
          },
          "price_unit": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "discount": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "product_id",
          "quantity"
        ]
      },
      "PurchaseLineCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": true,
            "minimum": 0,
            "maximum": 1000000000000
          },
          "price_unit": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          }
        },
        "required": [
          "product_id",
          "quantity"
        ]
      },
      "InvoiceLineCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": true,
            "minimum": 0,
            "maximum": 1000000000000
          },
          "price_unit": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "discount": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "product_id",
          "quantity"
        ]
      },
      "DocumentLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "name": {
            "type": "string",
            "maxLength": 100000
          },
          "quantity": {
            "type": "number"
          },
          "price_unit": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "price_subtotal": {
            "type": "number"
          },
          "price_total": {
            "type": "number"
          },
          "refunded_orderline_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "product_id",
          "name",
          "quantity",
          "price_unit",
          "price_subtotal",
          "price_total"
        ]
      },
      "POSPayment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount": {
            "type": "number"
          },
          "payment_method_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_date": {
            "type": "string",
            "maxLength": 19
          }
        },
        "required": [
          "id",
          "amount",
          "payment_method_id",
          "payment_date"
        ]
      },
      "SaleOrderCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/SaleLineCreate"
            }
          },
          "client_order_ref": {
            "type": "string",
            "maxLength": 2000
          },
          "note": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "partner_id",
          "lines"
        ]
      },
      "PurchaseOrderCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/PurchaseLineCreate"
            }
          },
          "partner_ref": {
            "type": "string",
            "maxLength": 2000
          },
          "note": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "partner_id",
          "lines"
        ]
      },
      "InvoiceCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/InvoiceLineCreate"
            }
          },
          "move_type": {
            "type": "string",
            "enum": [
              "out_invoice",
              "in_invoice"
            ]
          },
          "ref": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "partner_id",
          "lines",
          "move_type"
        ]
      },
      "Contact": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "street": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "vat": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "email",
          "phone",
          "street",
          "city",
          "zip",
          "vat",
          "company_id",
          "active"
        ]
      },
      "ContactDetail": {
        "$ref": "#/components/schemas/Contact"
      },
      "ContactPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "ContactCreated": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/ContactDetail"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "replayed"
        ]
      },
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "default_code": {
            "type": "string",
            "nullable": true
          },
          "barcode": {
            "type": "string",
            "nullable": true
          },
          "list_price": {
            "type": "number"
          },
          "uom_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "sale_ok": {
            "type": "boolean"
          },
          "purchase_ok": {
            "type": "boolean"
          },
          "currency": {
            "type": "string",
            "description": "Company currency code for list_price. Shared products use the configured integration company currency."
          },
          "uom_name": {
            "type": "string",
            "description": "Native product unit of measure name in English (en_US)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "default_code",
          "barcode",
          "list_price",
          "uom_id",
          "company_id",
          "active",
          "sale_ok",
          "purchase_ok",
          "currency",
          "uom_name"
        ]
      },
      "ProductDetail": {
        "$ref": "#/components/schemas/Product"
      },
      "ProductPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "Stock": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "location_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "lot_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "reserved_quantity": {
            "type": "number"
          },
          "available_quantity": {
            "type": "number"
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "required": [
          "id",
          "updated_at",
          "product_id",
          "location_id",
          "lot_id",
          "quantity",
          "reserved_quantity",
          "available_quantity",
          "company_id"
        ]
      },
      "StockDetail": {
        "$ref": "#/components/schemas/Stock"
      },
      "StockPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Stock"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "Lead": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "email_from": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "stage_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "email_from",
          "phone",
          "description",
          "stage_id",
          "type",
          "company_id",
          "active"
        ]
      },
      "LeadDetail": {
        "$ref": "#/components/schemas/Lead"
      },
      "LeadPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Lead"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "LeadCreated": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/LeadDetail"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "replayed"
        ]
      },
      "Payment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount": {
            "type": "number"
          },
          "payment_type": {
            "type": "string",
            "nullable": true
          },
          "partner_type": {
            "type": "string",
            "nullable": true
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount",
          "payment_type",
          "partner_type",
          "journal_id",
          "payment_method_line_id",
          "date",
          "currency"
        ]
      },
      "PaymentDetail": {
        "$ref": "#/components/schemas/Payment"
      },
      "PaymentPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "SaleOrder": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "currency"
        ]
      },
      "SaleOrderDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "lines": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/DocumentLine"
            }
          },
          "lines_truncated": {
            "type": "boolean",
            "description": "True means incomplete detail. Reconcile in Odoo; no line continuation endpoint in v1."
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "lines",
          "lines_truncated",
          "currency"
        ]
      },
      "SaleOrderPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/SaleOrder"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "SaleOrderCreated": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/SaleOrderDetail"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "replayed"
        ]
      },
      "PurchaseOrder": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "currency"
        ]
      },
      "PurchaseOrderDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "lines": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/DocumentLine"
            }
          },
          "lines_truncated": {
            "type": "boolean",
            "description": "True means incomplete detail. Reconcile in Odoo; no line continuation endpoint in v1."
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "lines",
          "lines_truncated",
          "currency"
        ]
      },
      "PurchaseOrderPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/PurchaseOrder"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "PurchaseOrderCreated": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/PurchaseOrderDetail"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "replayed"
        ]
      },
      "Invoice": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "move_type": {
            "type": "string",
            "enum": [
              "out_invoice",
              "in_invoice",
              "out_refund",
              "in_refund"
            ]
          },
          "invoice_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payment_state": {
            "type": "string",
            "nullable": true
          },
          "amount_residual": {
            "type": "number"
          },
          "ref": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "move_type",
          "invoice_date",
          "payment_state",
          "amount_residual",
          "ref",
          "currency"
        ]
      },
      "InvoiceDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "move_type": {
            "type": "string",
            "enum": [
              "out_invoice",
              "in_invoice",
              "out_refund",
              "in_refund"
            ]
          },
          "invoice_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payment_state": {
            "type": "string",
            "nullable": true
          },
          "amount_residual": {
            "type": "number"
          },
          "ref": {
            "type": "string",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/DocumentLine"
            }
          },
          "lines_truncated": {
            "type": "boolean",
            "description": "True means incomplete detail. Reconcile in Odoo; no line continuation endpoint in v1."
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "move_type",
          "invoice_date",
          "payment_state",
          "amount_residual",
          "ref",
          "lines",
          "lines_truncated",
          "currency"
        ]
      },
      "InvoicePage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "InvoiceCreated": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/InvoiceDetail"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "replayed"
        ]
      },
      "POSOrder": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "date_order": {
            "type": "string",
            "maxLength": 19
          },
          "amount_paid": {
            "type": "number"
          },
          "amount_return": {
            "type": "number"
          },
          "session_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "pos_reference": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          },
          "account_move_id": {
            "type": "integer",
            "nullable": true
          },
          "is_singly_invoiced": {
            "type": "boolean"
          },
          "invoice_id": {
            "type": "integer",
            "nullable": true
          },
          "is_refund": {
            "type": "boolean"
          },
          "refunded_order_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "date_order",
          "amount_paid",
          "amount_return",
          "session_id",
          "pos_reference",
          "currency",
          "account_move_id",
          "is_singly_invoiced",
          "invoice_id",
          "is_refund",
          "refunded_order_id"
        ]
      },
      "POSOrderDetail": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "date_order": {
            "type": "string",
            "maxLength": 19
          },
          "amount_paid": {
            "type": "number"
          },
          "amount_return": {
            "type": "number"
          },
          "session_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "pos_reference": {
            "type": "string",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/DocumentLine"
            }
          },
          "lines_truncated": {
            "type": "boolean",
            "description": "True means incomplete detail. Reconcile in Odoo; no line continuation endpoint in v1."
          },
          "payments": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/POSPayment"
            }
          },
          "payments_truncated": {
            "type": "boolean"
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          },
          "account_move_id": {
            "type": "integer",
            "nullable": true
          },
          "is_singly_invoiced": {
            "type": "boolean"
          },
          "invoice_id": {
            "type": "integer",
            "nullable": true
          },
          "is_refund": {
            "type": "boolean"
          },
          "refunded_order_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "date_order",
          "amount_paid",
          "amount_return",
          "session_id",
          "pos_reference",
          "lines",
          "lines_truncated",
          "payments",
          "payments_truncated",
          "currency",
          "account_move_id",
          "is_singly_invoiced",
          "invoice_id",
          "is_refund",
          "refunded_order_id"
        ]
      },
      "POSOrderPage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/POSOrder"
            }
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          }
        },
        "required": [
          "items",
          "next_after_id"
        ]
      },
      "CompletedSaleLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "exclusiveMinimum": true
          },
          "price_unit": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "discount": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "product_id",
          "quantity",
          "price_unit"
        ]
      },
      "ManualPOSPaymentCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "payment_method_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "exclusiveMinimum": true
          }
        },
        "required": [
          "payment_method_id",
          "amount"
        ]
      },
      "ManualSalePaymentCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "exclusiveMinimum": true
          }
        },
        "required": [
          "journal_id",
          "payment_method_line_id",
          "amount"
        ]
      },
      "CompletedPosCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "pos"
            ]
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "reference": {
            "type": "string",
            "maxLength": 200
          },
          "expected_total": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "exclusiveMinimum": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompletedSaleLine"
            },
            "maxItems": 100,
            "minItems": 1
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManualPOSPaymentCreate"
            },
            "maxItems": 20,
            "minItems": 1
          },
          "config_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "session_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "required": [
          "mode",
          "lines",
          "payments",
          "config_id",
          "session_id"
        ]
      },
      "CompletedSaleCreate": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CompletedPosCreate"
          },
          {
            "$ref": "#/components/schemas/CompletedSaleCreateBody"
          }
        ],
        "discriminator": {
          "propertyName": "mode"
        }
      },
      "CompletedSaleCreateBody": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "sale"
            ]
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "reference": {
            "type": "string",
            "maxLength": 200
          },
          "expected_total": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "exclusiveMinimum": true
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompletedSaleLine"
            },
            "maxItems": 100,
            "minItems": 1
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManualSalePaymentCreate"
            },
            "maxItems": 20,
            "minItems": 1
          }
        },
        "required": [
          "mode",
          "partner_id",
          "lines",
          "payments"
        ]
      },
      "CompletedPayment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "model": {
            "type": "string",
            "enum": [
              "pos.payment",
              "account.payment"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "payment_method_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "model",
          "amount",
          "currency_id",
          "currency"
        ]
      },
      "CurrentCompletedPayment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "model": {
            "type": "string",
            "enum": [
              "pos.payment",
              "account.payment"
            ]
          },
          "amount": {
            "type": "number"
          },
          "payment_method_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "state": {
            "type": "string"
          },
          "move_state": {
            "type": "string",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "model",
          "amount",
          "currency_id",
          "currency"
        ]
      },
      "CompletedPosRecord": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "date_order": {
            "type": "string",
            "maxLength": 19
          },
          "amount_paid": {
            "type": "number"
          },
          "amount_return": {
            "type": "number"
          },
          "session_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "pos_reference": {
            "type": "string",
            "nullable": true
          },
          "lines": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/CompletedDocumentLine"
            }
          },
          "lines_truncated": {
            "type": "boolean",
            "description": "True means incomplete detail. Reconcile in Odoo; no line continuation endpoint in v1."
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompletedPayment"
            },
            "maxItems": 20
          },
          "payments_truncated": {
            "type": "boolean"
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          },
          "mode": {
            "type": "string",
            "enum": [
              "pos"
            ]
          },
          "invoice_id": {
            "type": "integer",
            "nullable": true
          },
          "recording": {
            "type": "string",
            "enum": [
              "manual"
            ]
          },
          "provider_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "config_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "account_move_id": {
            "type": "integer",
            "nullable": true
          },
          "is_singly_invoiced": {
            "type": "boolean"
          },
          "is_refund": {
            "type": "boolean"
          },
          "refunded_order_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "date_order",
          "amount_paid",
          "amount_return",
          "session_id",
          "pos_reference",
          "lines",
          "lines_truncated",
          "payments",
          "payments_truncated",
          "currency",
          "mode",
          "recording",
          "provider_verified",
          "config_id"
        ]
      },
      "CompletedSaleRecord": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CompletedPosRecord"
          },
          {
            "$ref": "#/components/schemas/CompletedSaleRecordBody"
          }
        ]
      },
      "CompletedSaleRecordBody": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC native parent write_date, YYYY-MM-DD HH:MM:SS; not a complete change feed."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "currency_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "amount_untaxed": {
            "type": "number"
          },
          "amount_tax": {
            "type": "number"
          },
          "amount_total": {
            "type": "number"
          },
          "lines": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/CompletedDocumentLine"
            }
          },
          "lines_truncated": {
            "type": "boolean",
            "description": "True means incomplete detail. Reconcile in Odoo; no line continuation endpoint in v1."
          },
          "currency": {
            "type": "string",
            "description": "Native Odoo currency code (ISO 4217 for standard configured currencies)."
          },
          "mode": {
            "type": "string",
            "enum": [
              "sale"
            ]
          },
          "invoice_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "recording": {
            "type": "string",
            "enum": [
              "manual"
            ]
          },
          "provider_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompletedPayment"
            },
            "maxItems": 20
          }
        },
        "required": [
          "id",
          "updated_at",
          "name",
          "partner_id",
          "state",
          "company_id",
          "currency_id",
          "amount_untaxed",
          "amount_tax",
          "amount_total",
          "lines",
          "lines_truncated",
          "currency",
          "mode",
          "invoice_id",
          "recording",
          "provider_verified",
          "payments"
        ]
      },
      "CompletedFiscal": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "fd_number": {
            "type": "string",
            "nullable": true
          },
          "qr_link": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "enabled",
          "state",
          "fd_number",
          "qr_link"
        ]
      },
      "CompletedCurrent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order_state": {
            "type": "string"
          },
          "amount_total": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CurrentCompletedPayment"
            },
            "maxItems": 100
          },
          "fiscal": {
            "$ref": "#/components/schemas/CompletedFiscal"
          },
          "invoice_state": {
            "type": "string"
          },
          "invoice_payment_state": {
            "type": "string"
          },
          "amount_residual": {
            "type": "number"
          },
          "pickings": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647
                },
                "state": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "state"
              ]
            },
            "maxItems": 100
          },
          "pickings_truncated": {
            "type": "boolean"
          },
          "payments_truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "order_state",
          "amount_total",
          "currency",
          "payments",
          "fiscal",
          "pickings",
          "pickings_truncated",
          "payments_truncated"
        ]
      },
      "CompletedSaleResult": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/CompletedSaleRecord"
          },
          "current": {
            "$ref": "#/components/schemas/CompletedCurrent"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "current"
        ]
      },
      "SalesOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "pos",
              "sale"
            ]
          },
          "company_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647
                },
                "name": {
                  "type": "string"
                },
                "currency": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "cash",
                    "bank"
                  ]
                },
                "supported": {
                  "type": "boolean"
                },
                "opened_session": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2147483647
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "nullable": true
                },
                "payment_methods": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "name": {
                        "type": "string"
                      },
                      "recording": {
                        "type": "string",
                        "enum": [
                          "manual"
                        ]
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "cash",
                          "bank"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "recording"
                    ]
                  },
                  "maxItems": 100
                },
                "payment_methods_truncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "currency",
                "payment_methods",
                "payment_methods_truncated"
              ]
            },
            "maxItems": 100
          },
          "next_after_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "limits": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "positive_sales_only": {
                "type": "boolean"
              },
              "full_payment_only": {
                "type": "boolean"
              },
              "manual_recording_only": {
                "type": "boolean"
              },
              "provider_verification": {
                "type": "boolean"
              },
              "tracked_products": {
                "type": "boolean"
              },
              "combos": {
                "type": "boolean"
              },
              "rewards": {
                "type": "boolean"
              },
              "automatic_delivery_validation": {
                "type": "boolean"
              },
              "lines": {
                "type": "integer",
                "enum": [
                  100
                ]
              },
              "payments": {
                "type": "integer",
                "enum": [
                  20
                ]
              },
              "sale_invoice_policy": {
                "type": "string",
                "enum": [
                  "order"
                ]
              }
            },
            "required": [
              "positive_sales_only",
              "full_payment_only",
              "manual_recording_only",
              "provider_verification",
              "tracked_products",
              "combos",
              "rewards",
              "automatic_delivery_validation",
              "lines",
              "payments",
              "sale_invoice_policy"
            ]
          }
        },
        "required": [
          "mode",
          "company_id",
          "items",
          "next_after_id",
          "limits"
        ]
      },
      "CompletedDocumentLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "nullable": true
          },
          "name": {
            "type": "string",
            "maxLength": 100000
          },
          "quantity": {
            "type": "number"
          },
          "price_unit": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "price_subtotal": {
            "type": "number"
          },
          "price_total": {
            "type": "number"
          },
          "refunded_orderline_id": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "id",
          "product_id",
          "name",
          "quantity",
          "price_unit",
          "price_subtotal",
          "price_total"
        ]
      },
      "DeliveryEmbeddedPayment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "source": {
            "type": "string",
            "enum": [
              "cash_collected",
              "elcrm_confirmed_bank"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "payment_date": {
            "type": "string",
            "format": "date"
          },
          "source_reference": {
            "type": "string",
            "maxLength": 200
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          }
        },
        "required": [
          "external_id",
          "amount",
          "journal_id",
          "payment_method_line_id",
          "source",
          "occurred_at",
          "payment_date"
        ]
      },
      "DeliveryConfigurationCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "warehouse_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "driver_parent_location_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "invoice_journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "pricelist_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "journal_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "maxItems": 100,
            "minItems": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "production"
            ]
          }
        },
        "required": [
          "event_id",
          "external_id",
          "warehouse_id",
          "driver_parent_location_id",
          "invoice_journal_id",
          "pricelist_id",
          "journal_ids",
          "environment"
        ]
      },
      "DeliveryBindingCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "product",
              "customer"
            ]
          },
          "odoo_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "required": [
          "event_id",
          "external_id",
          "kind",
          "odoo_id"
        ]
      },
      "DeliveryOrderLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "item_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "product_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000
          },
          "price_unit": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000
          },
          "discount": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        },
        "required": [
          "item_id",
          "product_external_id",
          "quantity",
          "price_unit"
        ]
      },
      "DeliveryOrderCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "version": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "customer_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "currency": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryOrderLine"
            },
            "maxItems": 100,
            "minItems": 1
          },
          "expected_total": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          }
        },
        "required": [
          "event_id",
          "external_id",
          "version",
          "customer_external_id",
          "currency",
          "lines"
        ]
      },
      "DeliveryTripCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "driver_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          }
        },
        "required": [
          "event_id",
          "external_id",
          "driver_external_id"
        ]
      },
      "DeliveryStockLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "order_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "order_version": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "item_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "quantity": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000
          }
        },
        "required": [
          "order_external_id",
          "order_version",
          "item_id",
          "quantity"
        ]
      },
      "DeliveryStockCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryStockLine"
            },
            "maxItems": 100,
            "minItems": 1
          }
        },
        "required": [
          "event_id",
          "external_id",
          "occurred_at",
          "lines"
        ]
      },
      "DeliveryTripClose": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          }
        },
        "required": [
          "event_id",
          "external_id",
          "occurred_at"
        ]
      },
      "DeliveryAcceptedLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "item_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "accepted_quantity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000
          }
        },
        "required": [
          "item_id",
          "accepted_quantity"
        ]
      },
      "DeliveryResultCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "order_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "order_version": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "trip_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "stop_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryAcceptedLine"
            },
            "maxItems": 100,
            "minItems": 1
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryEmbeddedPayment"
            },
            "maxItems": 20,
            "minItems": 0
          }
        },
        "required": [
          "event_id",
          "external_id",
          "order_external_id",
          "order_version",
          "trip_external_id",
          "stop_id",
          "occurred_at",
          "lines"
        ]
      },
      "DeliveryAllocationCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "delivery_result_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          }
        },
        "required": [
          "delivery_result_external_id",
          "amount"
        ]
      },
      "DeliveryPaymentCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "order_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "source": {
            "type": "string",
            "enum": [
              "cash_collected",
              "elcrm_confirmed_bank"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "payment_date": {
            "type": "string",
            "format": "date"
          },
          "source_reference": {
            "type": "string",
            "maxLength": 200
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "allocations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryAllocationCreate"
            },
            "maxItems": 20,
            "minItems": 1
          }
        },
        "required": [
          "event_id",
          "external_id",
          "order_external_id",
          "currency",
          "amount",
          "journal_id",
          "payment_method_line_id",
          "source",
          "occurred_at",
          "payment_date",
          "allocations"
        ]
      },
      "DeliveryReturnCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "delivery_result_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "item_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,128}$"
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "maximum": 1000000
                }
              },
              "required": [
                "item_id",
                "quantity"
              ]
            },
            "maxItems": 100,
            "minItems": 1
          },
          "receiving_trip_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          }
        },
        "required": [
          "event_id",
          "external_id",
          "delivery_result_external_id",
          "occurred_at",
          "lines"
        ]
      },
      "DeliveryRefundCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "return_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "source": {
            "type": "string",
            "enum": [
              "cash_collected",
              "elcrm_confirmed_bank"
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "payment_date": {
            "type": "string",
            "format": "date"
          },
          "source_reference": {
            "type": "string",
            "maxLength": 200
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          }
        },
        "required": [
          "event_id",
          "external_id",
          "return_external_id",
          "currency",
          "amount",
          "journal_id",
          "payment_method_line_id",
          "source",
          "occurred_at",
          "payment_date"
        ]
      },
      "DeliveryReceiptCreate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "provider": {
            "type": "string",
            "enum": [
              "ekassa"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "production"
            ]
          },
          "provider_receipt_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "register_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "fiscal_drive_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "document_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "fiscal_sign": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "fiscal_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          },
          "qr_link": {
            "type": "string",
            "maxLength": 2000
          },
          "kind": {
            "type": "string",
            "enum": [
              "sale",
              "return",
              "payment",
              "refund"
            ]
          },
          "target_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          }
        },
        "required": [
          "event_id",
          "external_id",
          "provider",
          "environment",
          "provider_receipt_id",
          "register_number",
          "fiscal_drive_number",
          "document_number",
          "fiscal_sign",
          "fiscal_at",
          "currency",
          "amount",
          "kind",
          "target_external_id"
        ]
      },
      "DeliveryNativeIDs": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "sale_order_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "maxItems": 100,
            "minItems": 0
          },
          "credit_note_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "maxItems": 100,
            "minItems": 0
          },
          "picking_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "maxItems": 100,
            "minItems": 0
          },
          "payment_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "maxItems": 100,
            "minItems": 0
          },
          "location_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "partner_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "required": []
      },
      "DeliveryRecord": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "configuration",
              "product",
              "customer",
              "order",
              "trip",
              "load",
              "stock-return",
              "trip-close",
              "delivery-result",
              "payment",
              "return",
              "refund",
              "receipt"
            ]
          },
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "event_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "native": {
            "$ref": "#/components/schemas/DeliveryNativeIDs"
          },
          "trip_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$",
            "nullable": true
          },
          "outcome": {
            "type": "string",
            "enum": [
              "accepted",
              "refused"
            ]
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "delivery_result_external_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,128}$"
                },
                "amount": {
                  "type": "number"
                },
                "payment_ids": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "maxItems": 20,
                  "minItems": 0
                },
                "invoice_id": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647
                }
              },
              "required": [
                "delivery_result_external_id",
                "amount",
                "payment_ids"
              ]
            },
            "maxItems": 20,
            "minItems": 0
          },
          "delivery_result_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "return_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "target_external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "reported_by_elcrm": {
            "type": "boolean"
          },
          "independently_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "provider_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "source": {
            "type": "object",
            "description": "Immutable original strictly validated source payload; event time, stop and order version are preserved separately from native posting dates."
          }
        },
        "required": [
          "kind",
          "external_id",
          "event_id",
          "native"
        ]
      },
      "DeliverySettlement": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "invoiced_total": {
            "type": "number"
          },
          "credited_total": {
            "type": "number"
          },
          "net_total": {
            "type": "number"
          },
          "paid_amount": {
            "type": "number"
          },
          "refunded_amount": {
            "type": "number"
          },
          "debt": {
            "type": "number"
          },
          "customer_credit": {
            "type": "number"
          },
          "receivable_balance": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "payment_status": {
            "type": "string",
            "enum": [
              "not_invoiced",
              "unpaid",
              "partially_paid",
              "paid",
              "settled"
            ]
          },
          "refund_status": {
            "type": "string",
            "enum": [
              "none",
              "pending",
              "partially_refunded",
              "refunded"
            ]
          },
          "provider_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "required": [
          "invoiced_total",
          "credited_total",
          "net_total",
          "paid_amount",
          "refunded_amount",
          "debt",
          "customer_credit",
          "receivable_balance",
          "currency",
          "payment_status",
          "refund_status",
          "provider_verified"
        ]
      },
      "DeliveryCurrentOrderLine": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "item_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "planned_quantity": {
            "type": "number"
          },
          "delivered_quantity": {
            "type": "number"
          },
          "invoiced_quantity": {
            "type": "number"
          },
          "price_unit": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          }
        },
        "required": [
          "item_id",
          "id",
          "product_id",
          "planned_quantity",
          "delivered_quantity",
          "invoiced_quantity",
          "price_unit",
          "discount"
        ]
      },
      "DeliveryCurrentOrder": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "state": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "amount_total": {
            "type": "number"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryCurrentOrderLine"
            },
            "maxItems": 100,
            "minItems": 0
          },
          "receivable_balance": {
            "type": "number"
          },
          "debt": {
            "type": "number"
          },
          "customer_credit": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "state",
          "currency",
          "amount_total",
          "lines",
          "receivable_balance",
          "debt",
          "customer_credit"
        ]
      },
      "DeliveryCurrentInvoice": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "state": {
            "type": "string"
          },
          "move_type": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "amount_total": {
            "type": "number"
          },
          "amount_residual": {
            "type": "number"
          },
          "payment_state": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "move_type",
          "currency",
          "amount_total",
          "amount_residual",
          "payment_state"
        ]
      },
      "DeliveryCurrentPayment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "state": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "journal_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "payment_method_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "move_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "move_state": {
            "type": "string"
          },
          "payment_date": {
            "type": "string",
            "format": "date"
          },
          "provider_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "required": [
          "id",
          "state",
          "amount",
          "currency",
          "journal_id",
          "payment_method_line_id",
          "move_id",
          "move_state",
          "payment_date",
          "provider_verified"
        ]
      },
      "DeliveryCurrentMove": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "item_id": {
            "type": "string"
          },
          "product_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "quantity": {
            "type": "number"
          },
          "state": {
            "type": "string"
          },
          "sale_line_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "required": [
          "id",
          "item_id",
          "product_id",
          "quantity",
          "state",
          "sale_line_id"
        ]
      },
      "DeliveryCurrentPicking": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "state": {
            "type": "string"
          },
          "location_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "location_dest_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "moves": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryCurrentMove"
            },
            "maxItems": 100,
            "minItems": 0
          },
          "moves_truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "state",
          "location_id",
          "location_dest_id",
          "moves",
          "moves_truncated"
        ]
      },
      "DeliveryCurrentTrip": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "open",
              "closed"
            ]
          },
          "location_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          },
          "stock": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "product_id": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647
                },
                "quantity": {
                  "type": "number"
                },
                "reserved_quantity": {
                  "type": "number"
                }
              },
              "required": [
                "product_id",
                "quantity",
                "reserved_quantity"
              ]
            },
            "maxItems": 100,
            "minItems": 0
          },
          "stock_truncated": {
            "type": "boolean"
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "order_external_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,128}$"
                },
                "item_id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9._:-]{1,128}$"
                },
                "quantity": {
                  "type": "number"
                }
              },
              "required": [
                "order_external_id",
                "item_id",
                "quantity"
              ]
            },
            "maxItems": 100,
            "minItems": 0
          },
          "allocations_truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "external_id",
          "state",
          "location_id",
          "stock",
          "stock_truncated",
          "allocations",
          "allocations_truncated"
        ]
      },
      "DeliveryCurrentReceipt": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "external_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "provider": {
            "type": "string",
            "enum": [
              "ekassa"
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "test",
              "production"
            ]
          },
          "provider_receipt_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "register_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "fiscal_drive_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "document_number": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "fiscal_sign": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,128}$"
          },
          "fiscal_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
          },
          "currency": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true,
            "maximum": 1000000000000
          },
          "qr_link": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "enum": [
              "reported_by_elcrm"
            ]
          },
          "independently_verified": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        },
        "required": [
          "external_id",
          "provider",
          "environment",
          "provider_receipt_id",
          "register_number",
          "fiscal_drive_number",
          "document_number",
          "fiscal_sign",
          "fiscal_at",
          "currency",
          "amount",
          "qr_link",
          "state",
          "independently_verified"
        ]
      },
      "DeliveryCurrent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "sale_order": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1,
                "maximum": 2147483647
              },
              "state": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "amount_total": {
                "type": "number"
              },
              "lines": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeliveryCurrentOrderLine"
                },
                "maxItems": 100,
                "minItems": 0
              },
              "receivable_balance": {
                "type": "number"
              },
              "debt": {
                "type": "number"
              },
              "customer_credit": {
                "type": "number"
              }
            },
            "required": [
              "id",
              "state",
              "currency",
              "amount_total",
              "lines",
              "receivable_balance",
              "debt",
              "customer_credit"
            ],
            "nullable": true
          },
          "settlement": {
            "$ref": "#/components/schemas/DeliverySettlement"
          },
          "invoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryCurrentInvoice"
            },
            "maxItems": 100,
            "minItems": 0
          },
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryCurrentPayment"
            },
            "maxItems": 100,
            "minItems": 0
          },
          "pickings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeliveryCurrentPicking"
            },
            "maxItems": 100,
            "minItems": 0
          },
          "invoices_truncated": {
            "type": "boolean"
          },
          "payments_truncated": {
            "type": "boolean"
          },
          "pickings_truncated": {
            "type": "boolean"
          },
          "trip": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "external_id": {
                "type": "string",
                "pattern": "^[A-Za-z0-9._:-]{1,128}$"
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "location_id": {
                "type": "integer",
                "minimum": 1,
                "maximum": 2147483647
              },
              "stock": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "product_id": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 2147483647
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "reserved_quantity": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "product_id",
                    "quantity",
                    "reserved_quantity"
                  ]
                },
                "maxItems": 100,
                "minItems": 0
              },
              "stock_truncated": {
                "type": "boolean"
              },
              "allocations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "order_external_id": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9._:-]{1,128}$"
                    },
                    "item_id": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9._:-]{1,128}$"
                    },
                    "quantity": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "order_external_id",
                    "item_id",
                    "quantity"
                  ]
                },
                "maxItems": 100,
                "minItems": 0
              },
              "allocations_truncated": {
                "type": "boolean"
              }
            },
            "required": [
              "external_id",
              "state",
              "location_id",
              "stock",
              "stock_truncated",
              "allocations",
              "allocations_truncated"
            ],
            "nullable": true
          },
          "fiscal": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "owner": {
                "type": "string",
                "enum": [
                  "elcrm"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "none",
                  "awaiting_external",
                  "reported_by_elcrm"
                ]
              },
              "independently_verified": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "receipts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DeliveryCurrentReceipt"
                },
                "maxItems": 100,
                "minItems": 0
              },
              "receipts_truncated": {
                "type": "boolean"
              }
            },
            "required": [
              "owner",
              "state",
              "independently_verified",
              "receipts",
              "receipts_truncated"
            ]
          }
        },
        "required": [
          "sale_order",
          "settlement",
          "invoices",
          "payments",
          "pickings",
          "invoices_truncated",
          "payments_truncated",
          "pickings_truncated",
          "trip",
          "fiscal"
        ]
      },
      "DeliveryResult": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "record": {
            "$ref": "#/components/schemas/DeliveryRecord"
          },
          "current": {
            "$ref": "#/components/schemas/DeliveryCurrent"
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "record",
          "current"
        ]
      },
      "DeliveryOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "api_version": {
            "type": "string",
            "enum": [
              "1.2"
            ]
          },
          "namespace": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1,
                "maximum": 2147483647
              },
              "name": {
                "type": "string"
              },
              "company_id": {
                "type": "integer",
                "minimum": 1,
                "maximum": 2147483647
              }
            },
            "required": [
              "id",
              "name",
              "company_id"
            ]
          },
          "configured": {
            "type": "boolean"
          },
          "configuration": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "warehouse_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "stock_location_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "driver_parent_location_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "internal_picking_type_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "outgoing_picking_type_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "incoming_picking_type_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "invoice_journal_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "pricelist_id": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "currency": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "ekassa"
                    ]
                  },
                  "environment": {
                    "type": "string",
                    "enum": [
                      "test",
                      "production"
                    ]
                  },
                  "fiscal_owner": {
                    "type": "string",
                    "enum": [
                      "elcrm"
                    ]
                  }
                },
                "required": [
                  "warehouse_id",
                  "stock_location_id",
                  "driver_parent_location_id",
                  "internal_picking_type_id",
                  "outgoing_picking_type_id",
                  "incoming_picking_type_id",
                  "invoice_journal_id",
                  "pricelist_id",
                  "currency",
                  "provider",
                  "environment",
                  "fiscal_owner"
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {},
                "required": []
              }
            ]
          },
          "journals": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2147483647
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "cash",
                    "bank"
                  ]
                },
                "currency": {
                  "type": "string"
                },
                "inbound_methods": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "name": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string",
                        "enum": [
                          "manual"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "code"
                    ]
                  },
                  "maxItems": 100,
                  "minItems": 0
                },
                "outbound_methods": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                      },
                      "name": {
                        "type": "string"
                      },
                      "code": {
                        "type": "string",
                        "enum": [
                          "manual"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "code"
                    ]
                  },
                  "maxItems": 100,
                  "minItems": 0
                }
              },
              "required": [
                "id",
                "name",
                "type",
                "currency",
                "inbound_methods",
                "outbound_methods"
              ]
            },
            "maxItems": 100,
            "minItems": 0
          },
          "limits": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "lines": {
                "type": "integer",
                "enum": [
                  100
                ]
              },
              "payments": {
                "type": "integer",
                "enum": [
                  20
                ]
              }
            },
            "required": [
              "lines",
              "payments"
            ]
          }
        },
        "required": [
          "api_version",
          "namespace",
          "configured",
          "configuration",
          "journals",
          "limits"
        ]
      },
      "ExportPricelists": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "active",
          "company_id",
          "currency_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportPricelistsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportPricelists"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportPricelistRules": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "pricelist_id",
          "company_id",
          "currency_id",
          "applied_on",
          "product_id",
          "product_tmpl_id",
          "categ_id",
          "uom_id",
          "min_quantity",
          "date_start",
          "date_end",
          "base",
          "base_pricelist_id",
          "compute_price",
          "fixed_price",
          "price_discount",
          "price_markup",
          "price_round",
          "price_surcharge",
          "price_min_margin",
          "price_max_margin"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "pricelist_id": {
            "type": "integer",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "applied_on": {
            "type": "string",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "nullable": true
          },
          "product_tmpl_id": {
            "type": "integer",
            "nullable": true
          },
          "categ_id": {
            "type": "integer",
            "nullable": true
          },
          "uom_id": {
            "type": "integer",
            "nullable": true
          },
          "min_quantity": {
            "type": "number"
          },
          "date_start": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "date_end": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "base": {
            "type": "string",
            "nullable": true
          },
          "base_pricelist_id": {
            "type": "integer",
            "nullable": true
          },
          "compute_price": {
            "type": "string",
            "nullable": true
          },
          "fixed_price": {
            "type": "number"
          },
          "price_discount": {
            "type": "number"
          },
          "price_markup": {
            "type": "number"
          },
          "price_round": {
            "type": "number"
          },
          "price_surcharge": {
            "type": "number"
          },
          "price_min_margin": {
            "type": "number"
          },
          "price_max_margin": {
            "type": "number"
          }
        }
      },
      "ExportPricelistRulesPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportPricelistRules"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportAccounts": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "code",
          "account_type",
          "reconcile",
          "active",
          "currency_id",
          "company_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "account_type": {
            "type": "string",
            "nullable": true
          },
          "reconcile": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "company_id": {
            "type": "integer"
          }
        }
      },
      "ExportAccountsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportAccounts"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportJournals": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "code",
          "type",
          "company_id",
          "currency_id",
          "default_account_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "default_account_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportJournalsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportJournals"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportJournalEntries": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "ref",
          "state",
          "move_type",
          "date",
          "company_id",
          "journal_id",
          "partner_id",
          "currency_id",
          "amount_total",
          "amount_residual"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "ref": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "move_type": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "journal_id": {
            "type": "integer",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "amount_total": {
            "type": "number"
          },
          "amount_residual": {
            "type": "number"
          }
        }
      },
      "ExportJournalEntriesPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportJournalEntries"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportJournalItems": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "move_id",
          "parent_state",
          "date",
          "date_maturity",
          "company_id",
          "journal_id",
          "account_id",
          "partner_id",
          "product_id",
          "currency_id",
          "debit",
          "credit",
          "balance",
          "amount_currency",
          "amount_residual",
          "amount_residual_currency",
          "reconciled",
          "display_type",
          "analytic_distribution"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "move_id": {
            "type": "integer",
            "nullable": true
          },
          "parent_state": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "date_maturity": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "journal_id": {
            "type": "integer",
            "nullable": true
          },
          "account_id": {
            "type": "integer",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "debit": {
            "type": "number"
          },
          "credit": {
            "type": "number"
          },
          "balance": {
            "type": "number"
          },
          "amount_currency": {
            "type": "number"
          },
          "amount_residual": {
            "type": "number"
          },
          "amount_residual_currency": {
            "type": "number"
          },
          "reconciled": {
            "type": "boolean"
          },
          "display_type": {
            "type": "string",
            "nullable": true
          },
          "analytic_distribution": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "ExportJournalItemsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportJournalItems"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportAnalyticAccounts": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "code",
          "active",
          "company_id",
          "partner_id",
          "plan_id",
          "currency_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "active": {
            "type": "boolean"
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "nullable": true
          },
          "plan_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportAnalyticAccountsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportAnalyticAccounts"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportAnalyticLines": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "date",
          "amount",
          "unit_amount",
          "company_id",
          "partner_id",
          "account_id",
          "product_uom_id",
          "currency_id",
          "analytic_distribution"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "amount": {
            "type": "number"
          },
          "unit_amount": {
            "type": "number"
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "nullable": true
          },
          "account_id": {
            "type": "integer",
            "nullable": true
          },
          "product_uom_id": {
            "type": "integer",
            "nullable": true
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "analytic_distribution": {
            "type": "object",
            "nullable": true,
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "ExportAnalyticLinesPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportAnalyticLines"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportStockMoves": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "reference",
          "date",
          "state",
          "company_id",
          "product_id",
          "uom_id",
          "product_uom_qty",
          "quantity",
          "location_id",
          "location_dest_id",
          "picking_id",
          "origin_returned_move_id",
          "value",
          "remaining_qty",
          "remaining_value",
          "account_move_id",
          "company_currency_id",
          "is_in",
          "is_out",
          "is_dropship"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "reference": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "nullable": true
          },
          "uom_id": {
            "type": "integer",
            "nullable": true
          },
          "product_uom_qty": {
            "type": "number"
          },
          "quantity": {
            "type": "number"
          },
          "location_id": {
            "type": "integer",
            "nullable": true
          },
          "location_dest_id": {
            "type": "integer",
            "nullable": true
          },
          "picking_id": {
            "type": "integer",
            "nullable": true
          },
          "origin_returned_move_id": {
            "type": "integer",
            "nullable": true
          },
          "value": {
            "type": "number"
          },
          "remaining_qty": {
            "type": "number"
          },
          "remaining_value": {
            "type": "number"
          },
          "account_move_id": {
            "type": "integer",
            "nullable": true
          },
          "company_currency_id": {
            "type": "integer",
            "nullable": true
          },
          "is_in": {
            "type": "boolean"
          },
          "is_out": {
            "type": "boolean"
          },
          "is_dropship": {
            "type": "boolean"
          }
        }
      },
      "ExportStockMovesPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportStockMoves"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportStockMoveLines": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "date",
          "state",
          "company_id",
          "move_id",
          "product_id",
          "uom_id",
          "quantity",
          "quantity_product_uom",
          "location_id",
          "location_dest_id",
          "lot_id",
          "picking_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "date": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "move_id": {
            "type": "integer",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "nullable": true
          },
          "uom_id": {
            "type": "integer",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "quantity_product_uom": {
            "type": "number"
          },
          "location_id": {
            "type": "integer",
            "nullable": true
          },
          "location_dest_id": {
            "type": "integer",
            "nullable": true
          },
          "lot_id": {
            "type": "integer",
            "nullable": true
          },
          "picking_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportStockMoveLinesPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportStockMoveLines"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportStockValuations": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "date",
          "company_id",
          "product_id",
          "lot_id",
          "move_id",
          "account_move_id",
          "quantity",
          "old_cost",
          "new_cost",
          "old_value",
          "new_value",
          "value",
          "adjustment",
          "currency_id",
          "value_kind"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "date": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "product_id": {
            "type": "integer",
            "nullable": true
          },
          "lot_id": {
            "type": "integer",
            "nullable": true
          },
          "move_id": {
            "type": "integer",
            "nullable": true
          },
          "account_move_id": {
            "type": "integer",
            "nullable": true
          },
          "quantity": {
            "type": "number"
          },
          "old_cost": {
            "type": "number"
          },
          "new_cost": {
            "type": "number"
          },
          "old_value": {
            "type": "number"
          },
          "new_value": {
            "type": "number"
          },
          "value": {
            "type": "number"
          },
          "adjustment": {
            "type": "number"
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "value_kind": {
            "type": "string",
            "enum": [
              "move_total",
              "unit_cost"
            ]
          }
        }
      },
      "ExportStockValuationsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportStockValuations"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportPosSessions": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "state",
          "company_id",
          "config_id",
          "user_id",
          "start_at",
          "stop_at",
          "currency_id",
          "bank_statement_id",
          "opening_balance",
          "closing_balance",
          "closing_difference",
          "statement_balance_end",
          "cash_expected_close",
          "cash_counted_close",
          "cash_variance",
          "cash_variance_available",
          "cash_close_recorded"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "config_id": {
            "type": "integer",
            "nullable": true
          },
          "user_id": {
            "type": "integer",
            "nullable": true
          },
          "start_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "stop_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "bank_statement_id": {
            "type": "integer",
            "nullable": true
          },
          "opening_balance": {
            "type": "number"
          },
          "closing_balance": {
            "type": "number"
          },
          "closing_difference": {
            "type": "number"
          },
          "statement_balance_end": {
            "type": "number",
            "nullable": true
          },
          "cash_expected_close": {
            "type": "number",
            "nullable": true
          },
          "cash_counted_close": {
            "type": "number",
            "nullable": true
          },
          "cash_variance": {
            "type": "number",
            "nullable": true
          },
          "cash_variance_available": {
            "type": "boolean"
          },
          "cash_close_recorded": {
            "type": "boolean"
          }
        },
        "description": "Cash summary requires complete native read access to all statements, statement lines and their delegated journal entries in the selected company/journal, including predecessor history. Any hidden contributor rejects the summary. closing_difference is closing minus opening. When optional ce_mobile_api close-evidence fields exist and state is closed with recorded evidence, cash_expected_close/cash_counted_close/cash_variance expose saved values and both flags are true, including zero variance. Otherwise all three amounts are null and flags false. Captured evidence additionally requires native read access to all exact-session POS orders/payments. No close-report helper, new writes, hard dependency or inferred expected amount."
      },
      "ExportPosSessionsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportPosSessions"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportPosCashMovements": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "pos_session_id",
          "company_id",
          "statement_id",
          "move_id",
          "journal_id",
          "partner_id",
          "date",
          "payment_ref",
          "amount",
          "currency_id",
          "foreign_currency_id",
          "amount_currency"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "pos_session_id": {
            "type": "integer",
            "nullable": true
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "statement_id": {
            "type": "integer",
            "nullable": true
          },
          "move_id": {
            "type": "integer",
            "nullable": true
          },
          "journal_id": {
            "type": "integer",
            "nullable": true
          },
          "partner_id": {
            "type": "integer",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "payment_ref": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "number"
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "foreign_currency_id": {
            "type": "integer",
            "nullable": true
          },
          "amount_currency": {
            "type": "number"
          }
        }
      },
      "ExportPosCashMovementsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportPosCashMovements"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "ExportReconciliations": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "company_id",
          "debit_move_id",
          "credit_move_id",
          "full_reconcile_id",
          "exchange_move_id",
          "amount",
          "debit_amount_currency",
          "credit_amount_currency",
          "debit_currency_id",
          "credit_currency_id",
          "max_date"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "company_id": {
            "type": "integer",
            "nullable": true
          },
          "debit_move_id": {
            "type": "integer",
            "nullable": true
          },
          "credit_move_id": {
            "type": "integer",
            "nullable": true
          },
          "full_reconcile_id": {
            "type": "integer",
            "nullable": true
          },
          "exchange_move_id": {
            "type": "integer",
            "nullable": true
          },
          "amount": {
            "type": "number"
          },
          "debit_amount_currency": {
            "type": "number"
          },
          "credit_amount_currency": {
            "type": "number"
          },
          "debit_currency_id": {
            "type": "integer",
            "nullable": true
          },
          "credit_currency_id": {
            "type": "integer",
            "nullable": true
          },
          "max_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "ExportReconciliationsPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportReconciliations"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "DocumentLinePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/DocumentLine"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "POSPaymentPage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/POSPayment"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "CustomerBalance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "partner_id",
          "debt",
          "credit",
          "balance",
          "currency",
          "company_id",
          "basis"
        ],
        "properties": {
          "partner_id": {
            "type": "integer"
          },
          "debt": {
            "type": "number"
          },
          "credit": {
            "type": "number"
          },
          "balance": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "company_id": {
            "type": "integer"
          },
          "basis": {
            "type": "string",
            "enum": [
              "current_posted_receivable_residuals_exact_partner"
            ]
          }
        }
      },
      "CustomerBalancePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/CustomerBalance"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "CustomerLedger": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id",
          "current_summary",
          "opening_balance",
          "period_debit",
          "period_credit",
          "closing_balance",
          "currency"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ExportJournalItems"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          },
          "current_summary": {
            "$ref": "#/components/schemas/CustomerBalance"
          },
          "opening_balance": {
            "type": "number"
          },
          "period_debit": {
            "type": "number"
          },
          "period_credit": {
            "type": "number"
          },
          "closing_balance": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "TrialBalanceRow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "updated_at",
          "name",
          "code",
          "account_type",
          "reconcile",
          "active",
          "currency_id",
          "company_id",
          "opening_balance",
          "debit",
          "credit",
          "closing_balance"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "nullable": false
          },
          "updated_at": {
            "type": "string",
            "nullable": true,
            "description": "UTC YYYY-MM-DD HH:MM:SS."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "account_type": {
            "type": "string",
            "nullable": true
          },
          "reconcile": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "currency_id": {
            "type": "integer",
            "nullable": true
          },
          "company_id": {
            "type": "integer"
          },
          "opening_balance": {
            "type": "number"
          },
          "debit": {
            "type": "number"
          },
          "credit": {
            "type": "number"
          },
          "closing_balance": {
            "type": "number"
          }
        }
      },
      "TrialBalance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "next_after_id",
          "company_id",
          "currency",
          "date_from",
          "date_to",
          "basis"
        ],
        "properties": {
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/TrialBalanceRow"
            }
          },
          "next_after_id": {
            "type": "integer",
            "nullable": true
          },
          "company_id": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "date_from": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "basis": {
            "type": "string",
            "enum": [
              "posted_company_currency"
            ]
          }
        }
      },
      "CustomerPrice": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "partner_id",
          "product_id",
          "quantity",
          "pricelist_id",
          "rule_id",
          "uom_id",
          "currency_id",
          "currency",
          "unit_price",
          "date",
          "price_convention"
        ],
        "properties": {
          "partner_id": {
            "type": "integer"
          },
          "product_id": {
            "type": "integer"
          },
          "quantity": {
            "type": "number"
          },
          "pricelist_id": {
            "type": "integer"
          },
          "rule_id": {
            "type": "integer",
            "nullable": true
          },
          "uom_id": {
            "type": "integer"
          },
          "currency_id": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "unit_price": {
            "type": "number"
          },
          "date": {
            "type": "string",
            "nullable": true,
            "format": "date"
          },
          "price_convention": {
            "type": "string",
            "enum": [
              "native_pricelist_unit_price_before_fiscal_position_and_final_taxes"
            ]
          }
        }
      }
    }
  }
}
