{
  "components": {
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Refused"
      }
    },
    "schemas": {
      "Address": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BandResponse": {
        "properties": {
          "from": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "rate": {
            "type": "string"
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorGatewaySetting": {
        "properties": {
          "collect_later": {
            "type": "boolean"
          },
          "fund_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "gib_payment_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "gib_payment_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "gib_payment_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "type": "string"
          },
          "mapped": {
            "type": "boolean"
          },
          "payment_method_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorIssue": {
        "properties": {
          "attempts": {
            "type": "integer"
          },
          "issue_key": {
            "type": "string"
          },
          "resolved_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorIssueReport": {
        "properties": {
          "attempts": {
            "type": [
              "integer",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "params": {
            "additionalProperties": {},
            "type": "object"
          },
          "woo_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorRemoteEntry": {
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "key": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorRemoteItem": {
        "properties": {
          "gtin": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "woo_id": {
            "type": "integer"
          },
          "woo_parent_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorRemoteItems": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConnectorRemoteItem"
            },
            "type": "array"
          },
          "removed_woo_ids": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ConnectorRemoteItemsResult": {
        "properties": {
          "already_paired": {
            "type": "integer"
          },
          "removed": {
            "type": "integer"
          },
          "upserted": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ConnectorServiceSetting": {
        "properties": {
          "key": {
            "type": "string"
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorSettings": {
        "properties": {
          "default_fee_service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "default_shipping_service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "fees": {
            "items": {
              "$ref": "#/components/schemas/ConnectorServiceSetting"
            },
            "type": "array"
          },
          "gateways": {
            "items": {
              "$ref": "#/components/schemas/ConnectorGatewaySetting"
            },
            "type": "array"
          },
          "rounding_service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "rounding_tolerance": {
            "type": "string"
          },
          "shipping_methods": {
            "items": {
              "$ref": "#/components/schemas/ConnectorServiceSetting"
            },
            "type": "array"
          },
          "site_id": {
            "format": "uuid",
            "type": "string"
          },
          "stock_buffer": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "warehouse_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ConnectorSiteAnswer": {
        "properties": {
          "reported_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "site_id": {
            "format": "uuid",
            "type": "string"
          },
          "site_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "store_currency": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ConnectorSiteReport": {
        "properties": {
          "fees": {
            "items": {
              "$ref": "#/components/schemas/ConnectorRemoteEntry"
            },
            "type": "array"
          },
          "gateways": {
            "items": {
              "$ref": "#/components/schemas/ConnectorRemoteEntry"
            },
            "type": "array"
          },
          "plugin_version": {
            "type": "string"
          },
          "price_decimals": {
            "type": "integer"
          },
          "prices_include_tax": {
            "type": "boolean"
          },
          "shipping_methods": {
            "items": {
              "$ref": "#/components/schemas/ConnectorRemoteEntry"
            },
            "type": "array"
          },
          "site_url": {
            "type": "string"
          },
          "store_currency": {
            "type": "string"
          },
          "wc_version": {
            "type": "string"
          },
          "wp_timezone": {
            "type": "string"
          },
          "wp_version": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Customer": {
        "properties": {
          "address": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "e_invoice_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "id_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_office": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustomerUpsert": {
        "properties": {
          "address": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "e_invoice_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_office": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "DateRange": {
        "properties": {
          "from": {
            "type": "string"
          },
          "until": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Delivery": {
        "properties": {
          "attempts": {
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "endpoint_id": {
            "format": "uuid",
            "type": "string"
          },
          "event_id": {
            "format": "uuid",
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "last_attempt_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "next_attempt_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DocLineTax": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "base": {
            "type": "string"
          },
          "effect": {
            "type": "string"
          },
          "rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "EInvoiceRequest": {
        "properties": {
          "internet_sale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/InternetSale"
              },
              {
                "type": "null"
              }
            ]
          },
          "send": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "EInvoiceSendRequest": {
        "properties": {
          "internet_sale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/InternetSale"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "EInvoiceSummary": {
        "properties": {
          "ettn": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "family": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile": {
            "type": "string"
          },
          "send_error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SendError"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string"
          },
          "state_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Endpoint": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "disabled_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "failing_since": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "integration_id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "localized_message": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "request_id": {
            "type": "string"
          },
          "success": {
            "const": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ExternalRef": {
        "properties": {
          "entity_id": {
            "format": "uuid",
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExternalRefPut": {
        "properties": {
          "entity_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Fund": {
        "properties": {
          "branch_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "InternetSale": {
        "properties": {
          "carrier_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "carrier_tax_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "payment_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "type": "string"
          },
          "shipment_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "web_address": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "InvoiceCustomer": {
        "properties": {
          "anonymous": {
            "type": "boolean"
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "InvoiceLine": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "taxes": {
            "items": {
              "$ref": "#/components/schemas/InvoiceTax"
            },
            "type": "array"
          },
          "unit_price": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "InvoiceSettlement": {
        "properties": {
          "tenders": {
            "items": {
              "$ref": "#/components/schemas/InvoiceTender"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "InvoiceTax": {
        "properties": {
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "InvoiceTender": {
        "properties": {
          "amount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "fund_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ItemSchedule": {
        "properties": {
          "current": {
            "$ref": "#/components/schemas/PriceAt"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "segments": {
            "items": {
              "$ref": "#/components/schemas/PriceSegment"
            },
            "type": "array"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "MeFiscalYear": {
        "properties": {
          "end_date": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_closed": {
            "type": "boolean"
          },
          "start_date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "MeKey": {
        "properties": {
          "display_prefix": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "MeOrganization": {
        "properties": {
          "base_currency": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "MeRateLimits": {
        "properties": {
          "requests_per_minute_per_key": {
            "type": "integer"
          },
          "requests_per_minute_per_organization": {
            "type": "integer"
          },
          "writes_per_minute_per_key": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MeRef": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "MeResponse": {
        "properties": {
          "api_key": {
            "$ref": "#/components/schemas/MeKey"
          },
          "branch": {
            "$ref": "#/components/schemas/MeRef"
          },
          "fiscal_year": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MeFiscalYear"
              },
              {
                "type": "null"
              }
            ]
          },
          "integration": {
            "$ref": "#/components/schemas/MeRef"
          },
          "modules": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "organization": {
            "$ref": "#/components/schemas/MeOrganization"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "rate_limits": {
            "$ref": "#/components/schemas/MeRateLimits"
          }
        },
        "type": "object"
      },
      "Meta": {
        "properties": {
          "page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "OrderEInvoice": {
        "properties": {
          "internet_sale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/InternetSale"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "OrderSale": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "number": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PartyRef": {
        "properties": {
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Payment": {
        "properties": {
          "awaiting_approval": {
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PaymentLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "string"
          },
          "origin_invoice_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "party_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "party_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_date": {
            "type": "string"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentCreate": {
        "properties": {
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PaymentCreateRow"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "origin_invoice_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "party": {
            "$ref": "#/components/schemas/PartyRef"
          },
          "payment_date": {
            "type": "string"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "settles_role": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentCreateRow": {
        "properties": {
          "amount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_amount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "fund_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentLine": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "fund_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "payment_method_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentMethodResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "gib_payment_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "gib_payment_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "gib_payment_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "pos_config": {},
          "pos_enabled": {
            "type": "boolean"
          },
          "sort_order": {
            "type": "integer"
          },
          "system_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentTender": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "fund_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PreviewLine": {
        "properties": {
          "index": {
            "type": "integer"
          },
          "net": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PriceAt": {
        "properties": {
          "unit_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "until": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PriceSchedule": {
        "properties": {
          "channel": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "generated_at": {
            "format": "date-time",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemSchedule"
            },
            "type": "array"
          },
          "window": {
            "$ref": "#/components/schemas/DateRange"
          }
        },
        "type": "object"
      },
      "PriceScheduleRequest": {
        "properties": {
          "channel": {
            "type": [
              "string",
              "null"
            ]
          },
          "days": {
            "type": [
              "integer",
              "null"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ScheduleItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PriceSegment": {
        "properties": {
          "from": {
            "type": "string"
          },
          "unit_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "until": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ProductBarcodeResponse": {
        "properties": {
          "code": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_primary": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProductResponse": {
        "properties": {
          "allow_negative_stock": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "barcodes": {
            "items": {
              "$ref": "#/components/schemas/ProductBarcodeResponse"
            },
            "type": "array"
          },
          "base_unit_id": {
            "format": "uuid",
            "type": "string"
          },
          "brand_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "brand_name": {
            "type": "string"
          },
          "catalog_published": {
            "type": "boolean"
          },
          "category_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "has_sub_units": {
            "type": "boolean"
          },
          "has_variants": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "images": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_stockless": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_type": {
            "type": "string"
          },
          "public_search_listed": {
            "type": "boolean"
          },
          "reorder_point": {
            "type": [
              "number",
              "null"
            ]
          },
          "safety_stock": {
            "type": [
              "number",
              "null"
            ]
          },
          "standard_weight": {
            "type": [
              "number",
              "null"
            ]
          },
          "storefront": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StorefrontInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_stock": {
            "type": [
              "number",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ProductWithVariants": {
        "properties": {
          "allow_negative_stock": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "barcodes": {
            "items": {
              "$ref": "#/components/schemas/ProductBarcodeResponse"
            },
            "type": "array"
          },
          "base_unit_id": {
            "format": "uuid",
            "type": "string"
          },
          "brand_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "brand_name": {
            "type": "string"
          },
          "catalog_published": {
            "type": "boolean"
          },
          "category_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "has_sub_units": {
            "type": "boolean"
          },
          "has_variants": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "images": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_stockless": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_type": {
            "type": "string"
          },
          "public_search_listed": {
            "type": "boolean"
          },
          "reorder_point": {
            "type": [
              "number",
              "null"
            ]
          },
          "safety_stock": {
            "type": [
              "number",
              "null"
            ]
          },
          "standard_weight": {
            "type": [
              "number",
              "null"
            ]
          },
          "storefront": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/StorefrontInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "storefront_group_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "target_stock": {
            "type": [
              "number",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/VariantResponse"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PurchaseInvoice": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "header_discount": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoice_date": {
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PurchaseInvoiceLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "string"
          },
          "open": {
            "type": "string"
          },
          "payable": {
            "type": "string"
          },
          "posted": {
            "type": "boolean"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "supplier_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "supplier_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PurchaseInvoiceCreate": {
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "header_discount_amount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_date": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PurchaseLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplier": {
            "$ref": "#/components/schemas/SupplierRef"
          },
          "warehouse_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PurchaseInvoiceLine": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "net": {
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax": {
            "type": "string"
          },
          "taxes": {
            "items": {
              "$ref": "#/components/schemas/DocLineTax"
            },
            "type": "array"
          },
          "unit_price": {
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PurchaseLine": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "taxes": {
            "items": {
              "$ref": "#/components/schemas/InvoiceTax"
            },
            "type": "array"
          },
          "unit_price": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "QuoteLine": {
        "properties": {
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "quantity": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "QuoteRequest": {
        "properties": {
          "channel": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/QuoteLine"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "QuotedLine": {
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "rule_level": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "RateResponse": {
        "properties": {
          "bands": {
            "items": {
              "$ref": "#/components/schemas/BandResponse"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "max_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid_from": {
            "type": "string"
          },
          "valid_to": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ReturnRefund": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "number": {
            "type": "string"
          },
          "tenders": {
            "items": {
              "$ref": "#/components/schemas/PaymentTender"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RotatedSecret": {
        "properties": {
          "previous_valid_hours": {
            "type": "integer"
          },
          "secret": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RowResponse": {
        "properties": {
          "avg_cost": {
            "type": [
              "number",
              "null"
            ]
          },
          "base_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_estimated_movements": {
            "type": "integer"
          },
          "item_name": {
            "type": "string"
          },
          "item_short_quantity": {
            "type": "number"
          },
          "item_uncosted_quantity": {
            "type": "number"
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "number"
          },
          "reserved": {
            "type": "number"
          },
          "second_unit_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "second_unit_quantity": {
            "type": [
              "number",
              "null"
            ]
          },
          "total_value": {
            "type": [
              "number",
              "null"
            ]
          },
          "valuation_status": {
            "type": "string"
          },
          "value_allocated": {
            "type": "boolean"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "format": "uuid",
            "type": "string"
          },
          "warehouse_name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SalesInvoice": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customer_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "type": "string"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "e_invoice": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EInvoiceSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoice_date": {
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SalesInvoiceLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "string"
          },
          "open": {
            "type": "string"
          },
          "payable": {
            "type": "string"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "shipment": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Shipment"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_document_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SalesInvoiceCreate": {
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/InvoiceCustomer"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "e_invoice": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EInvoiceRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "exchange_rate": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_date": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "settlement": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/InvoiceSettlement"
              },
              {
                "type": "null"
              }
            ]
          },
          "warehouse_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SalesInvoiceLine": {
        "properties": {
          "discount": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "item_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SalesOrder": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customer_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "type": "string"
          },
          "exchange_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoicing_state": {
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SalesOrderLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "string"
          },
          "order_date": {
            "type": "string"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "reserved": {
            "type": "boolean"
          },
          "sales": {
            "items": {
              "$ref": "#/components/schemas/OrderSale"
            },
            "type": "array"
          },
          "subtotal": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SalesOrderCancelled": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SalesOrderCreate": {
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/InvoiceCustomer"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_date": {
            "type": "string"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "warehouse_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SalesOrderInvoice": {
        "properties": {
          "e_invoice": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrderEInvoice"
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_date": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "settlement": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/InvoiceSettlement"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "SalesOrderLine": {
        "properties": {
          "discount": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiced": {
            "type": "string"
          },
          "item_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "remaining": {
            "type": "string"
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SalesPreviewRequest": {
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer": {
            "$ref": "#/components/schemas/InvoiceCustomer"
          },
          "due_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/InvoiceLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_date": {
            "type": "string"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string"
          },
          "warehouse_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SalesReturn": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "customer_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "type": "string"
          },
          "exchange_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_cancelled": {
            "type": "boolean"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SalesReturnLine"
            },
            "type": "array"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "type": "string"
          },
          "reference_invoice_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "refunds": {
            "items": {
              "$ref": "#/components/schemas/ReturnRefund"
            },
            "type": "array"
          },
          "return_date": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SalesReturnLine": {
        "properties": {
          "discount": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "item_type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "net": {
            "type": "string"
          },
          "product_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "reference_invoice_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "reference_invoice_item_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "service_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ScheduleItem": {
        "properties": {
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "variant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SendError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ServiceResponse": {
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "default_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "expense_account_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "revenue_account_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "unit_id": {
            "format": "uuid",
            "type": "string"
          },
          "unit_name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ShareLink": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "reused": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Shipment": {
        "properties": {
          "carrier_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "carrier_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "carrier_tax_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "shipped_at": {
            "format": "date-time",
            "type": "string"
          },
          "tracking_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Slip": {
        "properties": {
          "awaiting_approval": {
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "fund_rows": {
            "items": {
              "$ref": "#/components/schemas/SlipFundOut"
            },
            "type": "array"
          },
          "header_discount": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SlipLineOut"
            },
            "type": "array"
          },
          "lines_total": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "open": {
            "type": [
              "string",
              "null"
            ]
          },
          "party_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "payable": {
            "type": "string"
          },
          "posted": {
            "type": "boolean"
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "slip_date": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SlipCreate": {
        "properties": {
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_rate": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "fund_rows": {
            "items": {
              "$ref": "#/components/schemas/SlipFundRow"
            },
            "type": "array"
          },
          "header_discount_amount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "header_discount_percent": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/SlipLine"
            },
            "type": "array"
          },
          "party": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PartyRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "slip_date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SlipFundOut": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "fund_id": {
            "format": "uuid",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "line_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SlipFundRow": {
        "properties": {
          "amount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "fund_id": {
            "format": "uuid",
            "type": "string"
          },
          "line_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SlipLine": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_discount": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_price": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          },
          "tax_type_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "taxes": {
            "items": {
              "$ref": "#/components/schemas/InvoiceTax"
            },
            "type": "array"
          },
          "title_id": {
            "format": "uuid",
            "type": "string"
          },
          "unit_price": {
            "description": "decimal as a string",
            "pattern": "^-?\\d+(\\.\\d{1,4})?$",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SlipLineOut": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "discount": {
            "type": "string"
          },
          "exchange_discount": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange_price": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "taxes": {
            "items": {
              "$ref": "#/components/schemas/DocLineTax"
            },
            "type": "array"
          },
          "title_id": {
            "format": "uuid",
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StorefrontGroup": {
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "parent_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "product_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "sort_order": {
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StorefrontInfo": {
        "properties": {
          "always_available": {
            "type": "boolean"
          },
          "featured_on_home": {
            "type": "boolean"
          },
          "site_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "site_description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "site_names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "Supplier": {
        "properties": {
          "address": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "e_invoice_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "id_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_office": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SupplierRef": {
        "properties": {
          "external_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SupplierUpsert": {
        "properties": {
          "address": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ]
          },
          "e_invoice_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "id_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_office": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TaxTypeResponse": {
        "properties": {
          "applies_to": {
            "type": "string"
          },
          "authority_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "base_groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "base_rule": {
            "type": "string"
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "default_reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "effect": {
            "type": "string"
          },
          "has_advanced": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_system": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "locked_fields": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "purchase_account_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_treatment": {
            "type": "string"
          },
          "rate": {
            "type": "number"
          },
          "rate_from_reason": {
            "type": "boolean"
          },
          "rates": {
            "items": {
              "$ref": "#/components/schemas/RateResponse"
            },
            "type": "array"
          },
          "reason_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason_required": {
            "type": "boolean"
          },
          "rounding_mode": {
            "type": "string"
          },
          "rounding_scale": {
            "type": "integer"
          },
          "sale_account_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "tax_group": {
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "unit_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Title": {
        "properties": {
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "TotalsPreview": {
        "properties": {
          "campaign_discount": {
            "type": "string"
          },
          "line_discount": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PreviewLine"
            },
            "type": "array"
          },
          "rounding_discount": {
            "type": "string"
          },
          "subtotal": {
            "type": "string"
          },
          "tax": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "withheld": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UnitResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_system": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "sort_order": {
            "type": "integer"
          },
          "system_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "tenant_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VariantAttributeResponse": {
        "properties": {
          "attribute_id": {
            "format": "uuid",
            "type": "string"
          },
          "attribute_name": {
            "type": "string"
          },
          "value_code": {
            "type": "string"
          },
          "value_id": {
            "format": "uuid",
            "type": "string"
          },
          "value_name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "VariantResponse": {
        "properties": {
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/VariantAttributeResponse"
            },
            "type": "array"
          },
          "barcode": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "product_id": {
            "format": "uuid",
            "type": "string"
          },
          "reorder_point": {
            "type": [
              "number",
              "null"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort_order": {
            "type": "integer"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WarehouseResponse": {
        "properties": {
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "branch_id": {
            "format": "uuid",
            "type": "string"
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "tenant_id": {
            "format": "uuid",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookEndpointCreate": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookEndpointCreated": {
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/Endpoint"
          },
          "secret": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookEndpointUpdate": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "WebhookEvent": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "description": "minimal: `id` of the record and a few fields; re-read the record through the API",
            "type": "object"
          },
          "id": {
            "description": "the event's id (also the PazarCloud-Event-Id header); deliveries are at-least-once, de-duplicate by it",
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      },
      "bearerAuth": {
        "bearerFormat": "pcl_<env>_<id>_<secret>",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Server-to-server API of a PazarCloud organisation. Authenticate with an API key (`Authorization: Bearer pcl_…` or `X-API-Key`). Money and quantities are decimal strings; dates are YYYY-MM-DD; times RFC 3339 UTC. Every answer is `{success, data, message, localized_message}`; errors `{success:false, error:{code, message, localized_message, details}, request_id}`.",
    "title": "PazarCloud Developer API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/connector/issues/{key}": {
      "delete": {
        "description": "Needs the organisation's `ecommerce` module.",
        "operationId": "delete_connector_issues_key",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no WooCommerce connection, or the connection never had this issue."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Clear an issue once its action succeeded",
        "tags": [
          "WooCommerce connector"
        ]
      },
      "put": {
        "description": "Needs the organisation's `ecommerce` module.",
        "operationId": "put_connector_issues_key",
        "parameters": [
          {
            "in": "path",
            "name": "key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorIssueReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConnectorIssue"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: this key's integration has no WooCommerce connection."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Report a refused or failed shop action (needs attention); params never hold shopper personal data",
        "tags": [
          "WooCommerce connector"
        ]
      }
    },
    "/connector/remote-items": {
      "put": {
        "description": "Needs the organisation's `ecommerce` module.",
        "operationId": "put_connector_remote_items",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorRemoteItems"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConnectorRemoteItemsResult"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: this key's integration has no WooCommerce connection."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Report shop products / variations that matched nothing (one batch, up to 500), and remove the ones no longer unmatched",
        "tags": [
          "WooCommerce connector"
        ]
      }
    },
    "/connector/settings": {
      "get": {
        "description": "Needs the organisation's `ecommerce` module.",
        "operationId": "get_connector_settings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConnectorSettings"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: this key's integration has no WooCommerce connection."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "The connection's settings the merchant keeps in the app (warehouses, buffer, rounding, gateway and service mappings)",
        "tags": [
          "WooCommerce connector"
        ]
      }
    },
    "/connector/site": {
      "put": {
        "description": "Needs the organisation's `ecommerce` module.",
        "operationId": "put_connector_site",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectorSiteReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConnectorSiteAnswer"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: this key's integration has no WooCommerce connection."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `CONNECTOR_SITE_TAKEN`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Report the connected shop (versions, time zone, currency, gateways, shipping methods, fees); mappings keep their targets",
        "tags": [
          "WooCommerce connector"
        ]
      }
    },
    "/customers": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.ofa_customer.list`.",
        "operationId": "get_customers",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "VKN / TCKN",
            "in": "query",
            "name": "tax_number",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "customer code",
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List customers (stable order for sync)",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/by-ref/{external_ref}": {
      "put": {
        "description": "Requires the integration's role to hold: `definitions.ofa_customer.create`, `definitions.ofa_customer.edit`.",
        "operationId": "put_customers_by_ref_external_ref",
        "parameters": [
          {
            "in": "path",
            "name": "external_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpsert"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create or update a customer by this integration's reference",
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{id}": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.ofa_customer.view`.",
        "operationId": "get_customers_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no customer of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a customer",
        "tags": [
          "Customers"
        ]
      }
    },
    "/expense-slips": {
      "get": {
        "description": "Requires the integration's role to hold: `treasury.expense_slips.list`.",
        "operationId": "get_expense_slips",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or after",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or before",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Slip"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the expense slips of the fiscal year, or find one by this integration's reference",
        "tags": [
          "Income and expense slips"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `treasury.expense_slips.create`.",
        "operationId": "post_expense_slips",
        "parameters": [
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlipCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Slip"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `EXTERNAL_REF_EXISTS`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `DATE_OUTSIDE_FISCAL_YEAR`, `MISSING_TAX_ACCOUNT`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Record an expense slip (lines on expense titles, taxes by tax type; held for a second signature above the threshold when paid from funds)",
        "tags": [
          "Income and expense slips"
        ]
      }
    },
    "/expense-slips/{id}": {
      "delete": {
        "description": "Requires the integration's role to hold: `treasury.expense_slips.delete`.",
        "operationId": "delete_expense_slips_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no expense slip of the organisation has this id."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete an expense slip (its entry and references go with it; linked payments stay)",
        "tags": [
          "Income and expense slips"
        ]
      },
      "get": {
        "description": "Requires the integration's role to hold: `treasury.expense_slips.view`.",
        "operationId": "get_expense_slips_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Slip"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no expense slip of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get an expense slip",
        "tags": [
          "Income and expense slips"
        ]
      }
    },
    "/external-refs": {
      "get": {
        "operationId": "get_external_refs",
        "parameters": [
          {
            "description": "customer, supplier, product, product_variant, service, sales_invoice, sales_order, purchase_invoice, income_slip or expense_slip",
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "the reference",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExternalRef"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no record of this type has the reference."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Find the record of a reference",
        "tags": [
          "External references"
        ]
      }
    },
    "/external-refs/{entity_type}/{external_ref}": {
      "delete": {
        "operationId": "delete_external_refs_entity_type_external_ref",
        "parameters": [
          {
            "in": "path",
            "name": "entity_type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "external_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no record of this type has the reference."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Unpair a reference (the record stays)",
        "tags": [
          "External references"
        ]
      },
      "put": {
        "operationId": "put_external_refs_entity_type_external_ref",
        "parameters": [
          {
            "in": "path",
            "name": "entity_type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "external_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalRefPut"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExternalRef"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `EXTERNAL_REF_EXISTS`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Pair an existing record with a reference",
        "tags": [
          "External references"
        ]
      }
    },
    "/funds": {
      "get": {
        "operationId": "get_funds",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Fund"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the cash boxes and bank accounts a tender may name (fund_id)",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/income-slips": {
      "get": {
        "description": "Requires the integration's role to hold: `treasury.income_slips.list`.",
        "operationId": "get_income_slips",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or after",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or before",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Slip"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the income slips of the fiscal year, or find one by this integration's reference",
        "tags": [
          "Income and expense slips"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `treasury.income_slips.create`.",
        "operationId": "post_income_slips",
        "parameters": [
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlipCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Slip"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `EXTERNAL_REF_EXISTS`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `DATE_OUTSIDE_FISCAL_YEAR`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Record an income slip (lines on income titles; no taxes)",
        "tags": [
          "Income and expense slips"
        ]
      }
    },
    "/income-slips/{id}": {
      "delete": {
        "description": "Requires the integration's role to hold: `treasury.income_slips.delete`.",
        "operationId": "delete_income_slips_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no income slip of the organisation has this id."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete an income slip (its entry and references go with it; linked payments stay)",
        "tags": [
          "Income and expense slips"
        ]
      },
      "get": {
        "description": "Requires the integration's role to hold: `treasury.income_slips.view`.",
        "operationId": "get_income_slips_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Slip"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no income slip of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get an income slip",
        "tags": [
          "Income and expense slips"
        ]
      }
    },
    "/me": {
      "get": {
        "operationId": "get_me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MeResponse"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Who the key acts as and what it may do",
        "tags": [
          "Account"
        ]
      }
    },
    "/payment-methods": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.payment_methods.list`.",
        "operationId": "get_payment_methods",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PaymentMethodResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List payment methods",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/payments": {
      "get": {
        "description": "Requires the integration's role to hold: `treasury.payments.list`.",
        "operationId": "get_payments",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or after",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or before",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Payment"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the receipts and payments of the fiscal year (stable order for sync), or find one by this integration's reference",
        "tags": [
          "Payments"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `treasury.payments.create`.",
        "operationId": "post_payments",
        "parameters": [
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Payment"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: origin_invoice_id names no sale or sales return the integration may read."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `EXTERNAL_REF_EXISTS`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `DATE_OUTSIDE_FISCAL_YEAR`, `CREDIT_LIMIT_EXCEEDED`, `CREDIT_LIMIT_WARNING`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Record a stand-alone receipt or payment (cash, transfer or card rows; held for a second signature above the threshold)",
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{id}": {
      "delete": {
        "description": "Requires the integration's role to hold: `treasury.payments.delete`.",
        "operationId": "delete_payments_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no receipt or payment of the organisation has this id."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `PAYMENT_ACCOUNTING_LOCKED`, `RECORD_IN_USE`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete a receipt or payment (its entry and references go with it)",
        "tags": [
          "Payments"
        ]
      },
      "get": {
        "description": "Requires the integration's role to hold: `treasury.payments.view`.",
        "operationId": "get_payments_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Payment"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no receipt or payment of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a receipt or payment (lines: method, fund, amount; the document it was recorded for)",
        "tags": [
          "Payments"
        ]
      }
    },
    "/prices/quote": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.pricing.view`.",
        "operationId": "post_prices_quote",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/QuotedLine"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Price lines by the pricing rules (channel ordinary or online)",
        "tags": [
          "Products"
        ]
      }
    },
    "/prices/schedule": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.pricing.view`.",
        "operationId": "post_prices_schedule",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceScheduleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PriceSchedule"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "General price timeline per item: today's price and dated changes (no customer, quantity 1)",
        "tags": [
          "Products"
        ]
      }
    },
    "/products": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.products.list`.",
        "operationId": "get_products",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true (active only) or false (inactive only); omitted: both",
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; the product, one of its variants or its online-store identity changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ProductResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List products (with updated_since: the changed ones, stable order for sync)",
        "tags": [
          "Products"
        ]
      }
    },
    "/products/{id}": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.products.view`.",
        "operationId": "get_products_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProductWithVariants"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no product of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a product with its variants",
        "tags": [
          "Products"
        ]
      }
    },
    "/purchase-invoices": {
      "get": {
        "description": "Requires the integration's role to hold: `purchases.invoices.list`.",
        "operationId": "get_purchase_invoices",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or after",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; document date on or before",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference; when given, the one document with it in whichever fiscal year it lives (the other parameters are ignored)",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/PurchaseInvoice"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the purchases of the fiscal year (stable order for sync), or find one by this integration's reference",
        "tags": [
          "Purchase invoices"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `purchases.invoices.create`.",
        "operationId": "post_purchase_invoices",
        "parameters": [
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseInvoiceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchaseInvoice"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `EXTERNAL_REF_EXISTS`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `DATE_OUTSIDE_FISCAL_YEAR`, `MISSING_TAX_ACCOUNT`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Record a purchase (posted with its entry in the same transaction)",
        "tags": [
          "Purchase invoices"
        ]
      }
    },
    "/purchase-invoices/{id}": {
      "delete": {
        "description": "Requires the integration's role to hold: `purchases.invoices.delete`.",
        "operationId": "delete_purchase_invoices_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no purchase of the organisation has this id."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delete a purchase (its stock, entry and references go with it)",
        "tags": [
          "Purchase invoices"
        ]
      },
      "get": {
        "description": "Requires the integration's role to hold: `purchases.invoices.view`.",
        "operationId": "get_purchase_invoices_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchaseInvoice"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no purchase of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a purchase",
        "tags": [
          "Purchase invoices"
        ]
      }
    },
    "/sales-invoices": {
      "get": {
        "description": "Requires the integration's role to hold: `sales.invoices.list`. Needs the organisation's `sales` module.",
        "operationId": "get_sales_invoices",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; invoice date on or after",
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "YYYY-MM-DD; invoice date on or before",
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference; when given, the one sale with it in whichever fiscal year it lives (the other parameters are ignored)",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SalesInvoice"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the sales of the fiscal year (stable order for sync), or find one by this integration's reference",
        "tags": [
          "Sales invoices"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_invoices",
        "parameters": [
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesInvoiceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesInvoice"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `INSUFFICIENT_STOCK`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `CREDIT_LIMIT_EXCEEDED`, `CREDIT_LIMIT_WARNING`, `CHEQUE_LIMIT_EXCEEDED`, `CHEQUE_LIMIT_WARNING`, `EXTERNAL_REF_EXISTS`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create a sale (optionally send its e-invoice)",
        "tags": [
          "Sales invoices"
        ]
      }
    },
    "/sales-invoices/preview": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_invoices_preview",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TotalsPreview"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `INSUFFICIENT_STOCK`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Totals of a would-be sale or sales order (nothing is written, no number is taken)",
        "tags": [
          "Sales invoices"
        ]
      }
    },
    "/sales-invoices/{id}": {
      "get": {
        "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
        "operationId": "get_sales_invoices_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesInvoice"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sale of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a sale",
        "tags": [
          "Sales invoices"
        ]
      }
    },
    "/sales-invoices/{id}/e-invoice": {
      "get": {
        "description": "Requires the integration's role to hold: `tr_tax.documents.view`. Needs the organisation's `e_invoice` module.",
        "operationId": "get_sales_invoices_id_e_invoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EInvoiceSummary"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no such sale, or the sale has no e-invoice yet."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "The sale's e-invoice state",
        "tags": [
          "E-invoices (Türkiye)"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `tr_tax.documents.send`, `tr_tax.documents.edit`. Needs the organisation's `e_invoice` module.",
        "operationId": "post_sales_invoices_id_e_invoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EInvoiceSendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EInvoiceSummary"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sale of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send (or re-send) the sale's e-invoice",
        "tags": [
          "E-invoices (Türkiye)"
        ]
      }
    },
    "/sales-invoices/{id}/e-invoice/pdf": {
      "get": {
        "description": "Requires the integration's role to hold: `tr_tax.documents.view`. Needs the organisation's `e_invoice` module.",
        "operationId": "get_sales_invoices_id_e_invoice_pdf",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no such sale, or the sale has no e-invoice yet."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "The e-invoice PDF (once handed over to GİB)",
        "tags": [
          "E-invoices (Türkiye)"
        ]
      }
    },
    "/sales-invoices/{id}/share-link": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_invoices_id_share_link",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShareLink"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sale of the organisation has this id."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `INVOICE_SHARE_UNAVAILABLE`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "The sale's live share link (the invoice page, 30 days; minted when none is live, else the same link)",
        "tags": [
          "Sales invoices"
        ]
      }
    },
    "/sales-orders": {
      "get": {
        "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
        "operationId": "get_sales_orders",
        "parameters": [
          {
            "description": "this integration's reference (required)",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SalesOrder"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Find the sales order of this integration's reference",
        "tags": [
          "Sales orders"
        ]
      },
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_orders",
        "parameters": [
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesOrderCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesOrder"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `EXTERNAL_REF_EXISTS`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create a reserving sales order (a shop order placed; customer by this integration's reference)",
        "tags": [
          "Sales orders"
        ]
      }
    },
    "/sales-orders/by-ref/{external_ref}/invoice": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_orders_by_ref_external_ref_invoice",
        "parameters": [
          {
            "in": "path",
            "name": "external_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesOrderInvoice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesInvoice"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sales order of the organisation has this id (of this integration's reference)."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `INSUFFICIENT_STOCK`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `CREDIT_LIMIT_EXCEEDED`, `CREDIT_LIMIT_WARNING`, `CHEQUE_LIMIT_EXCEEDED`, `CHEQUE_LIMIT_WARNING`, `ORDER_ALREADY_INVOICED`, `ORDER_SALE_CANCELLED`, `SOURCE_CANCELLED`, `EXTERNAL_REF_EXISTS`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Invoice the sales order of this integration's reference",
        "tags": [
          "Sales orders"
        ]
      }
    },
    "/sales-orders/{id}": {
      "get": {
        "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
        "operationId": "get_sales_orders_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesOrder"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sales order of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a sales order (invoiced and remaining per line, the sales made from it)",
        "tags": [
          "Sales orders"
        ]
      }
    },
    "/sales-orders/{id}/cancel": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.edit`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_orders_id_cancel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesOrderCancelled"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sales order of the organisation has this id."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `ORDER_ALREADY_INVOICED`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Cancel a sales order with nothing invoiced (a shop order abandoned); idempotent",
        "tags": [
          "Sales orders"
        ]
      }
    },
    "/sales-orders/{id}/invoice": {
      "post": {
        "description": "Requires the integration's role to hold: `sales.invoices.create`. Needs the organisation's `sales` module.",
        "operationId": "post_sales_orders_id_invoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "client-generated, at most 128 characters; a retry with the same key replays the first answer (24 h)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SalesOrderInvoice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesInvoice"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sales order of the organisation has this id (of this integration's reference)."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Refused by a business rule; `error.code` is one of `INSUFFICIENT_STOCK`, `MISSING_CONTROL_ACCOUNT`, `FISCAL_YEAR_CLOSED`, `PERIOD_CLOSED`, `CREDIT_LIMIT_EXCEEDED`, `CREDIT_LIMIT_WARNING`, `CHEQUE_LIMIT_EXCEEDED`, `CHEQUE_LIMIT_WARNING`, `ORDER_ALREADY_INVOICED`, `ORDER_SALE_CANCELLED`, `SOURCE_CANCELLED`, `EXTERNAL_REF_EXISTS`."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Invoice the sales order (a shop order paid): a sale of every remaining line at the order's prices",
        "tags": [
          "Sales orders"
        ]
      }
    },
    "/sales-returns/{id}": {
      "get": {
        "description": "Requires the integration's role to hold: `sales.invoices.view`. Needs the organisation's `sales` module.",
        "operationId": "get_sales_returns_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SalesReturn"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no sales return of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a sales return (lines with the sale lines they return; refunds only with treasury.payments.list and treasury.payments.view, else [])",
        "tags": [
          "Sales returns"
        ]
      }
    },
    "/services": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.services.list`.",
        "operationId": "get_services",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/ServiceResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List services",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/stock": {
      "get": {
        "description": "Requires the integration's role to hold: `sales.current_stock.list`. Needs the organisation's `inventory` module.",
        "operationId": "get_stock",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID",
            "in": "query",
            "name": "warehouse_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID",
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID",
            "in": "query",
            "name": "variant_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; the row's quantity changed after (a reservation alone moves no row)",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/RowResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Current stock per item and warehouse",
        "tags": [
          "Products"
        ]
      }
    },
    "/storefront-groups": {
      "get": {
        "description": "Requires the integration's role to hold: `settings.storefront_groups.list`. Needs the organisation's `ecommerce` module.",
        "operationId": "get_storefront_groups",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/StorefrontGroup"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Online-store groups with their products (what a shop sells and its categories)",
        "tags": [
          "Products"
        ]
      }
    },
    "/suppliers": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.ofa_supplier.list`.",
        "operationId": "get_suppliers",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "this integration's reference",
            "in": "query",
            "name": "external_ref",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "VKN / TCKN",
            "in": "query",
            "name": "tax_number",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "supplier code",
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "RFC 3339; changed after",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Supplier"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List suppliers (stable order for sync)",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/by-ref/{external_ref}": {
      "put": {
        "description": "Requires the integration's role to hold: `definitions.ofa_supplier.create`, `definitions.ofa_supplier.edit`.",
        "operationId": "put_suppliers_by_ref_external_ref",
        "parameters": [
          {
            "in": "path",
            "name": "external_ref",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupplierUpsert"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Supplier"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Create or update a supplier by this integration's reference",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/suppliers/{id}": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.ofa_supplier.view`.",
        "operationId": "get_suppliers_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Supplier"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found: no supplier of the organisation has this id."
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Get a supplier",
        "tags": [
          "Suppliers"
        ]
      }
    },
    "/tax-types": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.tax_types.list`.",
        "operationId": "get_tax_types",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TaxTypeResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List tax types",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/titles": {
      "get": {
        "operationId": "get_titles",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "income or expense; omitted: both",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Title"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List the income / expense titles a slip line names (title_id), of the kinds the role may list",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/units": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.units.list`.",
        "operationId": "get_units",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/UnitResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List units",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/warehouses": {
      "get": {
        "description": "Requires the integration's role to hold: `definitions.warehouses.list`.",
        "operationId": "get_warehouses",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/WarehouseResponse"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "List warehouses",
        "tags": [
          "Lookups"
        ]
      }
    },
    "/webhook-deliveries": {
      "get": {
        "operationId": "get_webhook_deliveries",
        "parameters": [
          {
            "description": "page number, from 1",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page size, 1 to 100 (default 25)",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID",
            "in": "query",
            "name": "endpoint_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "pending, failed, delivered or gave_up",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Delivery"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Delivery log (30 days)",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-deliveries/{id}/redeliver": {
      "post": {
        "operationId": "post_webhook_deliveries_id_redeliver",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Deliver again",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-endpoints": {
      "get": {
        "operationId": "get_webhook_endpoints",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/Endpoint"
                      },
                      "type": "array"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "This integration's webhook endpoints",
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "operationId": "post_webhook_endpoints",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEndpointCreated"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Register an endpoint (the signing secret is shown once)",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-endpoints/{id}": {
      "delete": {
        "operationId": "delete_webhook_endpoints_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Remove an endpoint",
        "tags": [
          "Webhooks"
        ]
      },
      "patch": {
        "operationId": "patch_webhook_endpoints_id",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Endpoint"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Change an endpoint",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-endpoints/{id}/rotate-secret": {
      "post": {
        "operationId": "post_webhook_endpoints_id_rotate_secret",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RotatedSecret"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "New signing secret (the previous one stays valid 24 h)",
        "tags": [
          "Webhooks"
        ]
      }
    },
    "/webhook-endpoints/{id}/test": {
      "post": {
        "operationId": "post_webhook_endpoints_id_test",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "localized_message": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "summary": "Send a webhook.test event",
        "tags": [
          "Webhooks"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://stg-app.pazarcloud.ir/api/public/v1",
      "description": "Sandbox (staging)"
    },
    {
      "url": "https://app.pazarcloud.ir/api/public/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Customers"
    },
    {
      "name": "Suppliers"
    },
    {
      "name": "Lookups"
    },
    {
      "name": "Products"
    },
    {
      "name": "Sales invoices"
    },
    {
      "name": "E-invoices (Türkiye)"
    },
    {
      "name": "Sales returns"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Purchase invoices"
    },
    {
      "name": "Income and expense slips"
    },
    {
      "name": "Sales orders"
    },
    {
      "name": "External references"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "WooCommerce connector"
    }
  ],
  "webhooks": {
    "connector.publish_requested": {
      "post": {
        "description": "The merchant asked to create or update these products in the shop. data: site_id, product_ids. Delivered only to the endpoints of the connected site's own integration (no other integration receives it); signed (PazarCloud-Signature).",
        "operationId": "webhook_connector_publish_requested",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "connector.publish_requested"
      }
    },
    "connector.retry_requested": {
      "post": {
        "description": "The merchant pressed Retry on a needs-attention issue in the app; retry that action. id: the issue. data: site_id, issue_key. Delivered only to the endpoints of the connected site's own integration (no other integration receives it); signed (PazarCloud-Signature).",
        "operationId": "webhook_connector_retry_requested",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "connector.retry_requested"
      }
    },
    "connector.settings_changed": {
      "post": {
        "description": "The merchant changed the WooCommerce connection's settings or a mapping in the app; re-read GET /connector/settings. data: site_id. Delivered only to the endpoints of the connected site's own integration (no other integration receives it); signed (PazarCloud-Signature).",
        "operationId": "webhook_connector_settings_changed",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "connector.settings_changed"
      }
    },
    "customer.created": {
      "post": {
        "description": "A customer was created. Delivered to an endpoint subscribed to it, only while the integration's role holds `definitions.ofa_customer.view`; signed (PazarCloud-Signature).",
        "operationId": "webhook_customer_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "customer.created"
      }
    },
    "customer.updated": {
      "post": {
        "description": "A customer was changed. Delivered to an endpoint subscribed to it, only while the integration's role holds `definitions.ofa_customer.view`; signed (PazarCloud-Signature).",
        "operationId": "webhook_customer_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "customer.updated"
      }
    },
    "einvoice.state_changed": {
      "post": {
        "description": "A sale's e-invoice changed state. data: the e-invoice's state. Delivered to an endpoint subscribed to it, only while the integration's role holds `tr_tax.documents.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_einvoice_state_changed",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "einvoice.state_changed"
      }
    },
    "expense_slip.created": {
      "post": {
        "description": "An expense slip was recorded and counts: at its save, or — when it was held for a second signature — at its approval (an edit of a held slip sends nothing). data: number, party_id (null for a fund-row slip), external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.expense_slips.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_expense_slip_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "expense_slip.created"
      }
    },
    "expense_slip.deleted": {
      "post": {
        "description": "An expense slip that counts (its expense_slip.created was sent) was deleted; a held or rejected slip sends nothing. data: number, party_id, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.expense_slips.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_expense_slip_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "expense_slip.deleted"
      }
    },
    "expense_slip.updated": {
      "post": {
        "description": "An expense slip that counts was changed. data: number, party_id, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.expense_slips.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_expense_slip_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "expense_slip.updated"
      }
    },
    "income_slip.created": {
      "post": {
        "description": "An income slip was recorded. data: number, party_id (null for a fund-row slip), external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.income_slips.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_income_slip_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "income_slip.created"
      }
    },
    "income_slip.deleted": {
      "post": {
        "description": "An income slip was deleted. data: number, party_id, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.income_slips.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_income_slip_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "income_slip.deleted"
      }
    },
    "income_slip.updated": {
      "post": {
        "description": "An income slip was changed. data: number, party_id, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.income_slips.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_income_slip_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "income_slip.updated"
      }
    },
    "payment.created": {
      "post": {
        "description": "A receipt or payment was recorded and counts: at its save, or — when it was held for a second signature — at its approval (never at the save of a held one; an edit sends no event). data: number, type (receipt | payment), party_id, origin_invoice_id (the sale or return it was recorded for, or null), external_ref (this integration's reference, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.payments.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_payment_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "payment.created"
      }
    },
    "payment.deleted": {
      "post": {
        "description": "A receipt or payment that counts (its payment.created was sent) was deleted; one held for a second signature or rejected sends nothing. data: number, type, party_id, origin_invoice_id, external_ref (this integration's reference, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `treasury.payments.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_payment_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "payment.deleted"
      }
    },
    "price.changed": {
      "post": {
        "description": "The prices of a product changed, or a dated price starts or ends (a minute after the first change). Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.pricing.view`; signed (PazarCloud-Signature).",
        "operationId": "webhook_price_changed",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "price.changed"
      }
    },
    "product.created": {
      "post": {
        "description": "A product was created. Delivered to an endpoint subscribed to it, only while the integration's role holds `definitions.products.view`; signed (PazarCloud-Signature).",
        "operationId": "webhook_product_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "product.created"
      }
    },
    "product.deleted": {
      "post": {
        "description": "A product was deleted (with its variants). data: variant_ids, external_ref (this integration's reference to the product, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `definitions.products.view`; signed (PazarCloud-Signature).",
        "operationId": "webhook_product_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "product.deleted"
      }
    },
    "product.updated": {
      "post": {
        "description": "A product, one of its variants or its online-store identity was changed (coalesced while waiting). Delivered to an endpoint subscribed to it, only while the integration's role holds `definitions.products.view`; signed (PazarCloud-Signature).",
        "operationId": "webhook_product_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "product.updated"
      }
    },
    "purchase_invoice.created": {
      "post": {
        "description": "A purchase was recorded (a purchase return announces nothing). data: number, supplier_id, external_ref (this integration's reference, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `purchases.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_purchase_invoice_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "purchase_invoice.created"
      }
    },
    "purchase_invoice.deleted": {
      "post": {
        "description": "A purchase was deleted. data: number, supplier_id, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `purchases.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_purchase_invoice_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "purchase_invoice.deleted"
      }
    },
    "purchase_invoice.updated": {
      "post": {
        "description": "A purchase was changed. data: number, supplier_id, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `purchases.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_purchase_invoice_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "purchase_invoice.updated"
      }
    },
    "sales_invoice.created": {
      "post": {
        "description": "A sale was created. data: number, source_document_id (the sales order it invoices, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_invoice_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_invoice.created"
      }
    },
    "sales_invoice.deleted": {
      "post": {
        "description": "A sale was deleted. Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_invoice_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_invoice.deleted"
      }
    },
    "sales_invoice.shipped": {
      "post": {
        "description": "A sale was marked shipped, its shipment changed, or its shipment was removed. data: change (recorded | changed | deleted); re-read the sale — `shipment` is null after a removal. Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_invoice_shipped",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_invoice.shipped"
      }
    },
    "sales_invoice.updated": {
      "post": {
        "description": "A sale was changed or cancelled. data: number. Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_invoice_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_invoice.updated"
      }
    },
    "sales_order.cancelled": {
      "post": {
        "description": "A sales order was cancelled (its reservation ended). data: number, change (cancelled), is_cancelled, external_ref. Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_order_cancelled",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_order.cancelled"
      }
    },
    "sales_order.deleted": {
      "post": {
        "description": "A sales order was deleted. data: number, external_ref (this integration's reference, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_order_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_order.deleted"
      }
    },
    "sales_order.updated": {
      "post": {
        "description": "A sales order was changed. data: number, change (updated), is_cancelled, external_ref (this integration's reference, or null). Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_order_updated",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_order.updated"
      }
    },
    "sales_return.created": {
      "post": {
        "description": "A sales return was recorded. data: number, reference_invoice_ids (the sales it returns). Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_return_created",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_return.created"
      }
    },
    "sales_return.deleted": {
      "post": {
        "description": "A sales return was deleted. data: number, reference_invoice_ids. Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.invoices.view` and its branch × fiscal-year access covers the document's branch and fiscal year; signed (PazarCloud-Signature).",
        "operationId": "webhook_sales_return_deleted",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "sales_return.deleted"
      }
    },
    "stock.changed": {
      "post": {
        "description": "The quantity of an item in a warehouse changed (at most once a minute per row). data: product_id, variant_id, warehouse_id, fiscal_year_id. Delivered to an endpoint subscribed to it, only while the integration's role holds `sales.current_stock.list`; signed (PazarCloud-Signature).",
        "operationId": "webhook_stock_changed",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "received; any other answer is retried for about three days"
          }
        },
        "summary": "stock.changed"
      }
    }
  }
}
