{
  "openapi": "3.0.0",
  "info": {
    "title": "RapBooster platform API",
    "version": "1",
    "description": "Every endpoint open to workspace API keys. Send `Authorization: Bearer rb_live_…`; app endpoints also need `x-workspace-id`. The Store API (`public/v1/store/*`) also takes a publishable key (`rb_pk_live_…`, safe in a browser or app, checked against its allowed origins) and a signed-in buyer's `X-Buyer-Token`. Each operation carries `x-key-scope` and `x-stability` (stable or beta). Docs: https://rapbooster.com/developers"
  },
  "servers": [
    {
      "url": "https://api.rapbooster.com"
    }
  ],
  "paths": {
    "/api/v1/billing/invoices": {
      "get": {
        "description": "Own + team (RP26) unless the role has Everyone (`billing:sales-reach-all`): documents credited to the caller or below them, else created by them. With `leadId` (the lead page) every document of the lead.",
        "operationId": "InvoicesController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "doc_type",
            "required": false,
            "schema": {
              "enum": ["QUOTE", "PROFORMA", "TAX_INVOICE"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "DRAFT",
                "ISSUED",
                "PARTIALLY_PAID",
                "PAID",
                "CANCELLED",
                "EXPIRED",
                "CONVERTED",
                "ACCEPTED",
                "DECLINED",
                "CHANGES_REQUESTED",
                "AWAITING_APPROVAL"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lead_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Created at or after (ISO date).",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Created before (ISO date).",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only documents that are overpaid or have a paid line the catalogue refused.",
            "in": "query",
            "name": "needs_attention",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Only documents credited to this sales member (`credited_user_id`). Narrows inside the caller's own / team scope (plan 16, SPF18).",
            "in": "query",
            "name": "credited",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only documents waiting for payment: issued or partly paid (true).",
            "in": "query",
            "name": "unpaid",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default created_at (newest first). `customer` is the billing name.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": [
                "created_at",
                "issued_at",
                "number",
                "customer",
                "status",
                "expires_at",
                "total_minor"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/InvoiceSummaryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List quotes, proformas and tax invoices (filters, q = number or buyer)",
        "tags": ["Billing - Invoices"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/invoices/credit-notes": {
      "get": {
        "operationId": "InvoicesController_listCreditNotes_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "invoice_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default issued_at (newest first).",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["issued_at", "number", "status", "total_minor"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/CreditNoteSummaryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List credit notes (optionally for one invoice)",
        "tags": ["Billing - Invoices"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/invoices/credit-notes/{id}": {
      "get": {
        "operationId": "InvoicesController_getCreditNote_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/CreditNoteDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One credit note with its lines",
        "tags": ["Billing - Invoices"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/invoices/{id}": {
      "get": {
        "description": "Opening a quote a buyer answered clears its `response_unseen` (the sidebar badge, B23); this response still carries `response_unseen: true`.",
        "operationId": "InvoicesController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/InvoiceDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One document with its lines",
        "tags": ["Billing - Invoices"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/offers": {
      "get": {
        "operationId": "OffersController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Default: every status but archived.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": ["active", "paused", "archived"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "enum": ["percent", "flat", "free_shipping", "bxgy", "tiered"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "enum": ["store", "app", "billing", "pos", "plan_checkout", "quote", "pay_link"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default created_at (newest first).",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": [
                "name",
                "kind",
                "status",
                "starts_at",
                "ends_at",
                "created_at",
                "uses",
                "discount",
                "revenue"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/OfferDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Offers with their uses, revenue and discount cost (q = name or code)",
        "tags": ["Billing - Offers"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/offers/{id}": {
      "get": {
        "operationId": "OffersController_getOne_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/OfferDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One offer",
        "tags": ["Billing - Offers"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/offers/{id}/codes": {
      "get": {
        "operationId": "OffersController_codes_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "batch_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Newest first.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/OfferCodeDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "The offer's codes (q = part of a code; batch_id = one bulk batch)",
        "tags": ["Billing - Offers"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/offers/{id}/redemptions": {
      "get": {
        "operationId": "OffersController_redemptions_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Newest first.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/OfferRedemptionDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Where the offer was used, newest first (reversed ones carry reversed_at)",
        "tags": ["Billing - Offers"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/billing/offers/{id}/report": {
      "get": {
        "operationId": "OffersController_report_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/OfferReportDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "The offer's report: uses, revenue, discount cost, per channel and per day (30 days)",
        "tags": ["Billing - Offers"],
        "x-key-scope": "billing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/crm/leads": {
      "get": {
        "operationId": "LeadsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default: `created_at` (newest first); the NEWLY_ASSIGNED / GRABBED views: `owner_changed_at` (oldest first).",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": [
                "name",
                "status",
                "created_at",
                "updated_at",
                "last_activity_at",
                "next_followup_at",
                "owner_changed_at"
              ],
              "type": "string"
            }
          },
          {
            "description": "A lead status id (`GET leads/lead-statuses`).",
            "in": "query",
            "name": "status_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "deprecated": true,
            "description": "Deprecated (R36-45): use `type`. `true` = `type=vip`, `false` = every type but VIP. Removed in the next release.",
            "in": "query",
            "name": "vip",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "R36-45: only leads of these types (repeat the param or comma-separate). Types hidden from the caller never show either way.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "items": {
                "$ref": "#/components/schemas/LeadType"
              },
              "type": "array"
            }
          },
          {
            "description": "A ready-made filter. Views over invoices, tickets or catalogue sales return nothing to a caller who can't read that app.",
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/LeadView"
            }
          },
          {
            "description": "Only leads these users own (`assigned_user_id`; repeat the param or comma-separate); `none` adds the leads nobody owns. Narrows inside the caller's lead scope, never widens it (plan 16, SPF18; plan 21, YP84).",
            "in": "query",
            "name": "owner",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Only leads the data currently puts at this stage (`negotiation` for Performance).",
            "in": "query",
            "name": "stage",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/LeadStage"
            }
          },
          {
            "description": "Only leads in an open status category (true): not won, lost or given up.",
            "in": "query",
            "name": "open",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Leads with work waiting on `pending_for`: `demo` (a scheduled demo or meeting ahead) or `manager_call` (a pending manager request asked of them). Needs `pending_for`.",
            "in": "query",
            "name": "pending",
            "required": false,
            "schema": {
              "enum": ["demo", "manager_call"],
              "type": "string"
            }
          },
          {
            "description": "The member `pending` is about. Required with `pending`, 400 otherwise.",
            "in": "query",
            "name": "pending_for",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact match on `external_account_id`.",
            "in": "query",
            "name": "external_account_id",
            "required": false,
            "schema": {
              "maxLength": 64,
              "type": "string"
            }
          },
          {
            "description": "`crm_lead_source` ids (any of).",
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Interested in items, as `<item_type>:<item_id>` (any of), e.g. `saas-tools:12` or `custom:3`.",
            "in": "query",
            "name": "interest",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "City of the default billing detail (any of).",
            "in": "query",
            "name": "city",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "State of the default billing detail (any of).",
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "`crm_lead_contact_tag` ids: leads with a person tagged with any of them.",
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "`crm_lead_tag` ids (`GET leads/lead-tags`): leads tagged with any of them (OC11).",
            "in": "query",
            "name": "lead_tag",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Created on or after this day (workspace timezone).",
            "in": "query",
            "name": "created_from",
            "required": false,
            "schema": {
              "example": "2026-10-01",
              "type": "string"
            }
          },
          {
            "description": "Created on or before this day.",
            "in": "query",
            "name": "created_to",
            "required": false,
            "schema": {
              "example": "2026-10-31",
              "type": "string"
            }
          },
          {
            "description": "Last activity on or after this day.",
            "in": "query",
            "name": "activity_from",
            "required": false,
            "schema": {
              "example": "2026-10-01",
              "type": "string"
            }
          },
          {
            "description": "Last activity on or before this day.",
            "in": "query",
            "name": "activity_to",
            "required": false,
            "schema": {
              "example": "2026-10-31",
              "type": "string"
            }
          },
          {
            "description": "Pending follow-up: overdue, due today, due within 7 days, or none.",
            "in": "query",
            "name": "followup",
            "required": false,
            "schema": {
              "enum": ["overdue", "today", "week", "none"],
              "type": "string"
            }
          },
          {
            "description": "A demo with this status, or `none`: no demo at all.",
            "in": "query",
            "name": "demo",
            "required": false,
            "schema": {
              "enum": ["scheduled", "done", "no_show", "rescheduled", "cancelled", "none"],
              "type": "string"
            }
          },
          {
            "description": "Billed at least this much (minor units). Needs Sales access.",
            "in": "query",
            "name": "billed_min",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Billed at most this much (minor units).",
            "in": "query",
            "name": "billed_max",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Unpaid at least this much (minor units). Needs Sales access.",
            "in": "query",
            "name": "due_min",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Unpaid at most this much (minor units).",
            "in": "query",
            "name": "due_max",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Renewal items by product (plan 30 RV1), any of: `<item_type>` (`desktop-tools`, `saas-tools`, `domain-tlds`, `hosting-plans`, `services`, `custom` for free-text lines) or `<item_type>:<item_id>`. On a renewal view only the items it lists count. Needs Sales access.",
            "in": "query",
            "name": "renewal_product",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "A renewal item ends on or after this day (workspace timezone, RV1).",
            "in": "query",
            "name": "renewal_ends_from",
            "required": false,
            "schema": {
              "example": "2026-11-01",
              "type": "string"
            }
          },
          {
            "description": "… on or before this day.",
            "in": "query",
            "name": "renewal_ends_to",
            "required": false,
            "schema": {
              "example": "2026-11-30",
              "type": "string"
            }
          },
          {
            "description": "R36-45: only the customers sold through this Reseller lead (their `sold_through`). Not stored in saved views.",
            "in": "query",
            "name": "sold_through",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/LeadDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List leads (newest first by default; q, status_id, type, view filters; sortBy). Scoped to the caller's own / team leads, except that an exact phone or email in q finds any lead (LT119); leads of a type the caller lacks the key of never show (R36-45)",
        "tags": ["Leads - Leads"],
        "x-key-scope": "crm:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/crm/leads/counts": {
      "get": {
        "operationId": "LeadsController_counts_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LeadCountsDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "How many leads are in each status and each sidebar view",
        "tags": ["Leads - Leads"],
        "x-key-scope": "crm:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/crm/leads/lead-statuses": {
      "get": {
        "operationId": "LeadStatusesController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default: `sort` (the workspace's order).",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["sort", "name", "created_at"],
              "type": "string"
            }
          },
          {
            "description": "Include removed (archived) statuses.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/LeadStatusDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "The workspace's lead statuses, in its order (removed ones on request)",
        "tags": ["Leads - Settings"],
        "x-key-scope": "crm:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/crm/leads/{id}": {
      "get": {
        "operationId": "LeadsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LeadDetailDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Get a lead with its default billing detail and header fields. Any member with leads:read may open any lead (LT119)",
        "tags": ["Leads - Leads"],
        "x-key-scope": "crm:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/marketing/audience/contacts": {
      "get": {
        "description": "Every person; filters narrow it: `group_id`, `tag_id`, `segment_id`, `suppressed`, `has_consent`, `has_phone`, `has_email`.",
        "operationId": "ContactsController_list_v1",
        "parameters": [
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Field to sort by.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "created_at",
              "enum": ["name", "email", "phone", "country_code", "created_at", "updated_at"],
              "type": "string"
            }
          },
          {
            "description": "Sort direction.",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "default": "DESC",
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Only members of this group.",
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only people with this tag.",
            "in": "query",
            "name": "tag_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only people matching this saved segment.",
            "in": "query",
            "name": "segment_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only people suppressed on this channel (the Unsubscribed view).",
            "in": "query",
            "name": "suppressed",
            "required": false,
            "schema": {
              "enum": ["whatsapp", "email", "any"],
              "type": "string"
            }
          },
          {
            "description": "true: with a consent record; false: without.",
            "in": "query",
            "name": "has_consent",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "has_phone",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "has_email",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/ContactDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "All contacts (searched, filtered, sorted)",
        "tags": ["Contacts"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/marketing/audience/contacts/{id}": {
      "get": {
        "operationId": "ContactsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ContactDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Get a contact",
        "tags": ["Contacts"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/marketing/audience/groups": {
      "get": {
        "operationId": "ContactGroupsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Restrict to lists created by a user.",
            "in": "query",
            "name": "workspace_user_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "default": "createdAt",
              "enum": ["name", "totalContacts", "createdAt", "updatedAt"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/ContactGroupDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List groups (the Contacts home table)",
        "tags": ["Contact Groups"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/marketing/audience/groups/{id}": {
      "get": {
        "operationId": "ContactGroupsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ContactGroupDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Get a group (metadata + fields + usage)",
        "tags": ["Contact Groups"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/orders": {
      "get": {
        "operationId": "OrdersController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "The row's status value.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lead_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The sidebar's lists: to pack, ready to ship, in transit, delivered, issues, returns.",
            "in": "query",
            "name": "stage",
            "required": false,
            "schema": {
              "enum": ["to_pack", "ready_to_ship", "in_transit", "delivered", "issues", "returns"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "payment_mode",
            "required": false,
            "schema": {
              "enum": ["PREPAID", "COD"],
              "type": "string"
            }
          },
          {
            "description": "Placed at or after this instant (ISO 8601).",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Placed before this instant (ISO 8601, exclusive).",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default created_at (newest placed first).",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at", "order_number", "status", "delivered_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/CatalogueProductOrderDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List goods orders (status, lead, q = order number, from/to = placed)",
        "tags": ["Orders"],
        "x-key-scope": "orders:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/orders/summary": {
      "get": {
        "operationId": "OrdersController_summary_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/OrdersSummaryDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Overview and sidebar counts: to ship, shipped in 7 days, delivered, cancelled, to pack, ready to ship, in transit, issues, returns, COD to collect",
        "tags": ["Orders"],
        "x-key-scope": "orders:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/orders/{id}": {
      "get": {
        "operationId": "OrdersController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/CatalogueProductOrderDetailDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "An order with its lines and shipments",
        "tags": ["Orders"],
        "x-key-scope": "orders:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/public/v1/crm/enquiries": {
      "post": {
        "description": "One lead per phone: a new one in the Enquiries pool, or the phone's existing lead (its owner gets a follow-up). Tagged per kind. With a publishable key: reCAPTCHA token required (`captcha_token` or `X-Recaptcha-Token`, 403 `CAPTCHA_FAILED`), 5 an hour per IP and 3 per phone (429 `ENQUIRY_RATE_LIMITED`), and no lead id in the answer.",
        "operationId": "SiteEnquiriesController_submit_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteApiEnquiryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiEnquiryReceivedDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Send a site form (contact, service, corporate gifting, trade, franchise, careers)",
        "tags": ["Site API - CRM"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/crm/leads": {
      "get": {
        "operationId": "PublicLeadsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "A lead status name from the workspace's list (Leads settings › Statuses), any case.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "maxLength": 60,
              "type": "string"
            }
          },
          {
            "description": "Default: created_at, newest first.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["name", "status", "created_at", "updated_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/PublicLeadDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "List leads (q, status; sort_by, sort; page, limit)",
        "tags": ["Public API v1 - Leads"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "PublicLeadsController_create_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateLeadDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicLeadDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Create a lead (owned by the key's creator)",
        "tags": ["Public API v1 - Leads"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/crm/leads/{id}": {
      "get": {
        "operationId": "PublicLeadsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicLeadDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Get a lead",
        "tags": ["Public API v1 - Leads"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "patch": {
        "operationId": "PublicLeadsController_update_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateLeadDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicLeadDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Update a lead's name, mobile, email, status or location (city, state, country_code)",
        "tags": ["Public API v1 - Leads"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/hrms/applications": {
      "post": {
        "description": "Needs `verified_token` from `applications/otp/verify` for the same phone (403 `PHONE_NOT_VERIFIED`; single use). The CV is checked by its bytes (400 `CV_NOT_PDF`, `CV_TOO_LARGE`, `CV_REQUIRED`). The applicant appears in HRMS › Recruitment with the CV; a second application by the same email to the same role answers the first one (`created` false).",
        "operationId": "SiteHrmsController_apply_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SiteApiApplicationFormDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiApplicationDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Apply to an open role (CV as a PDF, at most 5 MB)",
        "tags": ["Site API - HRMS"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/hrms/applications/otp": {
      "post": {
        "operationId": "SiteHrmsController_requestOtp_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteApiApplyOtpDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiApplyOtpSentDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Send a code to the applicant's phone (careers form)",
        "tags": ["Site API - HRMS"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/hrms/applications/otp/verify": {
      "post": {
        "operationId": "SiteHrmsController_verifyOtp_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteApiApplyOtpVerifyDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiPhoneVerifiedDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Check the code: answers a single-use phone-verified token (30 minutes)",
        "tags": ["Site API - HRMS"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/hrms/jobs": {
      "get": {
        "operationId": "SiteHrmsController_jobs_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/SiteApiJobDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Open roles, newest first, with the JobPosting fields",
        "tags": ["Site API - HRMS"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/hrms/jobs/{slug}": {
      "get": {
        "description": "The slug ends with the role's id; an old slug of a renamed role still answers (compare `slug` to redirect). Closed, draft or unknown: 404 `JOB_NOT_FOUND`.",
        "operationId": "SiteHrmsController_job_v1",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "example": "sales-executive-12",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiJobDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "One open role",
        "tags": ["Site API - HRMS"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/inbox/messages/email": {
      "post": {
        "operationId": "PublicMessagesController_email_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSendEmailDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicMessageDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Send one email from a connection (default: the system one)",
        "tags": ["Public API v1 - Messages"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/inbox/messages/whatsapp": {
      "post": {
        "description": "From `phone_number_id` or the campaign default number; the key's creator must have access to that number. Delivery updates arrive as `message.status` webhooks.",
        "operationId": "PublicMessagesController_whatsapp_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicSendWhatsappDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicMessageDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Send an approved WhatsApp template to a number",
        "tags": ["Public API v1 - Messages"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/inbox/messages/{channel}/{id}": {
      "get": {
        "operationId": "PublicMessagesController_status_v1",
        "parameters": [
          {
            "in": "path",
            "name": "channel",
            "required": true,
            "schema": {
              "enum": ["whatsapp", "email"],
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicMessageDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "A sent message's delivery status",
        "tags": ["Public API v1 - Messages"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/marketing/campaigns": {
      "get": {
        "operationId": "SiteMarketingController_campaigns_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "draft",
                "scheduled",
                "running",
                "paused",
                "completed",
                "failed",
                "cancelled"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["name", "created_at", "scheduled_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SiteApiCampaignDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Campaigns with their status and counts",
        "tags": ["Site API - Marketing"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/marketing/contacts": {
      "get": {
        "operationId": "PublicContactsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Only people in this group.",
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["name", "email", "phone", "country_code", "created_at", "updated_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/PublicContactDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "List people (q, group_id; sort_by, sort; page, limit)",
        "tags": ["Public API v1 - Contacts"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "PublicContactsController_create_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicContactWriteDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicContactDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Add a person: a known email or phone returns that person (`existing: true`)",
        "tags": ["Public API v1 - Contacts"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/marketing/contacts/{id}": {
      "get": {
        "operationId": "PublicContactsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicContactDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Get a person",
        "tags": ["Public API v1 - Contacts"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "patch": {
        "operationId": "PublicContactsController_update_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicContactWriteDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicContactDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Update a person (null clears a field; group_ids replaces groups)",
        "tags": ["Public API v1 - Contacts"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/marketing/subscriptions": {
      "post": {
        "description": "A known phone or email is that person (added to the group); else a new contact. Consent source, time and IP are stamped on the contact. 404 `GROUP_NOT_FOUND`.",
        "operationId": "SiteMarketingController_subscribe_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteApiSubscribeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Opt a person in to an Audience group, with the consent they gave",
        "tags": ["Site API - Marketing"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "delete": {
        "description": "Answers the same whether or not the person was in it.",
        "operationId": "SiteMarketingController_unsubscribe_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteApiUnsubscribeDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Opt a person out of an Audience group",
        "tags": ["Site API - Marketing"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/marketing/templates": {
      "get": {
        "operationId": "SiteMarketingController_templates_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channel",
            "required": false,
            "schema": {
              "enum": ["whatsapp", "email"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["name", "updated_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SiteApiTemplateDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Approved WhatsApp templates and ready email templates",
        "tags": ["Site API - Marketing"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store": {
      "get": {
        "operationId": "StoreApiCatalogueController_info_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiInfoDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The store: name, legal and support details, checkout and shipping settings",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/auth/apple": {
      "post": {
        "operationId": "StoreApiAuthController_apple_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiAppleSignInDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerSessionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Sign in with an Apple ID token",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/auth/google": {
      "post": {
        "operationId": "StoreApiAuthController_google_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiGoogleSignInDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerSessionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Sign in with a Google ID token",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/auth/logout": {
      "post": {
        "operationId": "StoreApiAuthController_logout_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiRefreshDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "End the session of a refresh token",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/auth/otp": {
      "post": {
        "operationId": "StoreApiAuthController_requestOtp_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiOtpRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiOtpRequestedDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Send a sign-in code to a phone",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/auth/otp/verify": {
      "post": {
        "description": "With the X-Buyer-Token of a buyer who signed in with Google or Apple, the proven phone is linked to that buyer.",
        "operationId": "StoreApiAuthController_verifyOtp_v1",
        "parameters": [
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiOtpVerifyDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerSessionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Check the code: signs the buyer in (or up)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/auth/refresh": {
      "post": {
        "operationId": "StoreApiAuthController_refresh_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiRefreshDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerSessionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Swap a refresh token for a new pair (the old one stops working)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/buyers/{id}": {
      "get": {
        "operationId": "StoreApiBuyersController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "A buyer (secret key with store:write)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/buyers/{id}/groups": {
      "put": {
        "description": "Lowercase slugs, at most 10; the list replaces the buyer's groups.",
        "operationId": "StoreApiBuyersController_setGroups_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiBuyerGroupsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Set a buyer's groups (offer eligibility, e.g. patron)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts": {
      "post": {
        "operationId": "StoreApiCartController_create_v1",
        "parameters": [
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiCartCreateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Start a cart (attached to the buyer when signed in)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts/{cartId}": {
      "get": {
        "operationId": "StoreApiCartController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "A cart, priced now",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts/{cartId}/attach": {
      "post": {
        "operationId": "StoreApiCartController_attach_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Attach a guest cart to the signed-in buyer (merged into their open cart)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts/{cartId}/coupon": {
      "post": {
        "operationId": "StoreApiCartController_applyCoupon_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiCouponDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Apply a coupon code (422 COUPON_INVALID with details.reason)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "delete": {
        "operationId": "StoreApiCartController_removeCoupon_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Remove the coupon",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts/{cartId}/delivery": {
      "put": {
        "operationId": "StoreApiCartController_setDelivery_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiCartDeliveryDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Set the delivery address or PIN code (shipping fee, ETA)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts/{cartId}/gift": {
      "put": {
        "operationId": "StoreApiCartController_setGift_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiCartGiftDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Mark the order a gift, with a message (≤ 300)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/carts/{cartId}/lines": {
      "put": {
        "operationId": "StoreApiCartController_setLines_v1",
        "parameters": [
          {
            "in": "path",
            "name": "cartId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiCartLinesDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Replace the cart's lines",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/categories": {
      "get": {
        "operationId": "StoreApiCatalogueController_categories_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiCategoryDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The store's categories",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/checkout": {
      "post": {
        "operationId": "StoreApiCheckoutController_checkout_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unique per checkout attempt.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiCheckoutDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCheckoutResultDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Place the order: Razorpay order to pay in-page, or trade credit",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/checkout/{number}/confirm": {
      "post": {
        "operationId": "StoreApiCheckoutController_confirm_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiPaymentConfirmDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiOrderDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Confirm the in-page Razorpay payment (signature check)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/feeds/merchant.xml": {
      "get": {
        "operationId": "StoreApiCatalogueController_merchantFeed_v1",
        "parameters": [],
        "responses": {
          "401": {
            "content": {
              "application/rss+xml": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/rss+xml": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/rss+xml": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Google Merchant Center feed (RSS 2.0) of the visible products",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me": {
      "get": {
        "operationId": "StoreApiMeController_me_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The signed-in buyer",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "delete": {
        "operationId": "StoreApiMeController_erase_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Erase the buyer's account (DPDP); orders keep their tax records",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "patch": {
        "operationId": "StoreApiMeController_update_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiBuyerUpdateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiBuyerDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Change the buyer's name, email or consents",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/addresses": {
      "get": {
        "operationId": "StoreApiMeController_addresses_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiAddressDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's addresses",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "StoreApiMeController_addAddress_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiAddressInputDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiAddressDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Add an address",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/addresses/{id}": {
      "delete": {
        "operationId": "StoreApiMeController_deleteAddress_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Delete an address",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "patch": {
        "operationId": "StoreApiMeController_updateAddress_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiAddressUpdateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiAddressDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Change an address",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/claims": {
      "get": {
        "operationId": "StoreApiClaimsController_list_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiClaimDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's claims, newest first",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/devices": {
      "post": {
        "operationId": "StoreApiMeController_addDevice_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiDeviceDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Register an app install for push (order updates; offers when opted in)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/devices/{token}": {
      "delete": {
        "operationId": "StoreApiMeController_removeDevice_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Forget an app install",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/export": {
      "post": {
        "operationId": "StoreApiMeController_exportData_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Email the buyer a JSON export of their data within 24 h (once a day)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/orders": {
      "get": {
        "operationId": "StoreApiOrdersController_list_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "awaiting_payment",
                "paid",
                "packed",
                "shipped",
                "delivered",
                "cancelled",
                "refunded",
                "partially_refunded"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["placed_at", "total_minor"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiOrderSummaryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's orders, newest first",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/orders/{number}": {
      "get": {
        "operationId": "StoreApiOrdersController_get_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiOrderDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "One order with its shipments, claims and invoice",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/orders/{number}/claims": {
      "post": {
        "operationId": "StoreApiClaimsController_create_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiClaimCreateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiClaimDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Report a damaged, wrong or missing item (409 CLAIM_WINDOW_CLOSED after 48 h)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/orders/{number}/invoice": {
      "get": {
        "operationId": "StoreApiOrdersController_invoice_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiInvoiceLinkDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "A signed link (10 minutes) to the order's GST invoice PDF",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/orders/{number}/reorder": {
      "post": {
        "operationId": "StoreApiOrdersController_reorder_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "number",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiCartDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Put the order's items in the buyer's cart again",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/reviews": {
      "get": {
        "operationId": "StoreApiMyReviewsController_list_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiReviewDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's reviews",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "description": "Only a product of the buyer's own delivered order (403 `REVIEW_NOT_ALLOWED`), once per order and product (409 `REVIEW_EXISTS`); photos are the buyer's `review` uploads (400 `REVIEW_UPLOAD_INVALID`). Title and body are plain text.",
        "operationId": "StoreApiMyReviewsController_create_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiReviewCreateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiReviewDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Review a delivered product (status pending until moderated)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/subscriptions": {
      "get": {
        "operationId": "StoreApiSubscriptionsController_list_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's subscriptions",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "StoreApiSubscriptionsController_create_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Unique per attempt.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiSubscriptionCreateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Subscribe (box: interval, lines, address; plan: plan_code); returns the Razorpay ids",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/subscriptions/{id}": {
      "patch": {
        "operationId": "StoreApiSubscriptionsController_update_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiSubscriptionUpdateDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Change a box's interval, lines or address",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/subscriptions/{id}/cancel": {
      "post": {
        "operationId": "StoreApiSubscriptionsController_cancel_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Cancel a subscription",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/subscriptions/{id}/pause": {
      "post": {
        "operationId": "StoreApiSubscriptionsController_pause_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Pause a subscription",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/subscriptions/{id}/resume": {
      "post": {
        "operationId": "StoreApiSubscriptionsController_resume_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Resume a paused subscription",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/subscriptions/{id}/skip": {
      "post": {
        "operationId": "StoreApiSubscriptionsController_skip_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiSubscriptionDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Skip the next delivery",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/trade": {
      "get": {
        "operationId": "StoreApiTradeController_get_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiTradeAccountDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's trade account (404 when they never applied)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/trade/apply": {
      "post": {
        "description": "The GSTIN must pass the format and mod-36 check and name the address's state (400 `TRADE_GSTIN_INVALID`, `details.reason`). A second application while one is open is 409 `TRADE_ALREADY_APPLIED`; after a rejection the buyer may apply again.",
        "operationId": "StoreApiTradeController_apply_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiTradeApplyDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiTradeAccountDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Apply for a trade account with a GSTIN",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/trade/ledger": {
      "get": {
        "operationId": "StoreApiTradeController_ledger_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiLedgerEntryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The trade account's ledger: invoices, payments, credit notes",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/uploads": {
      "post": {
        "operationId": "StoreApiMeController_upload_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/StoreApiUploadFormDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiUploadDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Upload a photo for a claim or a review (jpeg / png / webp, at most 5 MB)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/wishlist": {
      "get": {
        "operationId": "StoreApiMeController_wishlist_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiProductSummaryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "The buyer's wishlist",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/me/wishlist/{productId}": {
      "put": {
        "operationId": "StoreApiMeController_addToWishlist_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Add a product to the wishlist",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "delete": {
        "operationId": "StoreApiMeController_removeFromWishlist_v1",
        "parameters": [
          {
            "description": "The buyer's access token.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "productId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Remove a product from the wishlist",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/policies/{kind}": {
      "get": {
        "operationId": "StoreApiCatalogueController_policy_v1",
        "parameters": [
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": ["refund", "shipping", "terms", "privacy", "returns"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiPolicyDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "One policy page (refund, shipping, terms, privacy, returns)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/products": {
      "get": {
        "operationId": "StoreApiCatalogueController_products_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "A category slug.",
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "default": "featured",
              "enum": ["featured", "price_asc", "price_desc", "newest", "rating"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "in_stock",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Only products changed since (sitemaps, sync).",
            "in": "query",
            "name": "updated_since",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiProductSummaryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Visible products (q, category, sort_by, in_stock, updated_since; page, limit ≤ 100)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/products/{slug}": {
      "get": {
        "operationId": "StoreApiCatalogueController_product_v1",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The buyer's access token, when signed in.",
            "in": "header",
            "name": "X-Buyer-Token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiProductDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "One product with its variants (an approved trade buyer sees trade prices)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/products/{slug}/reviews": {
      "get": {
        "operationId": "StoreApiProductReviewsController_list_v1",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rating",
            "required": false,
            "schema": {
              "maximum": 5,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at", "rating"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiReviewDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/StoreApiReviewPageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "A product's published reviews (rating filter; page, limit)",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/shipping/quote": {
      "get": {
        "description": "With `cart_id` the fee and ETA are for that cart (its goods total and weight); else for `weight_g` (or the store's default weight) and the base fee. 422 `PINCODE_NOT_SERVICEABLE` when no courier serves it.",
        "operationId": "StoreApiShippingController_quote_v1",
        "parameters": [
          {
            "in": "query",
            "name": "pincode",
            "required": true,
            "schema": {
              "example": "334001",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cart_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "weight_g",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoreApiShippingQuoteDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Is the PIN code served, the fee, free-above and the ETA",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/store/subscription-plans": {
      "get": {
        "operationId": "StoreApiSubscriptionPlansController_plans_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/StoreApiSubscriptionPlanDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "What a buyer may subscribe to: box intervals and recurring catalogue prices",
        "tags": ["Store API"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/webhook-endpoints": {
      "get": {
        "operationId": "PublicWebhookEndpointsController_list_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/WebhookEndpointDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "List webhook endpoints",
        "tags": ["Public API v1 - Webhooks"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "post": {
        "operationId": "PublicWebhookEndpointsController_create_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookEndpointDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatedWebhookEndpointDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Add an endpoint (https): its signing secret is in this response only",
        "tags": ["Public API v1 - Webhooks"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/webhook-endpoints/{id}": {
      "delete": {
        "operationId": "PublicWebhookEndpointsController_remove_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Delete an endpoint",
        "tags": ["Public API v1 - Webhooks"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      },
      "patch": {
        "operationId": "PublicWebhookEndpointsController_update_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEndpointDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Change an endpoint's URL or events, or turn it off and on",
        "tags": ["Public API v1 - Webhooks"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/public/v1/workspace/profile": {
      "get": {
        "operationId": "SiteWorkspaceController_get_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SiteApiWorkspaceProfileDto"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["data"]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "code": "TOO_MANY_REQUESTS",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Too many requests. Please try again later.",
                  "path": "/v1/identity/login",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Rate limit exceeded — retry later."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "summary": "Company facts: legal and brand name, CIN, GSTIN, address, logo, socials, hours",
        "tags": ["Site API - Workspace"],
        "x-stability": "stable",
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/social/accounts": {
      "get": {
        "operationId": "SocialAccountsController_listAccounts_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SocialAccountsDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Connected accounts (with health) and the plan's Social accounts allowance",
        "tags": ["Social"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/social/inbox": {
      "get": {
        "operationId": "SocialInboxController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["last_message_at", "created_at"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "network",
            "required": false,
            "schema": {
              "items": {
                "enum": ["facebook", "instagram", "linkedin", "gbp", "whatsapp_status"],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "items": {
                "enum": ["comment", "dm", "review"],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Default `open`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "items": {
                "enum": ["open", "done", "hidden"],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`me`, `unassigned`, or a member's user id.",
            "in": "query",
            "name": "assigned",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Plan 37: only the threads on one of our posts (`social_post.id`, e.g. its comments).",
            "in": "query",
            "name": "post_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SocialThreadDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Inbox threads (paged; filter by network, kind, status (default open), account, assignee)",
        "tags": ["Social"],
        "x-key-scope": "inbox:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/social/inbox/{id}": {
      "get": {
        "operationId": "SocialInboxController_thread_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SocialThreadDetailDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One thread with its messages (oldest first, 500 at most)",
        "tags": ["Social"],
        "x-key-scope": "inbox:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/social/posts": {
      "get": {
        "operationId": "SocialPostsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["scheduled_at", "published_at", "created_at", "updated_at"],
              "type": "string"
            }
          },
          {
            "description": "One or several, comma-separated.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "draft",
                  "awaiting_approval",
                  "scheduled",
                  "publishing",
                  "published",
                  "partly_failed",
                  "failed",
                  "cancelled"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SocialPostDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Posts (paged; filter by status, account and a time range; sort by time)",
        "tags": ["Social"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      },
      "post": {
        "operationId": "SocialPostsController_create_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SocialPostInputDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SocialPostDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Save a new draft",
        "tags": ["Social"],
        "x-key-scope": "marketing:write",
        "x-stability": "beta"
      }
    },
    "/api/v1/social/posts/{id}": {
      "get": {
        "operationId": "SocialPostsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SocialPostDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One post with its accounts' states",
        "tags": ["Social"],
        "x-key-scope": "marketing:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/social/posts/{id}/schedule": {
      "post": {
        "description": "With Posts need approval on, a member without Publish directly sends it for approval (`awaiting_approval: true`); so does every call made with an API key (keys have no publish scope). 400 `SOCIAL_POST_INVALID` (`details.problems`), `SOCIAL_NO_TARGETS`, `SOCIAL_SCHEDULE_IN_PAST`; 409 `SOCIAL_ACCOUNT_UNAVAILABLE`, `SOCIAL_QUEUE_FULL`.",
        "operationId": "SocialPostsController_schedule_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SocialScheduleDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SocialScheduleResultDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Schedule (a time, the next queue slot, or now), or send for approval",
        "tags": ["Social"],
        "x-key-scope": "marketing:write",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/items": {
      "get": {
        "operationId": "StoreItemsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["sort_order", "name", "created_at"],
              "type": "string"
            }
          },
          {
            "description": "With `item_id`: the store item of one catalogue item (the item editor's Store tab).",
            "in": "query",
            "name": "item_type",
            "required": false,
            "schema": {
              "enum": ["products", "services"],
              "type": "string"
            }
          },
          {
            "description": "The catalogue product or service id (with `item_type`).",
            "in": "query",
            "name": "item_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreItemDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "The store's items (paged; sort by sort_order, name or created_at; item_type + item_id for one catalogue item)",
        "tags": ["Store"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      },
      "post": {
        "description": "Each must be ACTIVE: 400 `STORE_ITEM_INVALID`; already on the store: 409 `STORE_ITEM_DUPLICATE`. Services are added Enquire-only.",
        "operationId": "StoreItemsController_add_v1",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddStoreItemsDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/StoreItemsAddedDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "code": "CONFLICT",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "A resource with these details already exists.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The request conflicts with existing state."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Add catalogue items to the store (up to 100 at once)",
        "tags": ["Store"],
        "x-key-scope": "store:write",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/items/{id}": {
      "delete": {
        "operationId": "StoreItemsController_remove_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/StoreRemovedDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Take an item off the store (the catalogue item stays)",
        "tags": ["Store"],
        "x-key-scope": "store:write",
        "x-stability": "beta"
      },
      "patch": {
        "operationId": "StoreItemsController_update_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStoreItemDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/StoreItemDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "code": "VALIDATION_FAILED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": [
                    "email must be an email",
                    "password must be longer than 10 characters"
                  ],
                  "message": "Validation failed.",
                  "path": "/v1/identity/register",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Validation failed — one or more fields are invalid."
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Show / hide, action, per-item delivery, order, featured",
        "tags": ["Store"],
        "x-key-scope": "store:write",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/orders": {
      "get": {
        "operationId": "StoreOrdersController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at", "total_minor", "buyer_name", "status"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": ["placed", "awaiting_payment", "paid", "cancelled"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/StoreOrderDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Store orders, newest first (search: buyer, number, phone)",
        "tags": ["Store"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/orders/{id}": {
      "get": {
        "operationId": "StoreOrdersController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/StoreOrderDetailDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One store order, with its payments and shipping",
        "tags": ["Store"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/settings": {
      "get": {
        "operationId": "StoreSettingsController_getSettings_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/StoreSettingsDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "The store's settings (defaults until first saved)",
        "tags": ["Store"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/sync/conflicts": {
      "get": {
        "operationId": "SyncReviewController_conflicts_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at", "field"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "connection_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "open",
              "enum": ["open", "resolved", "dismissed"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SyncConflictDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Sync conflicts (default open; paged; sort by created_at or field)",
        "tags": ["Store - Sync"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/sync/connections": {
      "get": {
        "operationId": "SyncConnectionsController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["created_at", "display_name", "last_run_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SyncConnectionDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "The workspace's sync connections (paged; sort by created_at, display_name, last_run_at)",
        "tags": ["Store - Sync"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/sync/connections/{id}": {
      "get": {
        "operationId": "SyncConnectionsController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SyncConnectionDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One sync connection",
        "tags": ["Store - Sync"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/sync/connections/{id}/links": {
      "get": {
        "operationId": "SyncReviewController_links_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["last_synced_at", "created_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SyncLinkDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "A connection's linked items (paged; q on the name; sort by last_synced_at or created_at)",
        "tags": ["Store - Sync"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/sync/connections/{id}/runs": {
      "get": {
        "operationId": "SyncReviewController_runs_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": ["started_at"],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SyncRunDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "A connection's run log (paged, newest first; sort by started_at)",
        "tags": ["Store - Sync"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/store/sync/runs/{id}": {
      "get": {
        "operationId": "SyncReviewController_run_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SyncRunDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "402": {
            "content": {
              "application/json": {
                "example": {
                  "code": "APP_NOT_ENTITLED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "details": {
                    "appName": "whatsapp",
                    "purchasableVia": {
                      "planCode": "BASIC",
                      "planId": "341097405615177728",
                      "trialDays": 14
                    }
                  },
                  "message": "Your workspace does not have access to this app.",
                  "path": "/v1/whatsapp/campaigns",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The workspace is not entitled to the app this route belongs to."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "One run with its report (what a dry run would change)",
        "tags": ["Store - Sync"],
        "x-key-scope": "store:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/support/categories": {
      "get": {
        "description": "Active first, by sort order.",
        "operationId": "SupportController_listCategories_v1",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SupportCategoryDto"
                      },
                      "type": "array"
                    },
                    "message": {
                      "description": "Localized success message (when present).",
                      "type": "string"
                    }
                  },
                  "required": ["items"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List ticket categories",
        "tags": ["Support"],
        "x-key-scope": "support:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/support/tickets": {
      "get": {
        "description": "Most recent activity first by default.",
        "operationId": "SupportController_list_v1",
        "parameters": [
          {
            "description": "Snowflake ID",
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search Query",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Sort direction. Defaults per endpoint — usually DESC.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "enum": ["ASC", "DESC"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": ["AWAITING_SUPPORT", "AWAITING_CUSTOMER", "ON_HOLD", "RESOLVED", "CLOSED"],
              "type": "string"
            }
          },
          {
            "description": "Everything not RESOLVED or CLOSED — the working queue.",
            "in": "query",
            "name": "open_only",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "priority",
            "required": false,
            "schema": {
              "enum": ["LOW", "NORMAL", "HIGH", "URGENT"],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`me`, `none`, or a member's user id.",
            "in": "query",
            "name": "assigned",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "lead_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "enum": ["MANUAL", "WHATSAPP", "EMAIL", "PRODUCT"],
              "type": "string"
            }
          },
          {
            "description": "Nobody has replied publicly yet.",
            "in": "query",
            "name": "unanswered",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Tickets from this WhatsApp conversation.",
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Plan 29: tickets from this linked WhatsApp chat.",
            "in": "query",
            "name": "wal_chat_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`late`: breaching SLA now (the Breaching SLA view): not RESOLVED or CLOSED, and a first-reply or resolve target missed. Matches nothing while SLA is off.",
            "in": "query",
            "name": "sla",
            "required": false,
            "schema": {
              "enum": ["late"],
              "type": "string"
            }
          },
          {
            "description": "Field to order by. Unrecognised values fall back to this endpoint default. Default: most recent activity first.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "enum": [
                "last_message_at",
                "created_at",
                "updated_at",
                "priority",
                "status",
                "subject",
                "ticket_number"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "items": {
                      "items": {
                        "$ref": "#/components/schemas/SupportTicketSummaryDto"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PageMetaDto"
                    }
                  },
                  "required": ["items", "meta"],
                  "type": "object"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "List tickets",
        "tags": ["Support"],
        "x-key-scope": "support:read",
        "x-stability": "beta"
      }
    },
    "/api/v1/support/tickets/{id}": {
      "get": {
        "operationId": "SupportController_get_v1",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SupportTicketDto"
                    },
                    {
                      "properties": {
                        "message": {
                          "description": "Localized success message.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "code": "UNAUTHORIZED",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Authentication is required to access this resource.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Missing or invalid credentials."
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "code": "FORBIDDEN",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "You do not have permission to perform this action.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Authenticated but not permitted (e.g. missing a workspace permission)."
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "code": "NOT_FOUND",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "Resource not found.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "The requested resource does not exist."
          },
          "500": {
            "content": {
              "application/json": {
                "example": {
                  "code": "INTERNAL_ERROR",
                  "correlation_id": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
                  "message": "An unexpected error occurred.",
                  "path": "/v1/user/me",
                  "timestamp": "2026-07-06T12:34:56.789Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDto"
                }
              }
            },
            "description": "Unexpected server error."
          }
        },
        "security": [
          {
            "apiKey": [],
            "tenant": []
          }
        ],
        "summary": "Read a ticket and its whole thread, internal notes included",
        "tags": ["Support"],
        "x-key-scope": "support:read",
        "x-stability": "beta"
      }
    }
  },
  "components": {
    "schemas": {
      "AddStoreItemsDto": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/StoreItemRefDto"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "required": ["items"],
        "type": "object"
      },
      "CatalogueOrderItemDto": {
        "properties": {
          "cancelled_at": {
            "description": "Its line was refunded.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "packed": {
            "description": "In a parcel not returned to sender.",
            "type": "number"
          },
          "price_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "product_name": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "restocked": {
            "description": "Of `returned`, put back on the shelf.",
            "type": "number"
          },
          "returnable": {
            "description": "Sent and not returned yet.",
            "type": "number"
          },
          "returned": {
            "type": "number"
          },
          "sent": {
            "description": "Left the warehouse.",
            "type": "number"
          },
          "sku": {
            "nullable": true,
            "type": "string"
          },
          "source_id": {
            "description": "The invoice line it came from.",
            "nullable": true,
            "type": "string"
          },
          "tax_inclusive": {
            "type": "boolean"
          },
          "tax_rate": {
            "type": "number"
          },
          "to_ship": {
            "description": "Still to put in a parcel.",
            "type": "number"
          },
          "unit_price_minor": {
            "description": "Integer minor units (paise / cents).",
            "type": "number"
          },
          "variant_name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "product_id",
          "price_id",
          "qty",
          "product_name",
          "variant_name",
          "unit_price_minor",
          "tax_inclusive",
          "tax_rate",
          "packed",
          "sent",
          "returned",
          "restocked",
          "to_ship",
          "returnable"
        ],
        "type": "object"
      },
      "CatalogueProductOrderDetailDto": {
        "properties": {
          "cancelled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "cod_approval_request_id": {
            "description": "COD: the approval request the payment waits on (LT109).",
            "nullable": true,
            "type": "string"
          },
          "cod_collected_at": {
            "description": "COD: when the cash was collected.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "cod_collected_minor": {
            "description": "COD: cash collected, minor units.",
            "nullable": true,
            "type": "number"
          },
          "cod_payment_id": {
            "description": "COD: the payment recorded.",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "Who entered a manual order.",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "example": "INR",
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "description": "The tax invoice the order was paid on (list and GET only).",
            "nullable": true,
            "type": "string"
          },
          "invoice_number": {
            "example": "INV-2026-0001",
            "nullable": true,
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CatalogueOrderItemDto"
            },
            "type": "array"
          },
          "lead": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CatalogueSaleLeadDto"
              }
            ],
            "description": "On list rows only (one batched lookup); null if the lead is gone.",
            "nullable": true,
            "type": "object"
          },
          "lead_id": {
            "type": "string"
          },
          "order_number": {
            "example": "ORD-000001",
            "type": "string"
          },
          "origin_invoice_id": {
            "description": "The proforma or direct tax invoice the order holds the goods lines of (one order per invoice); absent on older orders and manual ones.",
            "nullable": true,
            "type": "string"
          },
          "payment_mode": {
            "description": "COD: cash on delivery (YP153).",
            "enum": ["PREPAID", "COD"],
            "type": "string"
          },
          "returns": {
            "items": {
              "$ref": "#/components/schemas/OrderReturnDto"
            },
            "type": "array"
          },
          "ship_city": {
            "nullable": true,
            "type": "string"
          },
          "ship_country_code": {
            "nullable": true,
            "type": "string"
          },
          "ship_line1": {
            "nullable": true,
            "type": "string"
          },
          "ship_line2": {
            "nullable": true,
            "type": "string"
          },
          "ship_name": {
            "nullable": true,
            "type": "string"
          },
          "ship_phone": {
            "nullable": true,
            "type": "string"
          },
          "ship_postal_code": {
            "nullable": true,
            "type": "string"
          },
          "ship_state": {
            "nullable": true,
            "type": "string"
          },
          "shipments": {
            "items": {
              "$ref": "#/components/schemas/CatalogueShipmentDto"
            },
            "type": "array"
          },
          "shipped_at": {
            "description": "When the first parcel left (its shipment's `shipped_at`); null until then.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "source_id": {
            "description": "The invoice line it came from.",
            "type": "string"
          },
          "source_type": {
            "enum": ["INVOICE_ITEM", "TRIAL", "MANUAL", "FREE", "TEAM"],
            "type": "string"
          },
          "status": {
            "enum": ["CONFIRMED", "SHIPPED", "DELIVERED", "CANCELLED", "RETURNED"],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source_type",
          "source_id",
          "lead_id",
          "currency",
          "created_at",
          "updated_at",
          "order_number",
          "status",
          "payment_mode",
          "items",
          "shipments",
          "returns"
        ],
        "type": "object"
      },
      "CatalogueProductOrderDto": {
        "properties": {
          "cancelled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "cod_approval_request_id": {
            "description": "COD: the approval request the payment waits on (LT109).",
            "nullable": true,
            "type": "string"
          },
          "cod_collected_at": {
            "description": "COD: when the cash was collected.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "cod_collected_minor": {
            "description": "COD: cash collected, minor units.",
            "nullable": true,
            "type": "number"
          },
          "cod_payment_id": {
            "description": "COD: the payment recorded.",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "Who entered a manual order.",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "example": "INR",
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "description": "The tax invoice the order was paid on (list and GET only).",
            "nullable": true,
            "type": "string"
          },
          "invoice_number": {
            "example": "INV-2026-0001",
            "nullable": true,
            "type": "string"
          },
          "lead": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CatalogueSaleLeadDto"
              }
            ],
            "description": "On list rows only (one batched lookup); null if the lead is gone.",
            "nullable": true,
            "type": "object"
          },
          "lead_id": {
            "type": "string"
          },
          "order_number": {
            "example": "ORD-000001",
            "type": "string"
          },
          "origin_invoice_id": {
            "description": "The proforma or direct tax invoice the order holds the goods lines of (one order per invoice); absent on older orders and manual ones.",
            "nullable": true,
            "type": "string"
          },
          "payment_mode": {
            "description": "COD: cash on delivery (YP153).",
            "enum": ["PREPAID", "COD"],
            "type": "string"
          },
          "ship_city": {
            "nullable": true,
            "type": "string"
          },
          "ship_country_code": {
            "nullable": true,
            "type": "string"
          },
          "ship_line1": {
            "nullable": true,
            "type": "string"
          },
          "ship_line2": {
            "nullable": true,
            "type": "string"
          },
          "ship_name": {
            "nullable": true,
            "type": "string"
          },
          "ship_phone": {
            "nullable": true,
            "type": "string"
          },
          "ship_postal_code": {
            "nullable": true,
            "type": "string"
          },
          "ship_state": {
            "nullable": true,
            "type": "string"
          },
          "shipped_at": {
            "description": "When the first parcel left (its shipment's `shipped_at`); null until then.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "source_id": {
            "description": "The invoice line it came from.",
            "type": "string"
          },
          "source_type": {
            "enum": ["INVOICE_ITEM", "TRIAL", "MANUAL", "FREE", "TEAM"],
            "type": "string"
          },
          "status": {
            "enum": ["CONFIRMED", "SHIPPED", "DELIVERED", "CANCELLED", "RETURNED"],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source_type",
          "source_id",
          "lead_id",
          "currency",
          "created_at",
          "updated_at",
          "order_number",
          "status",
          "payment_mode"
        ],
        "type": "object"
      },
      "CatalogueSaleLeadDto": {
        "properties": {
          "email": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "mobile": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "CatalogueShipmentDto": {
        "properties": {
          "carrier": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "eta_on": {
            "description": "YYYY-MM-DD",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "description": "What the parcel holds; empty on older parcels, which hold the whole order.",
            "items": {
              "$ref": "#/components/schemas/OrderItemQtyViewDto"
            },
            "type": "array"
          },
          "label_url": {
            "description": "The courier label PDF.",
            "nullable": true,
            "type": "string"
          },
          "last_event_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "out_for_delivery_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "provider": {
            "description": "`shiprocket` / `sandbox`; null by hand.",
            "nullable": true,
            "type": "string"
          },
          "provider_order_id": {
            "nullable": true,
            "type": "string"
          },
          "provider_shipment_id": {
            "nullable": true,
            "type": "string"
          },
          "shipped_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": ["PENDING", "IN_TRANSIT", "DELIVERED", "RETURNED"],
            "type": "string"
          },
          "tracking_no": {
            "nullable": true,
            "type": "string"
          },
          "tracking_sent_at": {
            "description": "Tracking link last sent.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "tracking_sent_via": {
            "enum": ["WHATSAPP", "EMAIL"],
            "nullable": true,
            "type": "string"
          },
          "tracking_url": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["id", "carrier", "status", "created_at", "items"],
        "type": "object"
      },
      "ContactDto": {
        "properties": {
          "consent_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "consent_ip": {
            "nullable": true,
            "type": "string"
          },
          "consent_source": {
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "description": "Bare calling code, e.g. `91`.",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "custom_fields": {
            "items": {
              "$ref": "#/components/schemas/ContactFieldValueDto"
            },
            "type": "array"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ContactGroupRefDto"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "is_valid": {
            "type": "boolean"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "description": "National number.",
            "nullable": true,
            "type": "string"
          },
          "phone_e164": {
            "description": "`+<code><number>` (N4.10).",
            "nullable": true,
            "type": "string"
          },
          "suppressions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ContactSuppressionsDto"
              }
            ],
            "description": "When the person went on each channel's suppression list (N4.7)."
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/ContactTagRefDto"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "groups",
          "tags",
          "suppressions",
          "is_valid",
          "custom_fields",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ContactFieldValueDto": {
        "properties": {
          "field_definition_id": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": ["field_definition_id", "value"],
        "type": "object"
      },
      "ContactGroupDto": {
        "properties": {
          "country_code": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by_name": {
            "description": "Creator's name, or 'Unknown User'.",
            "type": "string"
          },
          "custom_field_definitions": {
            "items": {
              "$ref": "#/components/schemas/CustomFieldDefinitionFlatResponseDto"
            },
            "type": "array"
          },
          "description": {
            "nullable": true,
            "type": "string"
          },
          "emoji": {
            "nullable": true,
            "type": "string"
          },
          "fields_count": {
            "description": "Library fields the group shows (the 4 built-in ones not counted).",
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "total_contacts": {
            "type": "number"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "used_in": {
            "$ref": "#/components/schemas/GroupUsageDto"
          },
          "workspace_user_id": {
            "description": "Creator (central user id).",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "workspace_user_id",
          "created_by_name",
          "fields_count",
          "used_in",
          "total_contacts",
          "custom_field_definitions",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ContactGroupRefDto": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "ContactSuppressionsDto": {
        "properties": {
          "email": {
            "format": "date-time",
            "type": "string"
          },
          "sms": {
            "format": "date-time",
            "type": "string"
          },
          "voice": {
            "format": "date-time",
            "type": "string"
          },
          "whatsapp": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ContactTagRefDto": {
        "properties": {
          "color": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "CreateWebhookEndpointDto": {
        "properties": {
          "events": {
            "description": "Event names from `GET webhook-events` (e.g. lead.created, lead.updated, message.status).",
            "example": ["lead.created"],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "example": "https://example.com/hooks/rapbooster",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": ["url", "events"],
        "type": "object"
      },
      "CreatedWebhookEndpointDto": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "disabled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "disabled_reason": {
            "enum": ["failing", "manual"],
            "nullable": true,
            "type": "string"
          },
          "events": {
            "description": "Event names from `GET webhook-events` (e.g. lead.created, lead.updated, message.status).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "failing_since": {
            "description": "Failing without a success since then; 3 days of it turn the endpoint off.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "failure_count": {
            "description": "Failed attempts since the last success.",
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "last_delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_failure_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "previous_secret_expires_at": {
            "description": "After a rotation: the old secret also signs until then.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "secret": {
            "description": "The signing secret (`whsec_…`), shown only in this response. Each delivery carries `X-RapBooster-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`.",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": ["id", "url", "events", "is_enabled", "failure_count", "created_at", "secret"],
        "type": "object"
      },
      "CreditNoteDto": {
        "properties": {
          "cess_minor": {
            "description": "Plan 32: the lines' compensation cess (in `total_minor`).",
            "type": "number"
          },
          "cgst_minor": {
            "type": "number"
          },
          "credit_given_minor": {
            "description": "Plan 29 CB4: the customer credit it made (minor units); 0 = the money was kept. Absent on a credit note issued before that release with nothing backfilled.",
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "custom_fields": {
            "description": "N6.11 document fields.",
            "items": {
              "$ref": "#/components/schemas/SalesCustomFieldValueViewDto"
            },
            "type": "array"
          },
          "einvoice": {
            "$ref": "#/components/schemas/InvoiceEinvoiceDto"
          },
          "id": {
            "type": "string"
          },
          "igst_minor": {
            "type": "number"
          },
          "invoice_id": {
            "type": "string"
          },
          "issued_at": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CreditNoteItemDto"
            },
            "type": "array"
          },
          "number": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "refund_error": {
            "type": "string"
          },
          "refund_minor": {
            "type": "number"
          },
          "refund_status": {
            "enum": ["NONE", "PENDING", "REFUNDED", "FAILED"],
            "type": "string"
          },
          "sgst_minor": {
            "type": "number"
          },
          "status": {
            "enum": ["ISSUED", "CANCELLED"],
            "type": "string"
          },
          "tax_minor": {
            "type": "number"
          },
          "taxable_minor": {
            "type": "number"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": [
          "taxable_minor",
          "cgst_minor",
          "sgst_minor",
          "igst_minor",
          "tax_minor",
          "total_minor",
          "id",
          "invoice_id",
          "number",
          "status",
          "reason",
          "currency",
          "refund_minor",
          "refund_status",
          "issued_at",
          "items",
          "cess_minor"
        ],
        "type": "object"
      },
      "CreditNoteItemDto": {
        "properties": {
          "cess_minor": {
            "description": "Compensation cess credited.",
            "type": "number"
          },
          "cgst_minor": {
            "type": "number"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "igst_minor": {
            "type": "number"
          },
          "invoice_item_id": {
            "type": "string"
          },
          "item_type_label": {
            "description": "PB4: the credited line's catalogue type and period; absent on free text.",
            "example": "Desktop licence · Yearly",
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "sgst_minor": {
            "type": "number"
          },
          "tax_category": {
            "description": "Plan 32: the credited line's GST category.",
            "enum": ["taxable", "nil", "exempt", "non_gst"],
            "type": "string"
          },
          "tax_minor": {
            "type": "number"
          },
          "tax_name": {
            "description": "Simple tax: the credited line's named rate.",
            "type": "string"
          },
          "taxable_minor": {
            "type": "number"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": [
          "taxable_minor",
          "cgst_minor",
          "sgst_minor",
          "igst_minor",
          "tax_minor",
          "total_minor",
          "id",
          "description",
          "qty",
          "tax_category",
          "cess_minor"
        ],
        "type": "object"
      },
      "CreditNoteSummaryDto": {
        "properties": {
          "cgst_minor": {
            "type": "number"
          },
          "credit_given_minor": {
            "description": "Plan 29 CB4: the customer credit it made (minor units); 0 = the money was kept. Absent on a credit note issued before that release with nothing backfilled.",
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "igst_minor": {
            "type": "number"
          },
          "invoice_id": {
            "type": "string"
          },
          "issued_at": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "refund_error": {
            "type": "string"
          },
          "refund_minor": {
            "type": "number"
          },
          "refund_status": {
            "enum": ["NONE", "PENDING", "REFUNDED", "FAILED"],
            "type": "string"
          },
          "sgst_minor": {
            "type": "number"
          },
          "status": {
            "enum": ["ISSUED", "CANCELLED"],
            "type": "string"
          },
          "tax_minor": {
            "type": "number"
          },
          "taxable_minor": {
            "type": "number"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": [
          "taxable_minor",
          "cgst_minor",
          "sgst_minor",
          "igst_minor",
          "tax_minor",
          "total_minor",
          "id",
          "invoice_id",
          "number",
          "status",
          "reason",
          "currency",
          "refund_minor",
          "refund_status",
          "issued_at"
        ],
        "type": "object"
      },
      "CustomFieldDefinitionFlatResponseDto": {
        "properties": {
          "id": {
            "type": "string"
          },
          "is_required": {
            "type": "boolean"
          },
          "is_system": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "placeholder": {
            "nullable": true,
            "type": "string"
          },
          "system_name": {
            "nullable": true,
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": ["id", "key", "type", "label", "is_required", "order", "is_system"],
        "type": "object"
      },
      "ErrorResponseDto": {
        "properties": {
          "code": {
            "description": "Machine-readable error code (e.g. UNAUTHORIZED, NOT_FOUND).",
            "example": "ERROR_CODE",
            "type": "string"
          },
          "correlation_id": {
            "description": "Request correlation id, echoed for tracing.",
            "example": "3f1c8a2e-9b7d-4c1a-8e2f-0a1b2c3d4e5f",
            "type": "string"
          },
          "details": {
            "description": "Extra context — for validation failures, the list of field errors.",
            "example": ["field must not be empty"],
            "oneOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ]
          },
          "message": {
            "description": "Human-readable error message.",
            "example": "A description of what went wrong.",
            "type": "string"
          },
          "path": {
            "description": "Request path that produced the error.",
            "example": "/v1/user/me",
            "type": "string"
          },
          "timestamp": {
            "description": "ISO-8601 timestamp of when the error was produced.",
            "example": "2026-07-06T12:34:56.789Z",
            "type": "string"
          }
        },
        "required": ["code", "message", "timestamp", "path"],
        "type": "object"
      },
      "FieldRuleDto": {
        "properties": {
          "direction": {
            "description": "The Meta catalogue takes `off` or `to_remote` only.",
            "enum": ["off", "to_remote", "from_remote", "two_way"],
            "type": "string"
          },
          "winner": {
            "description": "Two-way only, when both sides changed: `ask` opens a conflict (default), else that side wins.",
            "enum": ["ask", "local", "remote"],
            "type": "string"
          }
        },
        "required": ["direction", "winner"],
        "type": "object"
      },
      "FieldRulesDto": {
        "properties": {
          "description": {
            "$ref": "#/components/schemas/FieldRuleDto"
          },
          "name": {
            "$ref": "#/components/schemas/FieldRuleDto"
          },
          "price": {
            "$ref": "#/components/schemas/FieldRuleDto"
          },
          "sku": {
            "$ref": "#/components/schemas/FieldRuleDto"
          },
          "stock": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FieldRuleDto"
              }
            ],
            "description": "Stock always moves as deltas (each side's sales are kept)."
          }
        },
        "required": ["name", "description", "sku", "price", "stock"],
        "type": "object"
      },
      "GroupUsageDto": {
        "properties": {
          "campaigns": {
            "type": "number"
          },
          "drips": {
            "type": "number"
          },
          "email_campaigns": {
            "type": "number"
          },
          "email_sequences": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": ["campaigns", "drips", "email_campaigns", "email_sequences", "total"],
        "type": "object"
      },
      "InvoiceAcceptanceDto": {
        "properties": {
          "action": {
            "enum": ["ACCEPT", "DECLINE", "REQUEST_CHANGES"],
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "document_hash": {
            "description": "sha256 of the document as shown.",
            "type": "string"
          },
          "full_name": {
            "description": "The typed full name (the signature).",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "note": {
            "description": "Decline reason or the changes asked for.",
            "type": "string"
          },
          "proforma_id": {
            "description": "The proforma an Accept & pay created.",
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          }
        },
        "required": ["id", "action", "full_name", "document_hash", "created_at"],
        "type": "object"
      },
      "InvoiceBuyerDto": {
        "properties": {
          "address_line1": {
            "type": "string"
          },
          "address_line2": {
            "type": "string"
          },
          "billing_name": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "gstin": {
            "type": "string"
          },
          "lead_name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "required": ["lead_name", "billing_name"],
        "type": "object"
      },
      "InvoiceDiscountCheckDto": {
        "properties": {
          "above_cap": {
            "type": "boolean"
          },
          "approval_pending": {
            "description": "A discount request on this document or an ancestor awaits a decision.",
            "type": "boolean"
          },
          "approved_pct": {
            "description": "The highest discount %, approved (`billing.sales.discount_over_cap`) on this document or an ancestor.",
            "type": "number"
          },
          "blocked": {
            "description": "Issuing is refused (409 `INVOICES_DISCOUNT_ABOVE_CAP`) until the discount is approved.",
            "type": "boolean"
          },
          "cap_pct": {
            "description": "The creator's cap, % (empty = 0).",
            "type": "number"
          },
          "pct": {
            "description": "Line + document discounts (+ the incl.-tax switch, PB5) ÷ gross, %.",
            "type": "number"
          },
          "price_override_minor": {
            "description": "DI-2: what catalogue lines priced below the catalogue took off (qty × difference), minor units; counted in `pct` against the catalogue gross.",
            "type": "number"
          },
          "tax_switch_minor": {
            "description": "PB5: what switching catalogue lines from plus tax to incl. tax took off, minor units.",
            "type": "number"
          }
        },
        "required": [
          "pct",
          "tax_switch_minor",
          "price_override_minor",
          "cap_pct",
          "above_cap",
          "blocked"
        ],
        "type": "object"
      },
      "InvoiceDiscountViewDto": {
        "properties": {
          "type": {
            "enum": ["PERCENT", "AMOUNT"],
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": ["type", "value"],
        "type": "object"
      },
      "InvoiceDto": {
        "properties": {
          "allow_part_payment": {
            "description": "B15: the pay link accepts part of what's due.",
            "type": "boolean"
          },
          "amended_at": {
            "description": "R36-14 (GST): a tax invoice whose billing details changed after the month it was paid (approved); the GST report lists it as amended (GSTR-1). Absent = never.",
            "type": "string"
          },
          "amount_due_minor": {
            "type": "number"
          },
          "amount_paid_minor": {
            "type": "number"
          },
          "asked_price_minor": {
            "description": "Proformas from the lead wizard: the price the buyer asked for, minor units (LT54), shown next to the quoted total.",
            "type": "number"
          },
          "auto_issued": {
            "description": "Plan 31 (PR-DA1): issued by the approval of its discount request, not by hand. Absent = false.",
            "type": "boolean"
          },
          "auto_source": {
            "description": "P35-26: what raised it: `renewal` (the renewal sweep), `recurring` (a schedule), `system` (a checkout, purchase or plan change). Absent = a member.",
            "enum": ["renewal", "recurring", "system"],
            "type": "string"
          },
          "billing_edit": {
            "description": "R36-14, issued / paid tax invoices: changing the billing details applies now (`direct`: in the month it was paid, or issued if unpaid) or needs approval and is listed as amended in GSTR-1 (`approval`: an earlier month). Absent on other documents or with an e-invoice IRN.",
            "enum": ["direct", "approval"],
            "type": "string"
          },
          "billing_id": {
            "type": "string"
          },
          "buyer": {
            "$ref": "#/components/schemas/InvoiceBuyerDto"
          },
          "cancelled_at": {
            "type": "string"
          },
          "cess_minor": {
            "description": "Plan 32: the lines' compensation cess (in `total_minor`, not in `tax_minor`).",
            "type": "number"
          },
          "cgst_minor": {
            "type": "number"
          },
          "child_id": {
            "description": "The newest document created from this one (proforma, then tax invoice).",
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "credited_minor": {
            "description": "Tax invoices: the total of its issued credit notes (taken off what is due).",
            "type": "number"
          },
          "credited_user_id": {
            "description": "Plan 7 L10: the sales member credited (the chain root's); absent = uncredited.",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "custom_fields": {
            "description": "N6.11 document fields.",
            "items": {
              "$ref": "#/components/schemas/SalesCustomFieldValueViewDto"
            },
            "type": "array"
          },
          "delete_pending": {
            "description": "P35-25, lists only: a delete of this quote / proforma waits for approval. Absent = none (the document view uses `pending_change`).",
            "type": "boolean"
          },
          "discount": {
            "$ref": "#/components/schemas/InvoiceDiscountViewDto"
          },
          "discount_check": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceDiscountCheckDto"
              }
            ],
            "description": "Drafts: the discount-cap check issuing will run (plan 7 L10)."
          },
          "discount_minor": {
            "type": "number"
          },
          "doc_type": {
            "enum": ["QUOTE", "PROFORMA", "TAX_INVOICE"],
            "type": "string"
          },
          "einvoice": {
            "$ref": "#/components/schemas/InvoiceEinvoiceDto"
          },
          "exchange_rate": {
            "description": "F14: base currency per 1 unit of `currency`; absent when it is the base.",
            "type": "number"
          },
          "exchange_rate_source": {
            "enum": ["FEED", "MANUAL"],
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "igst_minor": {
            "type": "number"
          },
          "import_source": {
            "description": "RX-D55: `tally` when the Tally import made it (out of GSTR-1 by default, never exported back).",
            "enum": ["tally"],
            "type": "string"
          },
          "is_auto": {
            "description": "P35-26: a proforma no member raised (a renewal, a recurring schedule's run or another job); the lists show \"Auto\".",
            "type": "boolean"
          },
          "is_imported": {
            "description": "F20: brought in by an import (never sent from here).",
            "type": "boolean"
          },
          "issued_at": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/InvoiceItemDto"
            },
            "type": "array"
          },
          "last_sent_at": {
            "type": "string"
          },
          "lead_id": {
            "type": "string"
          },
          "lead_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadType"
              }
            ],
            "description": "R36-45: the buyer lead's type, for the VIP / VVIP badge (document header; plan 37: the list rows too). Absent without a lead."
          },
          "min_part_percent": {
            "description": "Least part payment, % of what's due (0 = any amount).",
            "type": "number"
          },
          "needs_attention": {
            "description": "Overpaid, or a paid line the catalogue refused.",
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "overpaid_minor": {
            "description": "Paid beyond the total (flagged, never auto-refunded).",
            "type": "number"
          },
          "owner_change_pending": {
            "description": "P35-30: a change of this sale's owner waits for approval (on any document of the sale). Absent when none.",
            "type": "boolean"
          },
          "paid_at": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "pay_gateway": {
            "description": "A7.10.3: the gateway override; absent = the workspace default.",
            "enum": ["RAZORPAY", "STRIPE", "PAYTM", "CCAVENUE"],
            "type": "string"
          },
          "pay_link": {
            "description": "The public pay/view link (V10).",
            "type": "string"
          },
          "payment_mode": {
            "description": "Plan 21 (YP153): COD opens the goods order at issue; cash recorded on delivery.",
            "enum": ["PREPAID", "COD"],
            "type": "string"
          },
          "payment_pending": {
            "description": "P35-8: a payment recorded on this document waits for approval (`billing.payments.entry`). R36-12: more parts may still be recorded, together at most what is due. Absent when none.",
            "type": "boolean"
          },
          "pending_change": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoicePendingChangeDto"
              }
            ],
            "description": "Issued documents: a change waiting for approval; the document is unchanged until it is approved. Absent when none."
          },
          "pending_payments_minor": {
            "description": "R36-12: what the payments waiting for approval would settle (cash + customer TDS), minor units. Absent when none wait.",
            "type": "number"
          },
          "place_of_supply": {
            "description": "GST documents: the buyer's state, e.g. \"Rajasthan (08)\".",
            "type": "string"
          },
          "place_of_supply_unknown": {
            "description": "GST document whose buyer state is unknown: it was charged as intra-state.",
            "type": "boolean"
          },
          "port_code": {
            "type": "string"
          },
          "reminders": {
            "description": "Proformas: payment reminders, newest first.",
            "items": {
              "$ref": "#/components/schemas/InvoiceReminderDto"
            },
            "type": "array"
          },
          "reminders_paused": {
            "description": "B31: payment reminders paused for this document.",
            "type": "boolean"
          },
          "response_unseen": {
            "description": "B23: a buyer answered and no member had opened it yet.",
            "type": "boolean"
          },
          "responses": {
            "description": "Quotes: the buyer's responses, newest first.",
            "items": {
              "$ref": "#/components/schemas/InvoiceAcceptanceDto"
            },
            "type": "array"
          },
          "reverse_charge": {
            "description": "Plan 32 (RX-D29): \"Reverse charge applies\": no output tax charged, the buyer pays it.",
            "type": "boolean"
          },
          "revisable": {
            "description": "R36-14: an issued quote (issued, accepted, declined, changes requested, expired) or an issued proforma with nothing paid: `PUT` with `revise: true` saves a new revision.",
            "type": "boolean"
          },
          "revised_at": {
            "description": "R36-14: when the last revision was saved. Absent = never.",
            "type": "string"
          },
          "revision": {
            "description": "R36-14: 1 as first issued; each revision of an issued quote / proforma adds one.",
            "type": "number"
          },
          "round_off": {
            "type": "boolean"
          },
          "round_off_minor": {
            "type": "number"
          },
          "seller": {
            "$ref": "#/components/schemas/InvoiceSellerViewDto"
          },
          "send_pending": {
            "description": "Plan 31 (PR-DA1): auto-issued and never sent; the requester sends it. Absent = false.",
            "type": "boolean"
          },
          "sgst_minor": {
            "type": "number"
          },
          "shipping_bill_date": {
            "description": "YYYY-MM-DD.",
            "type": "string"
          },
          "shipping_bill_no": {
            "type": "string"
          },
          "status": {
            "enum": [
              "DRAFT",
              "ISSUED",
              "PARTIALLY_PAID",
              "PAID",
              "CANCELLED",
              "EXPIRED",
              "CONVERTED",
              "ACCEPTED",
              "DECLINED",
              "CHANGES_REQUESTED",
              "AWAITING_APPROVAL"
            ],
            "type": "string"
          },
          "subtotal_minor": {
            "type": "number"
          },
          "supply_type": {
            "enum": ["DOMESTIC", "EXPORT_WPAY", "EXPORT_WOPAY", "SEZ_WP", "SEZ_WOP"],
            "type": "string"
          },
          "tax_minor": {
            "type": "number"
          },
          "tax_mode": {
            "enum": ["GST_INTRA", "GST_INTER", "EXPORT", "NONE", "SIMPLE"],
            "type": "string"
          },
          "tax_registration_id": {
            "description": "F10: absent on documents from before registrations.",
            "type": "string"
          },
          "taxable_minor": {
            "type": "number"
          },
          "terms": {
            "type": "string"
          },
          "total_minor": {
            "type": "number"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "taxable_minor",
          "cgst_minor",
          "sgst_minor",
          "igst_minor",
          "tax_minor",
          "total_minor",
          "id",
          "doc_type",
          "status",
          "lead_id",
          "buyer",
          "seller",
          "currency",
          "tax_mode",
          "supply_type",
          "round_off",
          "allow_part_payment",
          "min_part_percent",
          "payment_mode",
          "subtotal_minor",
          "discount_minor",
          "round_off_minor",
          "amount_paid_minor",
          "amount_due_minor",
          "overpaid_minor",
          "needs_attention",
          "pay_link",
          "reminders_paused",
          "response_unseen",
          "is_imported",
          "reverse_charge",
          "is_auto",
          "revision",
          "revisable",
          "created_at",
          "updated_at",
          "items",
          "cess_minor",
          "responses",
          "reminders"
        ],
        "type": "object"
      },
      "InvoiceEinvoiceDto": {
        "properties": {
          "ack_date": {
            "type": "string"
          },
          "ack_no": {
            "type": "string"
          },
          "ewb_date": {
            "type": "string"
          },
          "ewb_no": {
            "description": "e-way bill number.",
            "type": "string"
          },
          "ewb_valid_till": {
            "type": "string"
          },
          "imported_at": {
            "type": "string"
          },
          "irn": {
            "description": "Invoice reference number (IRN).",
            "type": "string"
          },
          "signed_qr": {
            "description": "RX-10: the IRP's signed QR (a JWT), printed on the PDF once acked; absent before the ack.",
            "type": "string"
          }
        },
        "required": ["imported_at"],
        "type": "object"
      },
      "InvoiceItemDto": {
        "properties": {
          "billing_period": {
            "type": "string"
          },
          "catalogue_tax_inclusive": {
            "description": "PB5: the catalogue price's own incl.-tax setting (absent on free text and older lines).",
            "type": "boolean"
          },
          "catalogue_unit_price_minor": {
            "description": "DI-2: the catalogue's unit price when the line was saved (catalogue lines); `unit_price_minor` below it counts against the discount cap. Absent on free-text lines and older rows.",
            "type": "number"
          },
          "cess_minor": {
            "description": "Compensation cess charged (in `total_minor`, not `tax_minor`).",
            "type": "number"
          },
          "cess_rate_bp": {
            "description": "Compensation cess, basis points (100 = 1%).",
            "type": "number"
          },
          "cgst_minor": {
            "type": "number"
          },
          "credited_qty": {
            "description": "Tax invoices (plan 34, Q2): quantity already credited by issued credit notes; a new credit note may take at most `qty − credited_qty` of this line. Absent = none credited.",
            "type": "number"
          },
          "custom_fields": {
            "description": "N6.11 line fields.",
            "items": {
              "$ref": "#/components/schemas/SalesCustomFieldValueViewDto"
            },
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "discount": {
            "$ref": "#/components/schemas/InvoiceDiscountViewDto"
          },
          "discount_minor": {
            "description": "Line discount plus its share of the invoice discount.",
            "type": "number"
          },
          "domain_name": {
            "type": "string"
          },
          "fulfilment_attempted_at": {
            "type": "string"
          },
          "fulfilment_error": {
            "description": "Why the catalogue refused this paid line (retry it).",
            "type": "string"
          },
          "fulfilment_id": {
            "type": "string"
          },
          "fulfilment_type": {
            "type": "string"
          },
          "hsn_sac": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "igst_minor": {
            "type": "number"
          },
          "item_id": {
            "type": "string"
          },
          "item_type": {
            "type": "string"
          },
          "item_type_label": {
            "description": "PB3: catalogue type + billing period, saved with the line; absent on free text.",
            "example": "Desktop licence · Yearly",
            "type": "string"
          },
          "kind": {
            "enum": ["CATALOGUE", "CUSTOM"],
            "type": "string"
          },
          "position": {
            "type": "number"
          },
          "price_id": {
            "type": "string"
          },
          "price_kind": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "renewal_fulfilment_id": {
            "type": "string"
          },
          "renewal_fulfilment_type": {
            "type": "string"
          },
          "renewal_of_item_id": {
            "description": "RV3: the paid invoice line this one renews.",
            "type": "string"
          },
          "renewal_root_item_id": {
            "description": "RV3: the first line of this line's renewal chain.",
            "type": "string"
          },
          "sgst_minor": {
            "type": "number"
          },
          "tax_category": {
            "description": "Plan 32 (RX-D29): the line's GST category.",
            "enum": ["taxable", "nil", "exempt", "non_gst"],
            "type": "string"
          },
          "tax_inclusive": {
            "type": "boolean"
          },
          "tax_minor": {
            "type": "number"
          },
          "tax_name": {
            "description": "Simple tax: the named rate.",
            "type": "string"
          },
          "tax_rate": {
            "type": "number"
          },
          "taxable_minor": {
            "type": "number"
          },
          "total_minor": {
            "type": "number"
          },
          "unit": {
            "description": "UQC (NOS, KGS, …).",
            "type": "string"
          },
          "unit_price_minor": {
            "type": "number"
          },
          "validity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceItemValidityDto"
              }
            ],
            "description": "Plan 30 RV2 (custom lines)."
          },
          "variant_name": {
            "type": "string"
          }
        },
        "required": [
          "taxable_minor",
          "cgst_minor",
          "sgst_minor",
          "igst_minor",
          "tax_minor",
          "total_minor",
          "id",
          "position",
          "kind",
          "description",
          "qty",
          "unit_price_minor",
          "tax_inclusive",
          "tax_rate",
          "tax_category",
          "cess_rate_bp",
          "cess_minor",
          "discount_minor"
        ],
        "type": "object"
      },
      "InvoiceItemValidityDto": {
        "properties": {
          "count": {
            "description": "`days` / `months` only.",
            "type": "number"
          },
          "end": {
            "description": "The day the validity runs out (YYYY-MM-DD): start + period.",
            "example": "2027-11-05",
            "type": "string"
          },
          "period": {
            "enum": ["monthly", "quarterly", "half_yearly", "yearly", "days", "months"],
            "type": "string"
          },
          "start": {
            "description": "First day (YYYY-MM-DD).",
            "example": "2026-11-05",
            "type": "string"
          }
        },
        "required": ["period", "start", "end"],
        "type": "object"
      },
      "InvoicePendingChangeDto": {
        "properties": {
          "kind": {
            "description": "`cancel` (cancel the quote / proforma), `terms` (part-payment terms or gateway), `tax_invoice` (issue the tax invoice now), `credit_note`, `billing` (billing details after a payment, BD1) or `delete` (delete the quote / proforma, P35-25).",
            "enum": ["cancel", "terms", "tax_invoice", "credit_note", "billing", "delete"],
            "type": "string"
          },
          "request_id": {
            "description": "The `billing.sales.invoice` approval request it waits in.",
            "type": "string"
          }
        },
        "required": ["request_id", "kind"],
        "type": "object"
      },
      "InvoiceReminderDto": {
        "properties": {
          "channel": {
            "enum": ["EMAIL", "WHATSAPP"],
            "type": "string"
          },
          "error": {
            "description": "Why it didn't go out.",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "offset_days": {
            "description": "Days from the due date; negative = before.",
            "type": "number"
          },
          "sent_at": {
            "type": "string"
          }
        },
        "required": ["id", "offset_days", "channel", "sent_at"],
        "type": "object"
      },
      "InvoiceSellerViewDto": {
        "properties": {
          "address": {
            "type": "string"
          },
          "country_code": {
            "example": "IN",
            "type": "string"
          },
          "display_name": {
            "description": "Business profile trade name (N6.5); absent: print `name`.",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "gstin": {
            "description": "The tax ID (a GSTIN, or what `tax_id_label` names).",
            "type": "string"
          },
          "lut_fy": {
            "type": "string"
          },
          "lut_number": {
            "description": "F12: the LUT a without-payment export was issued under.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tax_id_label": {
            "description": "The tax ID's label (\"GSTIN\", \"VAT No.\"); also the buyer's.",
            "type": "string"
          },
          "tax_system": {
            "description": "Absent on older documents: INDIA_GST.",
            "enum": ["INDIA_GST", "SIMPLE"],
            "type": "string"
          },
          "website": {
            "type": "string"
          }
        },
        "required": ["name"],
        "type": "object"
      },
      "InvoiceSummaryDto": {
        "properties": {
          "allow_part_payment": {
            "description": "B15: the pay link accepts part of what's due.",
            "type": "boolean"
          },
          "amended_at": {
            "description": "R36-14 (GST): a tax invoice whose billing details changed after the month it was paid (approved); the GST report lists it as amended (GSTR-1). Absent = never.",
            "type": "string"
          },
          "amount_due_minor": {
            "type": "number"
          },
          "amount_paid_minor": {
            "type": "number"
          },
          "auto_source": {
            "description": "P35-26: what raised it: `renewal` (the renewal sweep), `recurring` (a schedule), `system` (a checkout, purchase or plan change). Absent = a member.",
            "enum": ["renewal", "recurring", "system"],
            "type": "string"
          },
          "billing_id": {
            "type": "string"
          },
          "buyer": {
            "$ref": "#/components/schemas/InvoiceBuyerDto"
          },
          "cancelled_at": {
            "type": "string"
          },
          "cgst_minor": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "credited_user_id": {
            "description": "Plan 7 L10: the sales member credited (the chain root's); absent = uncredited.",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "delete_pending": {
            "description": "P35-25, lists only: a delete of this quote / proforma waits for approval. Absent = none (the document view uses `pending_change`).",
            "type": "boolean"
          },
          "discount": {
            "$ref": "#/components/schemas/InvoiceDiscountViewDto"
          },
          "discount_minor": {
            "type": "number"
          },
          "doc_type": {
            "enum": ["QUOTE", "PROFORMA", "TAX_INVOICE"],
            "type": "string"
          },
          "exchange_rate": {
            "description": "F14: base currency per 1 unit of `currency`; absent when it is the base.",
            "type": "number"
          },
          "exchange_rate_source": {
            "enum": ["FEED", "MANUAL"],
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "igst_minor": {
            "type": "number"
          },
          "import_source": {
            "description": "RX-D55: `tally` when the Tally import made it (out of GSTR-1 by default, never exported back).",
            "enum": ["tally"],
            "type": "string"
          },
          "is_auto": {
            "description": "P35-26: a proforma no member raised (a renewal, a recurring schedule's run or another job); the lists show \"Auto\".",
            "type": "boolean"
          },
          "is_imported": {
            "description": "F20: brought in by an import (never sent from here).",
            "type": "boolean"
          },
          "issued_at": {
            "type": "string"
          },
          "last_sent_at": {
            "type": "string"
          },
          "lead_id": {
            "type": "string"
          },
          "lead_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadType"
              }
            ],
            "description": "R36-45: the buyer lead's type, for the VIP / VVIP badge (document header; plan 37: the list rows too). Absent without a lead."
          },
          "min_part_percent": {
            "description": "Least part payment, % of what's due (0 = any amount).",
            "type": "number"
          },
          "needs_attention": {
            "description": "Overpaid, or a paid line the catalogue refused.",
            "type": "boolean"
          },
          "notes": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "overpaid_minor": {
            "description": "Paid beyond the total (flagged, never auto-refunded).",
            "type": "number"
          },
          "paid_at": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "pay_gateway": {
            "description": "A7.10.3: the gateway override; absent = the workspace default.",
            "enum": ["RAZORPAY", "STRIPE", "PAYTM", "CCAVENUE"],
            "type": "string"
          },
          "pay_link": {
            "description": "The public pay/view link (V10).",
            "type": "string"
          },
          "payment_mode": {
            "description": "Plan 21 (YP153): COD opens the goods order at issue; cash recorded on delivery.",
            "enum": ["PREPAID", "COD"],
            "type": "string"
          },
          "place_of_supply": {
            "description": "GST documents: the buyer's state, e.g. \"Rajasthan (08)\".",
            "type": "string"
          },
          "place_of_supply_unknown": {
            "description": "GST document whose buyer state is unknown: it was charged as intra-state.",
            "type": "boolean"
          },
          "port_code": {
            "type": "string"
          },
          "reminders_paused": {
            "description": "B31: payment reminders paused for this document.",
            "type": "boolean"
          },
          "response_unseen": {
            "description": "B23: a buyer answered and no member had opened it yet.",
            "type": "boolean"
          },
          "reverse_charge": {
            "description": "Plan 32 (RX-D29): \"Reverse charge applies\": no output tax charged, the buyer pays it.",
            "type": "boolean"
          },
          "revisable": {
            "description": "R36-14: an issued quote (issued, accepted, declined, changes requested, expired) or an issued proforma with nothing paid: `PUT` with `revise: true` saves a new revision.",
            "type": "boolean"
          },
          "revised_at": {
            "description": "R36-14: when the last revision was saved. Absent = never.",
            "type": "string"
          },
          "revision": {
            "description": "R36-14: 1 as first issued; each revision of an issued quote / proforma adds one.",
            "type": "number"
          },
          "round_off": {
            "type": "boolean"
          },
          "round_off_minor": {
            "type": "number"
          },
          "seller": {
            "$ref": "#/components/schemas/InvoiceSellerViewDto"
          },
          "sgst_minor": {
            "type": "number"
          },
          "shipping_bill_date": {
            "description": "YYYY-MM-DD.",
            "type": "string"
          },
          "shipping_bill_no": {
            "type": "string"
          },
          "status": {
            "enum": [
              "DRAFT",
              "ISSUED",
              "PARTIALLY_PAID",
              "PAID",
              "CANCELLED",
              "EXPIRED",
              "CONVERTED",
              "ACCEPTED",
              "DECLINED",
              "CHANGES_REQUESTED",
              "AWAITING_APPROVAL"
            ],
            "type": "string"
          },
          "subtotal_minor": {
            "type": "number"
          },
          "supply_type": {
            "enum": ["DOMESTIC", "EXPORT_WPAY", "EXPORT_WOPAY", "SEZ_WP", "SEZ_WOP"],
            "type": "string"
          },
          "tax_minor": {
            "type": "number"
          },
          "tax_mode": {
            "enum": ["GST_INTRA", "GST_INTER", "EXPORT", "NONE", "SIMPLE"],
            "type": "string"
          },
          "tax_registration_id": {
            "description": "F10: absent on documents from before registrations.",
            "type": "string"
          },
          "taxable_minor": {
            "type": "number"
          },
          "terms": {
            "type": "string"
          },
          "total_minor": {
            "type": "number"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "taxable_minor",
          "cgst_minor",
          "sgst_minor",
          "igst_minor",
          "tax_minor",
          "total_minor",
          "id",
          "doc_type",
          "status",
          "lead_id",
          "buyer",
          "seller",
          "currency",
          "tax_mode",
          "supply_type",
          "round_off",
          "allow_part_payment",
          "min_part_percent",
          "payment_mode",
          "subtotal_minor",
          "discount_minor",
          "round_off_minor",
          "amount_paid_minor",
          "amount_due_minor",
          "overpaid_minor",
          "needs_attention",
          "pay_link",
          "reminders_paused",
          "response_unseen",
          "is_imported",
          "reverse_charge",
          "is_auto",
          "revision",
          "revisable",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "LeadBillingDto": {
        "properties": {
          "address_line1": {
            "nullable": true,
            "type": "string"
          },
          "address_line2": {
            "nullable": true,
            "type": "string"
          },
          "billing_name": {
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "gstin": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "description": "Whether this is the lead's default.",
            "type": "boolean"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "lead_id": {
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "postal_code": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": ["id", "lead_id", "billing_name", "is_default", "created_at", "updated_at"],
        "type": "object"
      },
      "LeadCountDto": {
        "properties": {
          "count": {
            "type": "number"
          },
          "key": {
            "type": "string"
          }
        },
        "required": ["key", "count"],
        "type": "object"
      },
      "LeadCountsDto": {
        "properties": {
          "pending_approvals": {
            "deprecated": true,
            "description": "Always 0: approvals moved to Tasks (A7.16.10). Deprecated (API-37), removed in a later release.",
            "type": "number"
          },
          "stale": {
            "description": "True when a fresh count timed out and these are the last cached numbers (plan 30 ST14).",
            "type": "boolean"
          },
          "statuses": {
            "description": "One per live lead status; `key` is the `crm_lead_status` id (LT12).",
            "items": {
              "$ref": "#/components/schemas/LeadCountDto"
            },
            "type": "array"
          },
          "total": {
            "type": "number"
          },
          "treasure_box": {
            "description": "Leads in the treasure box (everyone sees the whole box).",
            "type": "number"
          },
          "views": {
            "description": "One per view the caller may see (LeadView keys).",
            "items": {
              "$ref": "#/components/schemas/LeadCountDto"
            },
            "type": "array"
          }
        },
        "required": ["total", "treasure_box", "pending_approvals", "statuses", "views"],
        "type": "object"
      },
      "LeadDetailDto": {
        "properties": {
          "active_items": {
            "description": "BI1: catalogue items bought on the lead's paid / part-paid tax invoices that are still live (the header's \"N active\" chip; records section `purchased_items`).",
            "type": "integer"
          },
          "assigned_user_id": {
            "description": "Owner (central user id).",
            "nullable": true,
            "type": "string"
          },
          "assignee_name": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "description": "Plan 31: the lead's city.",
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "description": "ISO-3166 alpha-2.",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "Central user id.",
            "nullable": true,
            "type": "string"
          },
          "customer": {
            "description": "Has an active sale: the Customer badge (LT15). Lists and the lead page.",
            "nullable": true,
            "type": "boolean"
          },
          "default_billing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadBillingDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "default_billing_id": {
            "type": "string"
          },
          "detail_change_request_id": {
            "description": "Set when the edit changed an existing mobile / email without `crm.edit_contact_details`: that part waits in this `crm.contact_detail_change` request; the rest was saved.",
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "external_account_deleted_at": {
            "description": "Master tenant only: when the linked workspace was deleted (SA-17).",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "external_account_id": {
            "nullable": true,
            "type": "string"
          },
          "given_up": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadGivenUpDto"
              }
            ],
            "description": "Set while the latest owner change is a give-up with no follow-up since (LT17).",
            "nullable": true,
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "in_reach": {
            "description": "P35-8: the caller may change this lead (PM5 reach). Outside reach the lead page offers only what stays open (sends, pins, demos, Grab, comments, a new follow-up).",
            "type": "boolean"
          },
          "interest_names": {
            "description": "Leads list only (R36-16): the lead's Interested in names (catalogue items and custom values).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "interests": {
            "description": "Interested in (LT16, R36-16).",
            "items": {
              "$ref": "#/components/schemas/LeadInterestDto"
            },
            "type": "array"
          },
          "is_vip": {
            "deprecated": true,
            "description": "Deprecated (R36-45): `type` is `vip` or `vvip`. Removed in the next release.",
            "type": "boolean"
          },
          "last_activity_at": {
            "description": "Lists only: the latest note, call, email, chat, follow-up or status change.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "mobile": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "next_followup_at": {
            "description": "Lists only: the soonest pending follow-up.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "next_followup_id": {
            "description": "Newly assigned / Grabbed lists only (plan 29 N): the soonest pending follow-up's id.",
            "nullable": true,
            "type": "string"
          },
          "owner_change_from_name": {
            "description": "That previous owner's name.",
            "nullable": true,
            "type": "string"
          },
          "owner_change_from_user_id": {
            "description": "Grabbed list: the previous owner (central user id); absent = nobody (a given-up lead from the treasure box).",
            "nullable": true,
            "type": "string"
          },
          "owner_change_kind": {
            "description": "Newly assigned / Grabbed lists only: how it got its owner (absent = created already owned).",
            "enum": ["ASSIGN", "GRAB", "HANDOVER"],
            "nullable": true,
            "type": "string"
          },
          "owner_changed_at": {
            "description": "Newly assigned / Grabbed lists only: when the lead got its current owner (the latest owner change, else its creation).",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "pool": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadPool"
              }
            ],
            "description": "Plan 7: the unowned pool it waits in (Enquiries / Phone contacts); absent once owned.",
            "nullable": true
          },
          "pool_entered_at": {
            "description": "When it entered the pool.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "pool_uploaded_by": {
            "description": "Phone contacts: the member whose mobile uploaded it (central user id).",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_name": {
            "description": "Their name (\"Name · left\" for a released member); with `previous_owner_user_id`.",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_since": {
            "description": "PRR37: when the handover happened (\"from Aarav Sharma on 22 Oct\"); with `previous_owner_user_id`.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_until": {
            "description": "Until when both names show (30 days after the handover).",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_user_id": {
            "description": "Plan 22 (ML3): the owner before a handover (central user id), only while `previous_owner_until` is ahead.",
            "nullable": true,
            "type": "string"
          },
          "primary_contact": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadPrimaryContactDto"
              }
            ],
            "description": "The contact flagged primary; absent = none (the lead's own mobile / email apply).",
            "nullable": true,
            "type": "object"
          },
          "rating": {
            "description": "1–5, from the latest follow-up (LT38).",
            "nullable": true,
            "type": "number"
          },
          "signup_step": {
            "description": "Master only (W2g): the last sign-up step (phone_entered, otp_verified, profile_filled, workspace_created, trial_started, paid).",
            "nullable": true,
            "type": "string"
          },
          "sold_through": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadSoldThroughDto"
              }
            ],
            "description": "R36-45: the Reseller lead this customer was sold through.",
            "nullable": true,
            "type": "object"
          },
          "source_id": {
            "description": "Plan 7: where the lead came from.",
            "nullable": true,
            "type": "string"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStage"
              }
            ],
            "description": "The pipeline stage, worked out from the lead's data (LT13, LT105).",
            "nullable": true
          },
          "stage_source": {
            "description": "What put the lead in its stage (LT13).",
            "enum": ["created", "contact_logged", "trial_active", "proforma_sent", "sale"],
            "nullable": true,
            "type": "string"
          },
          "state": {
            "description": "The lead's state (an Indian state's name when country_code is IN).",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStatusRefDto"
              }
            ],
            "description": "The lead's status (LT12); absent only for a lead not migrated yet.",
            "nullable": true,
            "type": "object"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadType"
              }
            ],
            "description": "R36-45: Standard, Reseller, Affiliate, VIP or VVIP (Reseller / Affiliate only in RapBooster's own workspace). A lead of a type whose key the caller lacks is never returned."
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "is_vip",
          "default_billing_id",
          "created_at",
          "updated_at",
          "interests"
        ],
        "type": "object"
      },
      "LeadDto": {
        "properties": {
          "assigned_user_id": {
            "description": "Owner (central user id).",
            "nullable": true,
            "type": "string"
          },
          "assignee_name": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "description": "Plan 31: the lead's city.",
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "description": "ISO-3166 alpha-2.",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "Central user id.",
            "nullable": true,
            "type": "string"
          },
          "customer": {
            "description": "Has an active sale: the Customer badge (LT15). Lists and the lead page.",
            "nullable": true,
            "type": "boolean"
          },
          "default_billing_id": {
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "external_account_deleted_at": {
            "description": "Master tenant only: when the linked workspace was deleted (SA-17).",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "external_account_id": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "interest_names": {
            "description": "Leads list only (R36-16): the lead's Interested in names (catalogue items and custom values).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "is_vip": {
            "deprecated": true,
            "description": "Deprecated (R36-45): `type` is `vip` or `vvip`. Removed in the next release.",
            "type": "boolean"
          },
          "last_activity_at": {
            "description": "Lists only: the latest note, call, email, chat, follow-up or status change.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "mobile": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "next_followup_at": {
            "description": "Lists only: the soonest pending follow-up.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "next_followup_id": {
            "description": "Newly assigned / Grabbed lists only (plan 29 N): the soonest pending follow-up's id.",
            "nullable": true,
            "type": "string"
          },
          "owner_change_from_name": {
            "description": "That previous owner's name.",
            "nullable": true,
            "type": "string"
          },
          "owner_change_from_user_id": {
            "description": "Grabbed list: the previous owner (central user id); absent = nobody (a given-up lead from the treasure box).",
            "nullable": true,
            "type": "string"
          },
          "owner_change_kind": {
            "description": "Newly assigned / Grabbed lists only: how it got its owner (absent = created already owned).",
            "enum": ["ASSIGN", "GRAB", "HANDOVER"],
            "nullable": true,
            "type": "string"
          },
          "owner_changed_at": {
            "description": "Newly assigned / Grabbed lists only: when the lead got its current owner (the latest owner change, else its creation).",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "pool": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadPool"
              }
            ],
            "description": "Plan 7: the unowned pool it waits in (Enquiries / Phone contacts); absent once owned.",
            "nullable": true
          },
          "pool_entered_at": {
            "description": "When it entered the pool.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "pool_uploaded_by": {
            "description": "Phone contacts: the member whose mobile uploaded it (central user id).",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_name": {
            "description": "Their name (\"Name · left\" for a released member); with `previous_owner_user_id`.",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_since": {
            "description": "PRR37: when the handover happened (\"from Aarav Sharma on 22 Oct\"); with `previous_owner_user_id`.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_until": {
            "description": "Until when both names show (30 days after the handover).",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "previous_owner_user_id": {
            "description": "Plan 22 (ML3): the owner before a handover (central user id), only while `previous_owner_until` is ahead.",
            "nullable": true,
            "type": "string"
          },
          "primary_contact": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadPrimaryContactDto"
              }
            ],
            "description": "The contact flagged primary; absent = none (the lead's own mobile / email apply).",
            "nullable": true,
            "type": "object"
          },
          "rating": {
            "description": "1–5, from the latest follow-up (LT38).",
            "nullable": true,
            "type": "number"
          },
          "signup_step": {
            "description": "Master only (W2g): the last sign-up step (phone_entered, otp_verified, profile_filled, workspace_created, trial_started, paid).",
            "nullable": true,
            "type": "string"
          },
          "sold_through": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadSoldThroughDto"
              }
            ],
            "description": "R36-45: the Reseller lead this customer was sold through.",
            "nullable": true,
            "type": "object"
          },
          "source_id": {
            "description": "Plan 7: where the lead came from.",
            "nullable": true,
            "type": "string"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStage"
              }
            ],
            "description": "The pipeline stage, worked out from the lead's data (LT13, LT105).",
            "nullable": true
          },
          "state": {
            "description": "The lead's state (an Indian state's name when country_code is IN).",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStatusRefDto"
              }
            ],
            "description": "The lead's status (LT12); absent only for a lead not migrated yet.",
            "nullable": true,
            "type": "object"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadType"
              }
            ],
            "description": "R36-45: Standard, Reseller, Affiliate, VIP or VVIP (Reseller / Affiliate only in RapBooster's own workspace). A lead of a type whose key the caller lacks is never returned."
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "is_vip",
          "default_billing_id",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "LeadGivenUpDto": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "by": {
            "description": "Who gave it up (central user id).",
            "nullable": true,
            "type": "string"
          },
          "note": {
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["at"],
        "type": "object"
      },
      "LeadInterestDto": {
        "properties": {
          "item_id": {
            "type": "string"
          },
          "item_type": {
            "description": "A catalogue item type key (`desktop-tools`, `services`, …) or `custom` (a CRM settings value).",
            "enum": [
              "services",
              "desktop-tools",
              "saas-tools",
              "products",
              "domain-tlds",
              "hosting-plans",
              "custom"
            ],
            "type": "string"
          },
          "name": {
            "description": "Absent once the item is deleted.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["item_type", "item_id"],
        "type": "object"
      },
      "LeadPool": {
        "description": "Plan 7: the unowned pool it waits in (Enquiries / Phone contacts); absent once owned.",
        "enum": ["ENQUIRY", "PHONE_CONTACT"],
        "type": "string"
      },
      "LeadPrimaryContactDto": {
        "properties": {
          "email": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "mobile": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "LeadSoldThroughDto": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "description": "Null when the reseller lead is gone.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["id"],
        "type": "object"
      },
      "LeadStage": {
        "enum": ["new", "contacted", "trial", "negotiation", "customer"],
        "type": "string"
      },
      "LeadStatusCategory": {
        "enum": ["open", "won", "lost", "given_up"],
        "type": "string"
      },
      "LeadStatusDto": {
        "properties": {
          "archived_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStatusCategory"
              }
            ]
          },
          "color": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_category_default": {
            "type": "boolean"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_stage_default": {
            "type": "boolean"
          },
          "lead_count": {
            "description": "Leads on this status now.",
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "sort": {
            "type": "number"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStage"
              }
            ],
            "nullable": true
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "category",
          "sort",
          "is_default",
          "is_stage_default",
          "is_category_default",
          "lead_count",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "LeadStatusRefDto": {
        "properties": {
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStatusCategory"
              }
            ]
          },
          "color": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "stage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LeadStage"
              }
            ],
            "nullable": true
          }
        },
        "required": ["id", "name", "category"],
        "type": "object"
      },
      "LeadType": {
        "description": "R36-45: Standard, Reseller, Affiliate, VIP or VVIP (Reseller / Affiliate only in RapBooster's own workspace). A lead of a type whose key the caller lacks is never returned.",
        "enum": ["standard", "reseller", "affiliate", "vip", "vvip"],
        "type": "string"
      },
      "LeadView": {
        "enum": [
          "FOLLOWUPS_DUE",
          "UNANSWERED_WHATSAPP",
          "MISSED_CALLS",
          "UNASSIGNED",
          "MONEY_OWED",
          "OPEN_TICKETS",
          "NEW_THIS_WEEK",
          "GOING_QUIET",
          "RENEWALS_DUE",
          "CUSTOMERS",
          "DEMO_SCHEDULED",
          "DEMO_TODAY",
          "DEMO_OUTCOME_DUE",
          "DEMO_DONE",
          "NO_SHOW",
          "FOLLOWUP_TODAY",
          "OVERDUE",
          "UNTOUCHED",
          "HOT",
          "QUOTE_SENT",
          "ON_TRIAL",
          "WON_THIS_MONTH",
          "LOST_THIS_MONTH",
          "NEWLY_ASSIGNED",
          "GRABBED",
          "RENEWALS_EXPIRING",
          "RENEWALS_EXPIRED",
          "RENEWED"
        ],
        "type": "string"
      },
      "OfferChannelReportDto": {
        "properties": {
          "channel": {
            "enum": ["store", "app", "billing", "pos", "plan_checkout", "quote", "pay_link"],
            "type": "string"
          },
          "discount_minor": {
            "type": "number"
          },
          "revenue_minor": {
            "type": "number"
          },
          "uses": {
            "type": "number"
          }
        },
        "required": ["channel", "uses", "discount_minor", "revenue_minor"],
        "type": "object"
      },
      "OfferCodeDto": {
        "properties": {
          "batch_id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "disabled_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "single_use": {
            "type": "boolean"
          },
          "used_count": {
            "type": "number"
          }
        },
        "required": ["id", "code", "single_use", "used_count", "created_at"],
        "type": "object"
      },
      "OfferDayReportDto": {
        "properties": {
          "day": {
            "format": "date",
            "type": "string"
          },
          "discount_minor": {
            "type": "number"
          },
          "uses": {
            "type": "number"
          }
        },
        "required": ["day", "uses", "discount_minor"],
        "type": "object"
      },
      "OfferDto": {
        "properties": {
          "auto_apply": {
            "type": "boolean"
          },
          "channels": {
            "items": {
              "enum": ["store", "app", "billing", "pos", "plan_checkout", "quote", "pay_link"],
              "type": "string"
            },
            "type": "array"
          },
          "codes": {
            "type": "number"
          },
          "combinable": {
            "type": "boolean"
          },
          "config": {
            "additionalProperties": true,
            "type": "object"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "discount_minor": {
            "type": "number"
          },
          "eligibility": {
            "additionalProperties": true,
            "type": "object"
          },
          "ends_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": ["percent", "flat", "free_shipping", "bxgy", "tiered"],
            "type": "string"
          },
          "min_order_minor": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "per_customer_limit": {
            "type": "number"
          },
          "public_code": {
            "type": "string"
          },
          "revenue_minor": {
            "type": "number"
          },
          "reversed": {
            "type": "number"
          },
          "starts_at": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "enum": ["live", "scheduled", "ended", "paused", "archived"],
            "type": "string"
          },
          "status": {
            "enum": ["active", "paused", "archived"],
            "type": "string"
          },
          "summary": {
            "description": "What the offer gives, e.g. \"Buy 2 get 1 free\".",
            "type": "string"
          },
          "targets": {
            "additionalProperties": true,
            "type": "object"
          },
          "total_limit": {
            "type": "number"
          },
          "uses": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "summary",
          "config",
          "targets",
          "eligibility",
          "combinable",
          "auto_apply",
          "channels",
          "status",
          "state",
          "uses",
          "reversed",
          "revenue_minor",
          "discount_minor",
          "codes",
          "created_at"
        ],
        "type": "object"
      },
      "OfferRedemptionDto": {
        "properties": {
          "buyer_id": {
            "type": "string"
          },
          "channel": {
            "enum": ["store", "app", "billing", "pos", "plan_checkout", "quote", "pay_link"],
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "discount_minor": {
            "type": "number"
          },
          "document_id": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "lead_id": {
            "type": "string"
          },
          "offer_id": {
            "type": "string"
          },
          "reversed_at": {
            "format": "date-time",
            "type": "string"
          },
          "store_order_id": {
            "type": "string"
          }
        },
        "required": ["id", "offer_id", "channel", "discount_minor", "created_at"],
        "type": "object"
      },
      "OfferReportDto": {
        "properties": {
          "by_channel": {
            "items": {
              "$ref": "#/components/schemas/OfferChannelReportDto"
            },
            "type": "array"
          },
          "by_day": {
            "items": {
              "$ref": "#/components/schemas/OfferDayReportDto"
            },
            "type": "array"
          },
          "discount_minor": {
            "type": "number"
          },
          "offer_id": {
            "type": "string"
          },
          "revenue_minor": {
            "type": "number"
          },
          "reversed": {
            "type": "number"
          },
          "uses": {
            "type": "number"
          }
        },
        "required": [
          "offer_id",
          "uses",
          "reversed",
          "revenue_minor",
          "discount_minor",
          "by_channel",
          "by_day"
        ],
        "type": "object"
      },
      "OrderItemQtyViewDto": {
        "properties": {
          "order_item_id": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          }
        },
        "required": ["order_item_id", "qty"],
        "type": "object"
      },
      "OrderReturnDto": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/OrderItemQtyViewDto"
            },
            "type": "array"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "restock": {
            "type": "boolean"
          }
        },
        "required": ["id", "restock", "created_at", "items"],
        "type": "object"
      },
      "OrdersSummaryDto": {
        "properties": {
          "cancelled": {
            "type": "number"
          },
          "cod_to_collect": {
            "description": "COD orders whose cash is not recorded yet.",
            "type": "number"
          },
          "delivered": {
            "type": "number"
          },
          "in_transit": {
            "description": "Sidebar: a parcel on its way.",
            "type": "number"
          },
          "issues": {
            "description": "Sidebar: cancelled, a parcel returned to sender, or COD cash not recorded.",
            "type": "number"
          },
          "ready_to_ship": {
            "description": "Sidebar: a parcel packed, not left yet.",
            "type": "number"
          },
          "returns": {
            "description": "Sidebar: returned, or with a return recorded.",
            "type": "number"
          },
          "shipped_last7_days": {
            "description": "Orders with a parcel that left in the last 7 days.",
            "type": "number"
          },
          "to_pack": {
            "description": "Sidebar: open, with something to pack and no parcel waiting.",
            "type": "number"
          },
          "to_ship": {
            "description": "CONFIRMED: paid, not sent yet.",
            "type": "number"
          }
        },
        "required": [
          "to_ship",
          "shipped_last7_days",
          "delivered",
          "cancelled",
          "to_pack",
          "ready_to_ship",
          "in_transit",
          "issues",
          "returns",
          "cod_to_collect"
        ],
        "type": "object"
      },
      "PageMetaDto": {
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "has_previous_page": {
            "type": "boolean"
          },
          "limit": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "total_items": {
            "type": "number"
          },
          "total_pages": {
            "type": "number"
          }
        },
        "required": [
          "page",
          "limit",
          "total_items",
          "total_pages",
          "has_next_page",
          "has_previous_page"
        ],
        "type": "object"
      },
      "PublicContactDto": {
        "properties": {
          "country_code": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "existing": {
            "description": "On create: true when the email or phone was known.",
            "type": "boolean"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/PublicContactGroupDto"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": ["id", "groups", "created_at", "updated_at"],
        "type": "object"
      },
      "PublicContactGroupDto": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "PublicContactWriteDto": {
        "properties": {
          "country_code": {
            "example": "IN",
            "nullable": true,
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "nullable": true,
            "type": "string"
          },
          "group_ids": {
            "description": "Groups to put the person in (on update: exactly these).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "maxLength": 200,
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "description": "With its calling code (`+91…`), or give `country_code`.",
            "maxLength": 32,
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PublicCreateLeadDto": {
        "properties": {
          "city": {
            "example": "Jaipur",
            "maxLength": 120,
            "nullable": true,
            "type": "string"
          },
          "contact_name": {
            "description": "The lead's first contact person (LP12). Default: the lead's name.",
            "maxLength": 200,
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "description": "ISO-3166 alpha-2.",
            "example": "IN",
            "nullable": true,
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "nullable": true,
            "type": "string"
          },
          "mobile": {
            "example": "+919876543210",
            "maxLength": 32,
            "nullable": true,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "source_id": {
            "description": "A lead source id.",
            "nullable": true,
            "type": "string"
          },
          "state": {
            "description": "An Indian state's name when country_code is IN, free text otherwise.",
            "example": "Rajasthan",
            "maxLength": 120,
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "A lead status name from the workspace's list (Leads settings › Statuses), any case. Default: the workspace's default status.",
            "maxLength": 60,
            "type": "string"
          }
        },
        "required": ["name"],
        "type": "object"
      },
      "PublicLeadDto": {
        "properties": {
          "assigned_user_id": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "description": "ISO-3166 alpha-2.",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "mobile": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source_id": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "The status's name.",
            "nullable": true,
            "type": "string"
          },
          "status_category": {
            "description": "What the status means: open, won, lost or given up.",
            "enum": ["open", "won", "lost", "given_up"],
            "nullable": true,
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": ["id", "name", "created_at", "updated_at"],
        "type": "object"
      },
      "PublicMessageDto": {
        "properties": {
          "channel": {
            "enum": ["whatsapp", "email"],
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "error": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "description": "WhatsApp: Meta's message id; email: ours.",
            "type": "string"
          },
          "number_id": {
            "description": "WhatsApp send only: the number it went from.",
            "type": "string"
          },
          "sender": {
            "description": "WhatsApp send only: which sender carried it.",
            "enum": ["official", "linked"],
            "type": "string"
          },
          "sent_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "`sent`, or `queued` on a linked number's paced queue.",
            "example": "sent",
            "type": "string"
          },
          "test": {
            "description": "True on a test key's dry-run send: nothing was sent and no credits were used.",
            "type": "boolean"
          }
        },
        "required": ["channel", "id", "status"],
        "type": "object"
      },
      "PublicSendEmailDto": {
        "properties": {
          "connection_id": {
            "description": "Default: the system one.",
            "nullable": true,
            "type": "string"
          },
          "html": {
            "description": "Default: `text` as HTML.",
            "nullable": true,
            "type": "string"
          },
          "subject": {
            "maxLength": 255,
            "type": "string"
          },
          "text": {
            "description": "Plain-text body.",
            "maxLength": 100000,
            "type": "string"
          },
          "to": {
            "maxLength": 320,
            "type": "string"
          }
        },
        "required": ["to", "subject", "text"],
        "type": "object"
      },
      "PublicSendWhatsappDto": {
        "properties": {
          "channel": {
            "default": "official",
            "description": "`official`: Meta's number (default). `linked`: a linked number, which sends the template's text version. `auto`: the sender rule set for the API purpose in WhatsApp settings.",
            "enum": ["official", "linked", "auto"],
            "type": "string"
          },
          "language": {
            "example": "en",
            "nullable": true,
            "type": "string"
          },
          "number_id": {
            "description": "The number to send from: Meta's phone-number id, or a linked number's id with `channel` `linked` / `auto`. Replaces `phone_number_id`.",
            "nullable": true,
            "type": "string"
          },
          "params": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Template variables by position (`1`, `2`, …) or name.",
            "type": "object"
          },
          "phone_number_id": {
            "description": "Meta's phone-number id to send from (default: the campaign default).",
            "nullable": true,
            "type": "string"
          },
          "template_id": {
            "description": "The approved template's Meta id.",
            "type": "string"
          },
          "to": {
            "example": "+919876543210",
            "maxLength": 32,
            "type": "string"
          }
        },
        "required": ["to", "template_id"],
        "type": "object"
      },
      "PublicUpdateLeadDto": {
        "properties": {
          "city": {
            "example": "Jaipur",
            "maxLength": 120,
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "description": "ISO-3166 alpha-2.",
            "example": "IN",
            "nullable": true,
            "type": "string"
          },
          "email": {
            "maxLength": 320,
            "nullable": true,
            "type": "string"
          },
          "mobile": {
            "maxLength": 32,
            "nullable": true,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "state": {
            "description": "An Indian state's name when country_code is IN, free text otherwise.",
            "example": "Rajasthan",
            "maxLength": 120,
            "nullable": true,
            "type": "string"
          },
          "status": {
            "description": "A lead status name from the workspace's list (Leads settings › Statuses), any case.",
            "maxLength": 60,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SalesCustomFieldValueViewDto": {
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": ["key", "label", "value"],
        "type": "object"
      },
      "SiteApiAddressDto": {
        "properties": {
          "city": {
            "nullable": true,
            "type": "string"
          },
          "country_code": {
            "example": "IN",
            "nullable": true,
            "type": "string"
          },
          "line": {
            "nullable": true,
            "type": "string"
          },
          "pincode": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SiteApiApplicationDto": {
        "properties": {
          "application_id": {
            "type": "string"
          },
          "created": {
            "description": "False when this email already applied to the job.",
            "type": "boolean"
          }
        },
        "required": ["application_id", "created"],
        "type": "object"
      },
      "SiteApiApplicationFormDto": {
        "properties": {
          "cv": {
            "description": "PDF, at most 5 MB.",
            "format": "binary",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "job_slug": {
            "example": "sales-executive-12",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "example": "+919876543210",
            "type": "string"
          },
          "portfolio_url": {
            "type": "string"
          },
          "verified_token": {
            "description": "From `hrms/applications/otp/verify`.",
            "type": "string"
          }
        },
        "required": ["name", "phone", "email", "job_slug", "verified_token", "cv"],
        "type": "object"
      },
      "SiteApiApplyOtpDto": {
        "properties": {
          "phone": {
            "example": "+919876543210",
            "type": "string"
          }
        },
        "required": ["phone"],
        "type": "object"
      },
      "SiteApiApplyOtpSentDto": {
        "properties": {
          "expires_in": {
            "description": "Seconds.",
            "type": "number"
          },
          "request_id": {
            "type": "string"
          },
          "resend_in": {
            "description": "Seconds before a resend.",
            "type": "number"
          }
        },
        "required": ["request_id", "expires_in", "resend_in"],
        "type": "object"
      },
      "SiteApiApplyOtpVerifyDto": {
        "properties": {
          "code": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": ["request_id", "phone", "code"],
        "type": "object"
      },
      "SiteApiCampaignDto": {
        "properties": {
          "completed_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scheduled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/SiteApiCampaignStatsDto"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": ["id", "name", "status", "type", "stats", "created_at"],
        "type": "object"
      },
      "SiteApiCampaignStatsDto": {
        "properties": {
          "failed": {
            "type": "number"
          },
          "sent": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": ["total", "sent", "failed"],
        "type": "object"
      },
      "SiteApiEnquiryDto": {
        "properties": {
          "captcha_token": {
            "description": "reCAPTCHA token; required with a publishable key.",
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "consent": {
            "description": "The visitor agreed to be contacted.",
            "enum": [true],
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "kind": {
            "enum": ["contact", "service", "corporate_gifting", "trade", "franchise", "careers"],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "example": "+919876543210",
            "type": "string"
          },
          "quantity": {
            "description": "Units asked for (corporate gifting, trade).",
            "type": "number"
          },
          "service": {
            "description": "The service asked about (kind `service`).",
            "type": "string"
          },
          "source_url": {
            "description": "The page the form was sent from.",
            "type": "string"
          },
          "tags": {
            "description": "Extra lead tags (≤ 10, ≤ 40 chars each).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "website": {
            "description": "Honeypot: leave empty. A filled one is answered like a success and nothing is saved.",
            "type": "string"
          }
        },
        "required": ["kind", "name", "phone", "message", "consent"],
        "type": "object"
      },
      "SiteApiEnquiryReceivedDto": {
        "properties": {
          "created": {
            "description": "Secret keys only: false when an existing lead took it.",
            "type": "boolean"
          },
          "lead_id": {
            "description": "Secret keys only: the lead it landed on.",
            "type": "string"
          },
          "received": {
            "enum": [true],
            "type": "boolean"
          }
        },
        "required": ["received"],
        "type": "object"
      },
      "SiteApiJobDto": {
        "properties": {
          "batch": {
            "nullable": true,
            "type": "string"
          },
          "date_posted": {
            "description": "ISO date-time the role was opened.",
            "nullable": true,
            "type": "string"
          },
          "department": {
            "nullable": true,
            "type": "string"
          },
          "description_html": {
            "description": "Escaped HTML (paragraphs, line breaks).",
            "type": "string"
          },
          "employment_type": {
            "example": "FULL_TIME",
            "nullable": true,
            "type": "string"
          },
          "employment_type_label": {
            "nullable": true,
            "type": "string"
          },
          "internship": {
            "type": "boolean"
          },
          "location": {
            "nullable": true,
            "type": "string"
          },
          "salary_range": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SiteApiSalaryRangeDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "slug": {
            "example": "sales-executive-12",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "valid_through": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["slug", "title", "description_html", "internship"],
        "type": "object"
      },
      "SiteApiPhoneVerifiedDto": {
        "properties": {
          "expires_in": {
            "description": "Seconds (30 minutes).",
            "type": "number"
          },
          "verified_token": {
            "description": "Send as `verified_token` with the application; single use.",
            "type": "string"
          }
        },
        "required": ["verified_token", "expires_in"],
        "type": "object"
      },
      "SiteApiSalaryRangeDto": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "max_minor": {
            "nullable": true,
            "type": "number"
          },
          "min_minor": {
            "nullable": true,
            "type": "number"
          },
          "unit": {
            "enum": ["MONTH", "YEAR", "HOUR"],
            "type": "string"
          }
        },
        "required": ["currency", "unit"],
        "type": "object"
      },
      "SiteApiSubscribeDto": {
        "properties": {
          "consent_ip": {
            "description": "The visitor's IP (the site's server forwards it).",
            "type": "string"
          },
          "consent_text": {
            "description": "The exact consent line the visitor agreed to.",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "group_id": {
            "description": "Marketing › Audience group id.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          }
        },
        "required": ["group_id", "consent_text"],
        "type": "object"
      },
      "SiteApiSubscriptionDto": {
        "properties": {
          "contact_id": {
            "description": "The Audience contact; absent when none matched (opt-out).",
            "type": "string"
          },
          "group_id": {
            "type": "string"
          },
          "subscribed": {
            "type": "boolean"
          }
        },
        "required": ["group_id", "subscribed"],
        "type": "object"
      },
      "SiteApiSupportDayDto": {
        "properties": {
          "closes": {
            "example": "19:00",
            "nullable": true,
            "type": "string"
          },
          "day": {
            "enum": ["sun", "mon", "tue", "wed", "thu", "fri", "sat"],
            "type": "string"
          },
          "opens": {
            "description": "Null: closed.",
            "example": "10:00",
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["day"],
        "type": "object"
      },
      "SiteApiSupportHoursDto": {
        "properties": {
          "days": {
            "items": {
              "$ref": "#/components/schemas/SiteApiSupportDayDto"
            },
            "type": "array"
          },
          "time_zone": {
            "example": "Asia/Kolkata",
            "type": "string"
          }
        },
        "required": ["time_zone", "days"],
        "type": "object"
      },
      "SiteApiTemplateDto": {
        "properties": {
          "body": {
            "type": "string"
          },
          "category": {
            "nullable": true,
            "type": "string"
          },
          "channel": {
            "enum": ["whatsapp", "email"],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "language": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "example": "approved",
            "type": "string"
          },
          "subject": {
            "nullable": true,
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": ["id", "channel", "name", "status", "body", "updated_at"],
        "type": "object"
      },
      "SiteApiUnsubscribeDto": {
        "properties": {
          "email": {
            "type": "string"
          },
          "group_id": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          }
        },
        "required": ["group_id"],
        "type": "object"
      },
      "SiteApiWorkspaceProfileDto": {
        "properties": {
          "address": {
            "$ref": "#/components/schemas/SiteApiAddressDto"
          },
          "brand_name": {
            "description": "Brand / trading name.",
            "nullable": true,
            "type": "string"
          },
          "cin": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "founded_year": {
            "description": "Not stored in RapBooster yet: always null (the site keeps its own).",
            "nullable": true,
            "type": "number"
          },
          "gstin": {
            "description": "GSTIN (India GST registrations only).",
            "nullable": true,
            "type": "string"
          },
          "legal_name": {
            "description": "Registered (legal) name.",
            "nullable": true,
            "type": "string"
          },
          "logo_url": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "socials": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Network → profile URL (brand kit).",
            "type": "object"
          },
          "support_hours": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SiteApiSupportHoursDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "tax_id": {
            "nullable": true,
            "type": "string"
          },
          "tax_id_label": {
            "example": "GSTIN",
            "nullable": true,
            "type": "string"
          },
          "website": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["address", "socials"],
        "type": "object"
      },
      "SocialAccountDto": {
        "properties": {
          "avatar_url": {
            "nullable": true,
            "type": "string"
          },
          "connected_at": {
            "format": "date-time",
            "type": "string"
          },
          "connected_by": {
            "nullable": true,
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "handle": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_sandbox": {
            "type": "boolean"
          },
          "last_error": {
            "nullable": true,
            "type": "string"
          },
          "last_post_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "network": {
            "enum": ["facebook", "instagram", "linkedin", "gbp", "whatsapp_status"],
            "type": "string"
          },
          "paused_by_plan": {
            "description": "Paused because the plan has fewer Social accounts.",
            "type": "boolean"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "enum": ["connected", "reconnect_needed", "disconnected"],
            "type": "string"
          },
          "token_expires_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "network",
          "external_id",
          "name",
          "status",
          "paused_by_plan",
          "scopes",
          "connected_at",
          "is_sandbox"
        ],
        "type": "object"
      },
      "SocialAccountsDto": {
        "properties": {
          "allowance": {
            "$ref": "#/components/schemas/SocialAllowanceDto"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SocialAccountDto"
            },
            "type": "array"
          }
        },
        "required": ["items", "allowance"],
        "type": "object"
      },
      "SocialAllowanceDto": {
        "properties": {
          "limit": {
            "description": "What the plan allows (5 per Social unit).",
            "type": "number"
          },
          "used": {
            "description": "Accounts counted now.",
            "type": "number"
          }
        },
        "required": ["used", "limit"],
        "type": "object"
      },
      "SocialMessageDto": {
        "properties": {
          "author_name": {
            "nullable": true,
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "direction": {
            "enum": ["in", "out"],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_hidden": {
            "type": "boolean"
          },
          "sent_at": {
            "format": "date-time",
            "type": "string"
          },
          "sent_by": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["id", "direction", "body", "is_hidden", "sent_at"],
        "type": "object"
      },
      "SocialPostDto": {
        "properties": {
          "approval_request_id": {
            "nullable": true,
            "type": "string"
          },
          "approved_by": {
            "nullable": true,
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "link_url": {
            "nullable": true,
            "type": "string"
          },
          "media_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "published_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "rappy_draft": {
            "nullable": true,
            "type": "string"
          },
          "rappy_prompt": {
            "nullable": true,
            "type": "string"
          },
          "rejection_note": {
            "description": "The approver's reason for sending it back.",
            "nullable": true,
            "type": "string"
          },
          "scheduled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "draft",
              "awaiting_approval",
              "scheduled",
              "publishing",
              "published",
              "partly_failed",
              "failed",
              "cancelled"
            ],
            "type": "string"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/SocialPostTargetDto"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "body",
          "status",
          "media_file_ids",
          "targets",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SocialPostInputDto": {
        "properties": {
          "body": {
            "maxLength": 63206,
            "type": "string"
          },
          "link_url": {
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "media_file_ids": {
            "description": "Uploaded file ids (Files, app `social`), in order.",
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "type": "array"
          },
          "rappy_draft": {
            "description": "SUG-25: what Rappy wrote, before the member's edit.",
            "maxLength": 63206,
            "nullable": true,
            "type": "string"
          },
          "rappy_prompt": {
            "description": "SUG-25: what Rappy was asked.",
            "maxLength": 2000,
            "nullable": true,
            "type": "string"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/SocialPostTargetInputDto"
            },
            "maxItems": 50,
            "type": "array"
          }
        },
        "type": "object"
      },
      "SocialPostTargetDto": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "attempts": {
            "type": "number"
          },
          "body_override": {
            "nullable": true,
            "type": "string"
          },
          "error": {
            "description": "Why it failed (last attempt).",
            "nullable": true,
            "type": "string"
          },
          "external_url": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "network": {
            "enum": ["facebook", "instagram", "linkedin", "gbp", "whatsapp_status"],
            "type": "string"
          },
          "options": {
            "$ref": "#/components/schemas/SocialTargetOptionsDto"
          },
          "published_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": ["draft", "scheduled", "publishing", "published", "failed", "cancelled"],
            "type": "string"
          }
        },
        "required": [
          "id",
          "account_id",
          "network",
          "account_name",
          "options",
          "status",
          "attempts"
        ],
        "type": "object"
      },
      "SocialPostTargetInputDto": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "body_override": {
            "description": "This account's own text; null = the post's.",
            "maxLength": 63206,
            "nullable": true,
            "type": "string"
          },
          "options": {
            "$ref": "#/components/schemas/SocialTargetOptionsDto"
          }
        },
        "required": ["account_id"],
        "type": "object"
      },
      "SocialScheduleDto": {
        "properties": {
          "at": {
            "description": "Required with `mode: at`.",
            "format": "date-time",
            "type": "string"
          },
          "mode": {
            "description": "`at` a time, the next free `queue` slot, or `now`.",
            "enum": ["at", "queue", "now"],
            "type": "string"
          }
        },
        "required": ["mode"],
        "type": "object"
      },
      "SocialScheduleResultDto": {
        "properties": {
          "approval_request_id": {
            "nullable": true,
            "type": "string"
          },
          "approved_by": {
            "nullable": true,
            "type": "string"
          },
          "awaiting_approval": {
            "description": "Sent for approval rather than scheduled.",
            "type": "boolean"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "link_url": {
            "nullable": true,
            "type": "string"
          },
          "media_file_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "published_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "rappy_draft": {
            "nullable": true,
            "type": "string"
          },
          "rappy_prompt": {
            "nullable": true,
            "type": "string"
          },
          "rejection_note": {
            "description": "The approver's reason for sending it back.",
            "nullable": true,
            "type": "string"
          },
          "scheduled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "draft",
              "awaiting_approval",
              "scheduled",
              "publishing",
              "published",
              "partly_failed",
              "failed",
              "cancelled"
            ],
            "type": "string"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/SocialPostTargetDto"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "body",
          "status",
          "media_file_ids",
          "targets",
          "created_at",
          "updated_at",
          "awaiting_approval"
        ],
        "type": "object"
      },
      "SocialTargetOptionsDto": {
        "properties": {
          "first_comment": {
            "description": "Posted as the first comment (Facebook, Instagram, LinkedIn).",
            "maxLength": 2000,
            "type": "string"
          },
          "gbp_coupon_code": {
            "maxLength": 58,
            "type": "string"
          },
          "gbp_cta_type": {
            "enum": ["book", "order", "shop", "learn_more", "sign_up", "call"],
            "type": "string"
          },
          "gbp_cta_url": {
            "maxLength": 2000,
            "type": "string"
          },
          "gbp_end": {
            "description": "Event / offer end (GBP).",
            "format": "date",
            "type": "string"
          },
          "gbp_start": {
            "description": "Event / offer start (GBP).",
            "format": "date",
            "type": "string"
          },
          "gbp_title": {
            "description": "Event or offer title (GBP).",
            "maxLength": 58,
            "type": "string"
          },
          "gbp_type": {
            "enum": ["standard", "event", "offer"],
            "type": "string"
          },
          "ig_format": {
            "description": "Instagram: feed (a carousel with several media), reel or story.",
            "enum": ["feed", "reel", "story"],
            "type": "string"
          }
        },
        "type": "object"
      },
      "SocialThreadDetailDto": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/SocialMessageDto"
            },
            "type": "array"
          },
          "thread": {
            "$ref": "#/components/schemas/SocialThreadDto"
          }
        },
        "required": ["thread", "messages"],
        "type": "object"
      },
      "SocialThreadDto": {
        "properties": {
          "account_id": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "assigned_to": {
            "nullable": true,
            "type": "string"
          },
          "author_handle": {
            "nullable": true,
            "type": "string"
          },
          "author_name": {
            "nullable": true,
            "type": "string"
          },
          "can_hide": {
            "type": "boolean"
          },
          "can_reply": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": ["comment", "dm", "review"],
            "type": "string"
          },
          "last_direction": {
            "enum": ["in", "out"],
            "nullable": true,
            "type": "string"
          },
          "last_inbound_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_message_at": {
            "format": "date-time",
            "type": "string"
          },
          "lead_id": {
            "nullable": true,
            "type": "string"
          },
          "network": {
            "enum": ["facebook", "instagram", "linkedin", "gbp", "whatsapp_status"],
            "type": "string"
          },
          "post_target_id": {
            "nullable": true,
            "type": "string"
          },
          "rating": {
            "description": "Reviews: 1–5 stars.",
            "nullable": true,
            "type": "number"
          },
          "reply_blocked_reason": {
            "enum": ["window_closed", "account_unavailable"],
            "nullable": true,
            "type": "string"
          },
          "snippet": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": ["open", "done", "hidden"],
            "type": "string"
          },
          "unread_count": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "account_id",
          "network",
          "account_name",
          "kind",
          "status",
          "unread_count",
          "last_message_at",
          "can_reply",
          "can_hide"
        ],
        "type": "object"
      },
      "StoreApiAddressDto": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "gstin": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "label": {
            "nullable": true,
            "type": "string"
          },
          "landmark": {
            "nullable": true,
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "state_code": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "line1",
          "city",
          "state",
          "postal_code",
          "country_code",
          "is_default"
        ],
        "type": "object"
      },
      "StoreApiAddressInputDto": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country_code": {
            "default": "IN",
            "type": "string"
          },
          "gstin": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "label": {
            "example": "Home",
            "type": "string"
          },
          "landmark": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "postal_code": {
            "example": "334001",
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "state_code": {
            "example": "08",
            "type": "string"
          }
        },
        "required": ["name", "line1", "city", "state", "postal_code"],
        "type": "object"
      },
      "StoreApiAddressUpdateDto": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "gstin": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "label": {
            "type": "string"
          },
          "landmark": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "state_code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiAppleSignInDto": {
        "properties": {
          "id_token": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          }
        },
        "required": ["id_token"],
        "type": "object"
      },
      "StoreApiBuyerDto": {
        "properties": {
          "consents": {
            "$ref": "#/components/schemas/StoreApiConsentsDto"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "groups": {
            "example": ["patron"],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "sign_in": {
            "$ref": "#/components/schemas/StoreApiSignInMethodsDto"
          },
          "trade": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiBuyerTradeDto"
              }
            ],
            "nullable": true,
            "type": "object"
          }
        },
        "required": ["id", "consents", "groups", "sign_in", "created_at"],
        "type": "object"
      },
      "StoreApiBuyerGroupsDto": {
        "properties": {
          "groups": {
            "example": ["patron"],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": ["groups"],
        "type": "object"
      },
      "StoreApiBuyerSessionDto": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "buyer": {
            "$ref": "#/components/schemas/StoreApiBuyerDto"
          },
          "expires_in": {
            "description": "Seconds (15 min).",
            "type": "number"
          },
          "is_new": {
            "type": "boolean"
          },
          "refresh_expires_in": {
            "description": "Seconds (30 days).",
            "type": "number"
          },
          "refresh_token": {
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "expires_in",
          "refresh_token",
          "refresh_expires_in",
          "buyer",
          "is_new"
        ],
        "type": "object"
      },
      "StoreApiBuyerTradeDto": {
        "properties": {
          "status": {
            "enum": ["applied", "approved", "rejected", "suspended"],
            "type": "string"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["status"],
        "type": "object"
      },
      "StoreApiBuyerUpdateDto": {
        "properties": {
          "consents": {
            "$ref": "#/components/schemas/StoreApiConsentInputDto"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiCartCreateDto": {
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiCartLineInputDto"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "StoreApiCartDeliveryDto": {
        "properties": {
          "address_id": {
            "type": "string"
          },
          "pincode": {
            "example": "334001",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiCartDto": {
        "properties": {
          "coupon_code": {
            "nullable": true,
            "type": "string"
          },
          "coupon_error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiCouponErrorDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "currency": {
            "type": "string"
          },
          "delivery": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiDeliveryInfoDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/StoreApiDiscountDto"
            },
            "type": "array"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "free_delivery_gap_minor": {
            "description": "How much more to add for free delivery.",
            "nullable": true,
            "type": "number"
          },
          "gift": {
            "$ref": "#/components/schemas/StoreApiGiftDto"
          },
          "id": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiCartLineDto"
            },
            "type": "array"
          },
          "pincode": {
            "nullable": true,
            "type": "string"
          },
          "problems": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "ready": {
            "description": "True when checkout may start.",
            "type": "boolean"
          },
          "shipping_minor": {
            "type": "number"
          },
          "subtotal_minor": {
            "type": "number"
          },
          "tax_minor": {
            "type": "number"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "lines",
          "subtotal_minor",
          "discounts",
          "shipping_minor",
          "tax_minor",
          "total_minor",
          "currency",
          "gift",
          "ready",
          "problems",
          "expires_at"
        ],
        "type": "object"
      },
      "StoreApiCartGiftDto": {
        "properties": {
          "is_gift": {
            "type": "boolean"
          },
          "message": {
            "maxLength": 300,
            "type": "string"
          }
        },
        "required": ["is_gift"],
        "type": "object"
      },
      "StoreApiCartLineDto": {
        "properties": {
          "image_url": {
            "nullable": true,
            "type": "string"
          },
          "line_total_minor": {
            "type": "number"
          },
          "mrp_minor": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "price_id": {
            "type": "string"
          },
          "problem": {
            "description": "`out_of_stock`, `price_changed`, `moq_not_met`, `unavailable`.",
            "nullable": true,
            "type": "string"
          },
          "product_slug": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "stock_state": {
            "enum": ["in_stock", "low", "out"],
            "type": "string"
          },
          "unit_price_minor": {
            "type": "number"
          },
          "variant_name": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "price_id",
          "product_slug",
          "name",
          "qty",
          "unit_price_minor",
          "line_total_minor",
          "stock_state"
        ],
        "type": "object"
      },
      "StoreApiCartLineInputDto": {
        "properties": {
          "price_id": {
            "type": "string"
          },
          "qty": {
            "maximum": 999,
            "minimum": 1,
            "type": "number"
          }
        },
        "required": ["price_id", "qty"],
        "type": "object"
      },
      "StoreApiCartLinesDto": {
        "properties": {
          "lines": {
            "description": "Replaces every line.",
            "items": {
              "$ref": "#/components/schemas/StoreApiCartLineInputDto"
            },
            "type": "array"
          }
        },
        "required": ["lines"],
        "type": "object"
      },
      "StoreApiCategoryDto": {
        "properties": {
          "id": {
            "type": "string"
          },
          "image_url": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "nullable": true,
            "type": "string"
          },
          "product_count": {
            "type": "number"
          },
          "slug": {
            "type": "string"
          }
        },
        "required": ["id", "slug", "name", "product_count"],
        "type": "object"
      },
      "StoreApiCheckoutConfigDto": {
        "properties": {
          "auth_methods": {
            "example": ["phone_otp", "google"],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "captcha_required": {
            "type": "boolean"
          },
          "google_client_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "payment_methods": {
            "example": ["razorpay"],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "razorpay_key_id": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["payment_methods", "auth_methods", "captcha_required", "google_client_ids"],
        "type": "object"
      },
      "StoreApiCheckoutConsentDto": {
        "properties": {
          "terms": {
            "enum": [true],
            "type": "boolean"
          }
        },
        "required": ["terms"],
        "type": "object"
      },
      "StoreApiCheckoutDto": {
        "properties": {
          "address_id": {
            "type": "string"
          },
          "bill_address_id": {
            "type": "string"
          },
          "cart_id": {
            "type": "string"
          },
          "channel": {
            "enum": ["web", "app"],
            "type": "string"
          },
          "consent": {
            "$ref": "#/components/schemas/StoreApiCheckoutConsentDto"
          },
          "gstin": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "At most 20 string keys, 1 KB; echoed in the order webhooks.",
            "type": "object"
          },
          "payment_method": {
            "enum": ["razorpay", "credit"],
            "type": "string"
          }
        },
        "required": ["cart_id", "address_id", "payment_method", "channel", "consent"],
        "type": "object"
      },
      "StoreApiCheckoutResultDto": {
        "properties": {
          "credit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiCreditTermsDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "currency": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "payment_method": {
            "enum": ["razorpay", "credit"],
            "type": "string"
          },
          "razorpay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiRazorpayOrderDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "status": {
            "enum": [
              "awaiting_payment",
              "paid",
              "packed",
              "shipped",
              "delivered",
              "cancelled",
              "refunded",
              "partially_refunded"
            ],
            "type": "string"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": ["order_number", "status", "total_minor", "currency", "payment_method"],
        "type": "object"
      },
      "StoreApiClaimCreateDto": {
        "properties": {
          "kind": {
            "enum": ["damaged", "wrong_item", "missing"],
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiCartLineInputDto"
            },
            "type": "array"
          },
          "note": {
            "maxLength": 1000,
            "type": "string"
          },
          "upload_ids": {
            "description": "`upload_id`s (purpose `claim`): a photo is required.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": ["kind", "lines", "upload_ids"],
        "type": "object"
      },
      "StoreApiClaimDto": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": ["damaged", "wrong_item", "missing"],
            "type": "string"
          },
          "note": {
            "nullable": true,
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "photo_urls": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "refund_minor": {
            "nullable": true,
            "type": "number"
          },
          "resolved_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": ["open", "replaced", "refunded", "rejected"],
            "type": "string"
          }
        },
        "required": ["id", "order_number", "kind", "status", "photo_urls", "created_at"],
        "type": "object"
      },
      "StoreApiComponentDto": {
        "properties": {
          "name": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          }
        },
        "required": ["name", "qty"],
        "type": "object"
      },
      "StoreApiConsentInputDto": {
        "properties": {
          "offers_email": {
            "type": "boolean"
          },
          "offers_push": {
            "type": "boolean"
          },
          "offers_whatsapp": {
            "type": "boolean"
          },
          "order_whatsapp": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "StoreApiConsentStateDto": {
        "properties": {
          "at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "on": {
            "type": "boolean"
          }
        },
        "required": ["on"],
        "type": "object"
      },
      "StoreApiConsentsDto": {
        "properties": {
          "offers_email": {
            "$ref": "#/components/schemas/StoreApiConsentStateDto"
          },
          "offers_push": {
            "$ref": "#/components/schemas/StoreApiConsentStateDto"
          },
          "offers_whatsapp": {
            "$ref": "#/components/schemas/StoreApiConsentStateDto"
          },
          "order_whatsapp": {
            "$ref": "#/components/schemas/StoreApiConsentStateDto"
          }
        },
        "required": ["order_whatsapp", "offers_whatsapp", "offers_email", "offers_push"],
        "type": "object"
      },
      "StoreApiCouponDto": {
        "properties": {
          "code": {
            "example": "NAMKEEN10",
            "type": "string"
          }
        },
        "required": ["code"],
        "type": "object"
      },
      "StoreApiCouponErrorDto": {
        "properties": {
          "code": {
            "example": "COUPON_INVALID",
            "type": "string"
          },
          "reason": {
            "enum": ["expired", "min_order", "not_eligible", "used", "unknown"],
            "type": "string"
          }
        },
        "required": ["code", "reason"],
        "type": "object"
      },
      "StoreApiCreditTermsDto": {
        "properties": {
          "due_on": {
            "description": "YYYY-MM-DD",
            "type": "string"
          }
        },
        "required": ["due_on"],
        "type": "object"
      },
      "StoreApiDeliveryInfoDto": {
        "properties": {
          "eta_from": {
            "nullable": true,
            "type": "string"
          },
          "eta_to": {
            "nullable": true,
            "type": "string"
          },
          "serviceable": {
            "type": "boolean"
          }
        },
        "required": ["serviceable"],
        "type": "object"
      },
      "StoreApiDeviceDto": {
        "properties": {
          "expo_push_token": {
            "type": "string"
          },
          "offers_opt_in": {
            "type": "boolean"
          },
          "platform": {
            "enum": ["ios", "android", "web"],
            "type": "string"
          }
        },
        "required": ["expo_push_token", "platform", "offers_opt_in"],
        "type": "object"
      },
      "StoreApiDiscountDto": {
        "properties": {
          "amount_minor": {
            "type": "number"
          },
          "code": {
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "enum": ["percent", "flat", "free_shipping", "bxgy", "tiered"],
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "offer_id": {
            "type": "string"
          }
        },
        "required": ["offer_id", "label", "kind", "amount_minor"],
        "type": "object"
      },
      "StoreApiFoodInfoDto": {
        "properties": {
          "allergens": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "fssai_licence": {
            "nullable": true,
            "type": "string"
          },
          "ingredients": {
            "nullable": true,
            "type": "string"
          },
          "label_note": {
            "nullable": true,
            "type": "string"
          },
          "maker": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiMakerDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "may_contain": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "nutrition_per100g": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiNutritionDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "origin_country": {
            "example": "IN",
            "nullable": true,
            "type": "string"
          },
          "shelf_life_days": {
            "nullable": true,
            "type": "number"
          },
          "storage": {
            "nullable": true,
            "type": "string"
          },
          "veg": {
            "type": "boolean"
          }
        },
        "required": ["veg", "allergens", "may_contain"],
        "type": "object"
      },
      "StoreApiGiftDto": {
        "properties": {
          "is_gift": {
            "type": "boolean"
          },
          "message": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["is_gift"],
        "type": "object"
      },
      "StoreApiGoogleSignInDto": {
        "properties": {
          "id_token": {
            "type": "string"
          }
        },
        "required": ["id_token"],
        "type": "object"
      },
      "StoreApiGrievanceOfficerDto": {
        "properties": {
          "email": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiInfoDto": {
        "properties": {
          "accent": {
            "example": "#C2410C",
            "nullable": true,
            "type": "string"
          },
          "checkout": {
            "$ref": "#/components/schemas/StoreApiCheckoutConfigDto"
          },
          "currency": {
            "example": "INR",
            "type": "string"
          },
          "legal": {
            "$ref": "#/components/schemas/StoreApiLegalDto"
          },
          "logo_url": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "policies": {
            "items": {
              "$ref": "#/components/schemas/StoreApiPolicyRefDto"
            },
            "type": "array"
          },
          "shipping": {
            "$ref": "#/components/schemas/StoreApiShippingConfigDto"
          },
          "slug": {
            "type": "string"
          },
          "support": {
            "$ref": "#/components/schemas/StoreApiSupportDto"
          },
          "tagline": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug",
          "currency",
          "legal",
          "support",
          "checkout",
          "shipping",
          "policies"
        ],
        "type": "object"
      },
      "StoreApiInvoiceLinkDto": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "url": {
            "description": "Signed, 10 minutes.",
            "type": "string"
          }
        },
        "required": ["number", "url", "expires_at"],
        "type": "object"
      },
      "StoreApiInvoiceRefDto": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "number": {
            "type": "string"
          }
        },
        "required": ["number", "available"],
        "type": "object"
      },
      "StoreApiLedgerEntryDto": {
        "properties": {
          "balance_minor": {
            "type": "number"
          },
          "credit_minor": {
            "type": "number"
          },
          "date": {
            "description": "YYYY-MM-DD",
            "type": "string"
          },
          "debit_minor": {
            "type": "number"
          },
          "due_on": {
            "nullable": true,
            "type": "string"
          },
          "kind": {
            "enum": ["invoice", "payment", "credit_note"],
            "type": "string"
          },
          "number": {
            "type": "string"
          }
        },
        "required": ["date", "kind", "number", "debit_minor", "credit_minor", "balance_minor"],
        "type": "object"
      },
      "StoreApiLegalDto": {
        "properties": {
          "address": {
            "nullable": true,
            "type": "string"
          },
          "fssai_licence": {
            "description": "FSSAI licence (food sellers).",
            "nullable": true,
            "type": "string"
          },
          "grievance_officer": {
            "$ref": "#/components/schemas/StoreApiGrievanceOfficerDto"
          },
          "gstin": {
            "nullable": true,
            "type": "string"
          },
          "seller_name": {
            "type": "string"
          }
        },
        "required": ["seller_name", "grievance_officer"],
        "type": "object"
      },
      "StoreApiMakerDto": {
        "properties": {
          "address": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["name"],
        "type": "object"
      },
      "StoreApiNutritionDto": {
        "properties": {
          "added_sugar_g": {
            "nullable": true,
            "type": "number"
          },
          "carbs_g": {
            "nullable": true,
            "type": "number"
          },
          "energy_kcal": {
            "nullable": true,
            "type": "number"
          },
          "fat_g": {
            "nullable": true,
            "type": "number"
          },
          "protein_g": {
            "nullable": true,
            "type": "number"
          },
          "sat_fat_g": {
            "nullable": true,
            "type": "number"
          },
          "sodium_mg": {
            "nullable": true,
            "type": "number"
          },
          "sugar_g": {
            "nullable": true,
            "type": "number"
          },
          "trans_fat_g": {
            "nullable": true,
            "type": "number"
          }
        },
        "type": "object"
      },
      "StoreApiOrderAddressDto": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "required": ["name", "line1", "city", "state", "postal_code", "country_code"],
        "type": "object"
      },
      "StoreApiOrderDto": {
        "properties": {
          "bill_address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiOrderAddressDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "can_reorder": {
            "type": "boolean"
          },
          "can_review": {
            "description": "Product ids the buyer may review.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "claim_window_ends_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "claims": {
            "items": {
              "$ref": "#/components/schemas/StoreApiClaimDto"
            },
            "type": "array"
          },
          "currency": {
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/StoreApiDiscountDto"
            },
            "type": "array"
          },
          "gift": {
            "$ref": "#/components/schemas/StoreApiGiftDto"
          },
          "gstin": {
            "nullable": true,
            "type": "string"
          },
          "invoice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiInvoiceRefDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiOrderLineDto"
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true,
            "type": "object"
          },
          "number": {
            "type": "string"
          },
          "paid_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "payment": {
            "$ref": "#/components/schemas/StoreApiOrderPaymentDto"
          },
          "placed_at": {
            "format": "date-time",
            "type": "string"
          },
          "ship_address": {
            "$ref": "#/components/schemas/StoreApiOrderAddressDto"
          },
          "shipments": {
            "items": {
              "$ref": "#/components/schemas/StoreApiShipmentDto"
            },
            "type": "array"
          },
          "shipping_minor": {
            "type": "number"
          },
          "status": {
            "enum": [
              "awaiting_payment",
              "paid",
              "packed",
              "shipped",
              "delivered",
              "cancelled",
              "refunded",
              "partially_refunded"
            ],
            "type": "string"
          },
          "subtotal_minor": {
            "type": "number"
          },
          "tax_lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiTaxLineDto"
            },
            "type": "array"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": [
          "number",
          "status",
          "placed_at",
          "lines",
          "subtotal_minor",
          "discounts",
          "shipping_minor",
          "tax_lines",
          "total_minor",
          "currency",
          "payment",
          "gift",
          "ship_address",
          "shipments",
          "claims",
          "can_reorder",
          "can_review"
        ],
        "type": "object"
      },
      "StoreApiOrderLineDto": {
        "properties": {
          "image_url": {
            "nullable": true,
            "type": "string"
          },
          "line_total_minor": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "price_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "product_slug": {
            "nullable": true,
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "unit_price_minor": {
            "type": "number"
          },
          "variant_name": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "price_id",
          "product_id",
          "name",
          "qty",
          "unit_price_minor",
          "line_total_minor"
        ],
        "type": "object"
      },
      "StoreApiOrderPaymentDto": {
        "properties": {
          "due_on": {
            "nullable": true,
            "type": "string"
          },
          "method": {
            "enum": ["razorpay", "credit"],
            "type": "string"
          },
          "status": {
            "enum": ["pending", "paid", "refunded", "partially_refunded", "due"],
            "type": "string"
          }
        },
        "required": ["method", "status"],
        "type": "object"
      },
      "StoreApiOrderSummaryDto": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "first_image_url": {
            "nullable": true,
            "type": "string"
          },
          "item_count": {
            "type": "number"
          },
          "number": {
            "type": "string"
          },
          "placed_at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "awaiting_payment",
              "paid",
              "packed",
              "shipped",
              "delivered",
              "cancelled",
              "refunded",
              "partially_refunded"
            ],
            "type": "string"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": ["number", "status", "placed_at", "total_minor", "currency", "item_count"],
        "type": "object"
      },
      "StoreApiOtpRequestDto": {
        "properties": {
          "captcha_token": {
            "description": "reCAPTCHA token when the store requires it.",
            "type": "string"
          },
          "phone": {
            "example": "+919876543210",
            "type": "string"
          }
        },
        "required": ["phone"],
        "type": "object"
      },
      "StoreApiOtpRequestedDto": {
        "properties": {
          "expires_in": {
            "description": "Seconds.",
            "type": "number"
          },
          "request_id": {
            "type": "string"
          },
          "resend_in": {
            "description": "Seconds before a resend is allowed.",
            "type": "number"
          }
        },
        "required": ["request_id", "expires_in", "resend_in"],
        "type": "object"
      },
      "StoreApiOtpVerifyDto": {
        "properties": {
          "code": {
            "type": "string"
          },
          "marketing_consent": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "terms_accepted": {
            "enum": [true],
            "type": "boolean"
          }
        },
        "required": ["request_id", "phone", "code", "terms_accepted"],
        "type": "object"
      },
      "StoreApiPaymentConfirmDto": {
        "properties": {
          "razorpay_order_id": {
            "type": "string"
          },
          "razorpay_payment_id": {
            "type": "string"
          },
          "razorpay_signature": {
            "type": "string"
          }
        },
        "required": ["razorpay_order_id", "razorpay_payment_id", "razorpay_signature"],
        "type": "object"
      },
      "StoreApiPolicyDto": {
        "properties": {
          "html": {
            "type": "string"
          },
          "kind": {
            "enum": ["refund", "shipping", "terms", "privacy", "returns"],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["kind", "title", "html"],
        "type": "object"
      },
      "StoreApiPolicyRefDto": {
        "properties": {
          "kind": {
            "enum": ["refund", "shipping", "terms", "privacy", "returns"],
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": ["kind", "title"],
        "type": "object"
      },
      "StoreApiProductDto": {
        "properties": {
          "category_slugs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/StoreApiComponentDto"
            },
            "type": "array"
          },
          "currency": {
            "example": "INR",
            "type": "string"
          },
          "description_html": {
            "type": "string"
          },
          "food": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiFoodInfoDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "from_price_minor": {
            "example": 19900,
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "nullable": true,
            "type": "string"
          },
          "image_urls": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "is_featured": {
            "type": "boolean"
          },
          "kind": {
            "enum": ["product", "combo"],
            "type": "string"
          },
          "mrp_minor": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "rating": {
            "$ref": "#/components/schemas/StoreApiRatingDto"
          },
          "related": {
            "items": {
              "$ref": "#/components/schemas/StoreApiProductSummaryDto"
            },
            "type": "array"
          },
          "requires_shipping": {
            "type": "boolean"
          },
          "seo": {
            "$ref": "#/components/schemas/StoreApiSeoDto"
          },
          "short_description": {
            "nullable": true,
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "stock_state": {
            "enum": ["in_stock", "low", "out"],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/StoreApiVariantDto"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "category_slugs",
          "from_price_minor",
          "currency",
          "stock_state",
          "is_featured",
          "kind",
          "requires_shipping",
          "rating",
          "updated_at",
          "description_html",
          "image_urls",
          "variants",
          "components",
          "seo",
          "related"
        ],
        "type": "object"
      },
      "StoreApiProductSummaryDto": {
        "properties": {
          "category_slugs": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "currency": {
            "example": "INR",
            "type": "string"
          },
          "from_price_minor": {
            "example": 19900,
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "nullable": true,
            "type": "string"
          },
          "is_featured": {
            "type": "boolean"
          },
          "kind": {
            "enum": ["product", "combo"],
            "type": "string"
          },
          "mrp_minor": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "rating": {
            "$ref": "#/components/schemas/StoreApiRatingDto"
          },
          "requires_shipping": {
            "type": "boolean"
          },
          "short_description": {
            "nullable": true,
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "stock_state": {
            "enum": ["in_stock", "low", "out"],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "category_slugs",
          "from_price_minor",
          "currency",
          "stock_state",
          "is_featured",
          "kind",
          "requires_shipping",
          "rating",
          "updated_at"
        ],
        "type": "object"
      },
      "StoreApiRatingDto": {
        "properties": {
          "avg": {
            "example": 4.6,
            "type": "number"
          },
          "count": {
            "example": 128,
            "type": "number"
          }
        },
        "required": ["avg", "count"],
        "type": "object"
      },
      "StoreApiRatingSummaryDto": {
        "properties": {
          "avg": {
            "description": "Average of the published ratings, one decimal; 0 with none.",
            "type": "number"
          },
          "by_star": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Published reviews per star, keys `1`..`5`.",
            "example": {
              "1": 0,
              "2": 0,
              "3": 1,
              "4": 3,
              "5": 8
            },
            "type": "object"
          },
          "count": {
            "type": "number"
          }
        },
        "required": ["avg", "count", "by_star"],
        "type": "object"
      },
      "StoreApiRazorpayOrderDto": {
        "properties": {
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "key_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "prefill": {
            "$ref": "#/components/schemas/StoreApiRazorpayPrefillDto"
          }
        },
        "required": ["key_id", "order_id", "amount", "currency", "name", "description", "prefill"],
        "type": "object"
      },
      "StoreApiRazorpayPrefillDto": {
        "properties": {
          "contact": {
            "nullable": true,
            "type": "string"
          },
          "email": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiRazorpaySubscriptionDto": {
        "properties": {
          "key_id": {
            "type": "string"
          },
          "subscription_id": {
            "type": "string"
          }
        },
        "required": ["key_id", "subscription_id"],
        "type": "object"
      },
      "StoreApiRefreshDto": {
        "properties": {
          "refresh_token": {
            "type": "string"
          }
        },
        "required": ["refresh_token"],
        "type": "object"
      },
      "StoreApiReviewCreateDto": {
        "properties": {
          "body": {
            "maxLength": 2000,
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "rating": {
            "maximum": 5,
            "minimum": 1,
            "type": "number"
          },
          "title": {
            "maxLength": 120,
            "type": "string"
          },
          "upload_ids": {
            "description": "`upload_id`s from `POST me/uploads` (purpose `review`).",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": ["order_number", "product_id", "rating"],
        "type": "object"
      },
      "StoreApiReviewDto": {
        "properties": {
          "author_name": {
            "description": "First name and initial.",
            "type": "string"
          },
          "body": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "photo_urls": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "product_id": {
            "type": "string"
          },
          "rating": {
            "maximum": 5,
            "minimum": 1,
            "type": "number"
          },
          "reply": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": ["pending", "published", "rejected"],
            "type": "string"
          },
          "title": {
            "nullable": true,
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "product_id",
          "rating",
          "photo_urls",
          "author_name",
          "verified",
          "status",
          "created_at"
        ],
        "type": "object"
      },
      "StoreApiReviewPageMetaDto": {
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "has_previous_page": {
            "type": "boolean"
          },
          "limit": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "summary": {
            "$ref": "#/components/schemas/StoreApiRatingSummaryDto"
          },
          "total_items": {
            "type": "number"
          },
          "total_pages": {
            "type": "number"
          }
        },
        "required": [
          "page",
          "limit",
          "total_items",
          "total_pages",
          "has_next_page",
          "has_previous_page",
          "summary"
        ],
        "type": "object"
      },
      "StoreApiSeoDto": {
        "properties": {
          "canonical_path": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": ["title", "description", "canonical_path"],
        "type": "object"
      },
      "StoreApiShipmentDto": {
        "properties": {
          "awb": {
            "nullable": true,
            "type": "string"
          },
          "courier": {
            "nullable": true,
            "type": "string"
          },
          "eta_on": {
            "nullable": true,
            "type": "string"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/StoreApiShipmentEventDto"
            },
            "type": "array"
          },
          "status": {
            "type": "string"
          },
          "tracking_url": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["status", "events"],
        "type": "object"
      },
      "StoreApiShipmentEventDto": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "location": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": ["status", "at"],
        "type": "object"
      },
      "StoreApiShippingConfigDto": {
        "properties": {
          "fee_minor": {
            "example": 4900,
            "type": "number"
          },
          "free_above_minor": {
            "example": 59900,
            "nullable": true,
            "type": "number"
          }
        },
        "required": ["fee_minor"],
        "type": "object"
      },
      "StoreApiShippingQuoteDto": {
        "properties": {
          "courier": {
            "nullable": true,
            "type": "string"
          },
          "eta_from": {
            "description": "YYYY-MM-DD",
            "nullable": true,
            "type": "string"
          },
          "eta_to": {
            "description": "YYYY-MM-DD",
            "nullable": true,
            "type": "string"
          },
          "fee_minor": {
            "type": "number"
          },
          "free_above_minor": {
            "nullable": true,
            "type": "number"
          },
          "pincode": {
            "type": "string"
          },
          "serviceable": {
            "type": "boolean"
          }
        },
        "required": ["pincode", "serviceable", "fee_minor"],
        "type": "object"
      },
      "StoreApiSignInMethodsDto": {
        "properties": {
          "apple": {
            "type": "boolean"
          },
          "google": {
            "type": "boolean"
          },
          "phone": {
            "type": "boolean"
          }
        },
        "required": ["phone", "google", "apple"],
        "type": "object"
      },
      "StoreApiSubscriptionCreateDto": {
        "properties": {
          "address_id": {
            "type": "string"
          },
          "interval": {
            "description": "Box subscriptions.",
            "enum": ["monthly", "bimonthly", "yearly"],
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiCartLineInputDto"
            },
            "type": "array"
          },
          "plan_code": {
            "description": "Plan subscriptions: a `code` from `GET subscription-plans`.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiSubscriptionDto": {
        "properties": {
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiAddressDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "discount_pct": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "interval": {
            "enum": ["monthly", "bimonthly", "yearly"],
            "type": "string"
          },
          "kind": {
            "enum": ["box", "plan"],
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiOrderLineDto"
            },
            "type": "array"
          },
          "next_charge_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "plan_code": {
            "nullable": true,
            "type": "string"
          },
          "razorpay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreApiRazorpaySubscriptionDto"
              }
            ],
            "description": "On create.",
            "nullable": true,
            "type": "object"
          },
          "skip_next": {
            "type": "boolean"
          },
          "status": {
            "enum": ["created", "active", "paused", "cancelled", "halted"],
            "type": "string"
          },
          "total_minor": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "kind",
          "interval",
          "status",
          "lines",
          "discount_pct",
          "skip_next",
          "total_minor"
        ],
        "type": "object"
      },
      "StoreApiSubscriptionPlanDto": {
        "properties": {
          "code": {
            "type": "string"
          },
          "discount_pct": {
            "type": "number"
          },
          "interval": {
            "enum": ["monthly", "bimonthly", "yearly"],
            "type": "string"
          },
          "kind": {
            "enum": ["box", "plan"],
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "price_minor": {
            "nullable": true,
            "type": "number"
          }
        },
        "required": ["kind", "code", "interval", "discount_pct", "label"],
        "type": "object"
      },
      "StoreApiSubscriptionUpdateDto": {
        "properties": {
          "address_id": {
            "type": "string"
          },
          "interval": {
            "enum": ["monthly", "bimonthly", "yearly"],
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreApiCartLineInputDto"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "StoreApiSupportDto": {
        "properties": {
          "email": {
            "nullable": true,
            "type": "string"
          },
          "hours": {
            "example": "Mon–Sat 10:00–19:00 IST",
            "nullable": true,
            "type": "string"
          },
          "phone": {
            "nullable": true,
            "type": "string"
          },
          "whatsapp": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreApiTaxLineDto": {
        "properties": {
          "cgst_minor": {
            "type": "number"
          },
          "igst_minor": {
            "type": "number"
          },
          "rate": {
            "type": "number"
          },
          "sgst_minor": {
            "type": "number"
          },
          "taxable_minor": {
            "type": "number"
          }
        },
        "required": ["rate", "taxable_minor", "cgst_minor", "sgst_minor", "igst_minor"],
        "type": "object"
      },
      "StoreApiTradeAccountDto": {
        "properties": {
          "available_credit_minor": {
            "type": "number"
          },
          "business_name": {
            "type": "string"
          },
          "credit_days": {
            "type": "number"
          },
          "credit_limit_minor": {
            "type": "number"
          },
          "gstin": {
            "type": "string"
          },
          "outstanding_minor": {
            "type": "number"
          },
          "status": {
            "enum": ["applied", "approved", "rejected", "suspended"],
            "type": "string"
          },
          "tier": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "status",
          "business_name",
          "gstin",
          "credit_limit_minor",
          "credit_days",
          "outstanding_minor",
          "available_credit_minor"
        ],
        "type": "object"
      },
      "StoreApiTradeApplyDto": {
        "properties": {
          "address_id": {
            "type": "string"
          },
          "business_name": {
            "type": "string"
          },
          "business_type": {
            "example": "retailer",
            "type": "string"
          },
          "gstin": {
            "type": "string"
          }
        },
        "required": ["business_name", "gstin", "business_type", "address_id"],
        "type": "object"
      },
      "StoreApiUploadDto": {
        "properties": {
          "upload_id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": ["upload_id", "url"],
        "type": "object"
      },
      "StoreApiUploadFormDto": {
        "properties": {
          "file": {
            "description": "jpeg / png / webp, at most 5 MB.",
            "format": "binary",
            "type": "string"
          },
          "purpose": {
            "enum": ["claim", "review"],
            "type": "string"
          }
        },
        "required": ["file", "purpose"],
        "type": "object"
      },
      "StoreApiVariantDto": {
        "properties": {
          "carton_qty": {
            "nullable": true,
            "type": "number"
          },
          "hsn": {
            "nullable": true,
            "type": "string"
          },
          "max_qty": {
            "nullable": true,
            "type": "number"
          },
          "min_cartons": {
            "nullable": true,
            "type": "number"
          },
          "min_qty": {
            "type": "number"
          },
          "mrp_minor": {
            "nullable": true,
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "net_weight_g": {
            "nullable": true,
            "type": "number"
          },
          "price_id": {
            "type": "string"
          },
          "price_list": {
            "description": "`retail` or the trade tier.",
            "example": "retail",
            "type": "string"
          },
          "price_per100g_minor": {
            "nullable": true,
            "type": "number"
          },
          "sku": {
            "nullable": true,
            "type": "string"
          },
          "stock_state": {
            "enum": ["in_stock", "low", "out"],
            "type": "string"
          },
          "tax_inclusive": {
            "type": "boolean"
          },
          "tax_rate": {
            "example": 5,
            "type": "number"
          },
          "unit_price_minor": {
            "description": "The trade price for an approved trade buyer, else retail.",
            "type": "number"
          }
        },
        "required": [
          "price_id",
          "name",
          "unit_price_minor",
          "tax_inclusive",
          "tax_rate",
          "stock_state",
          "min_qty",
          "price_list"
        ],
        "type": "object"
      },
      "StoreBuyerAddressDto": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "line1": {
            "type": "string"
          },
          "line2": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreBuyerShipmentDto": {
        "properties": {
          "carrier": {
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "type": "string"
          },
          "shipped_at": {
            "format": "date-time",
            "type": "string"
          },
          "tracking_no": {
            "type": "string"
          },
          "tracking_url": {
            "type": "string"
          }
        },
        "required": ["carrier"],
        "type": "object"
      },
      "StoreGrievanceOfficerDto": {
        "properties": {
          "email": {
            "maxLength": 200,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "type": "object"
      },
      "StoreItemDto": {
        "properties": {
          "action": {
            "enum": ["buy", "enquire", "default"],
            "type": "string"
          },
          "catalogue_active": {
            "description": "False when the catalogue item is not ACTIVE: hidden from buyers.",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivery_charge_minor": {
            "type": "integer"
          },
          "effective_action": {
            "enum": ["buy", "enquire"],
            "type": "string"
          },
          "from_price_minor": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "is_featured": {
            "type": "boolean"
          },
          "is_visible": {
            "type": "boolean"
          },
          "item_id": {
            "type": "string"
          },
          "item_type": {
            "enum": ["products", "services"],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sort_order": {
            "type": "integer"
          },
          "stock": {
            "enum": ["in_stock", "low_stock", "out_of_stock"],
            "type": "string"
          }
        },
        "required": [
          "id",
          "item_type",
          "item_id",
          "name",
          "catalogue_active",
          "is_visible",
          "action",
          "effective_action",
          "sort_order",
          "is_featured",
          "stock",
          "created_at"
        ],
        "type": "object"
      },
      "StoreItemRefDto": {
        "properties": {
          "item_id": {
            "description": "The catalogue product or service id.",
            "type": "string"
          },
          "item_type": {
            "enum": ["products", "services"],
            "type": "string"
          }
        },
        "required": ["item_type", "item_id"],
        "type": "object"
      },
      "StoreItemsAddedDto": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/StoreItemDto"
            },
            "type": "array"
          }
        },
        "required": ["items"],
        "type": "object"
      },
      "StoreOrderDetailDto": {
        "properties": {
          "bill_address": {
            "$ref": "#/components/schemas/StoreBuyerAddressDto"
          },
          "buyer_email": {
            "type": "string"
          },
          "buyer_gstin": {
            "type": "string"
          },
          "buyer_id": {
            "description": "The store buyer (Store API orders).",
            "type": "string"
          },
          "buyer_name": {
            "type": "string"
          },
          "buyer_phone": {
            "type": "string"
          },
          "cancelled_at": {
            "format": "date-time",
            "type": "string"
          },
          "catalogue_order_id": {
            "description": "The Orders app's order.",
            "type": "string"
          },
          "channel": {
            "description": "Where it was placed (`shop` = the hosted shop).",
            "enum": ["web", "app", "api", "shop"],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credit_due_on": {
            "description": "Trade credit: the day the invoice falls due (YYYY-MM-DD).",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "delivery_minor": {
            "type": "integer"
          },
          "discount_minor": {
            "type": "integer"
          },
          "fulfilment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreOrderFulfilmentDto"
              }
            ],
            "description": "Absent until the Orders app's goods order opens (COD at checkout, online once paid)."
          },
          "gift_message": {
            "maxLength": 300,
            "type": "string"
          },
          "goods_minor": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "description": "The Sales document (proforma, then tax invoice).",
            "type": "string"
          },
          "is_gift": {
            "type": "boolean"
          },
          "lead_id": {
            "description": "The lead (CRM).",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreOrderLineDto"
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "number": {
            "type": "string"
          },
          "paid_at": {
            "format": "date-time",
            "type": "string"
          },
          "payment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StoreOrderPaymentDto"
              }
            ],
            "description": "Absent when the Sales document could not be read."
          },
          "payment_mode": {
            "enum": ["online", "cod", "credit"],
            "type": "string"
          },
          "place_of_supply": {
            "type": "string"
          },
          "ship_address": {
            "$ref": "#/components/schemas/StoreBuyerAddressDto"
          },
          "status": {
            "enum": ["placed", "awaiting_payment", "paid", "cancelled"],
            "type": "string"
          },
          "total_minor": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "status",
          "payment_mode",
          "buyer_name",
          "currency",
          "goods_minor",
          "delivery_minor",
          "total_minor",
          "lines",
          "created_at",
          "channel",
          "is_gift",
          "ship_address",
          "discount_minor"
        ],
        "type": "object"
      },
      "StoreOrderDto": {
        "properties": {
          "buyer_email": {
            "type": "string"
          },
          "buyer_id": {
            "description": "The store buyer (Store API orders).",
            "type": "string"
          },
          "buyer_name": {
            "type": "string"
          },
          "buyer_phone": {
            "type": "string"
          },
          "catalogue_order_id": {
            "description": "The Orders app's order.",
            "type": "string"
          },
          "channel": {
            "description": "Where it was placed (`shop` = the hosted shop).",
            "enum": ["web", "app", "api", "shop"],
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "delivery_minor": {
            "type": "integer"
          },
          "goods_minor": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "invoice_id": {
            "description": "The Sales document (proforma, then tax invoice).",
            "type": "string"
          },
          "is_gift": {
            "type": "boolean"
          },
          "lead_id": {
            "description": "The lead (CRM).",
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/StoreOrderLineDto"
            },
            "type": "array"
          },
          "number": {
            "type": "string"
          },
          "paid_at": {
            "format": "date-time",
            "type": "string"
          },
          "payment_mode": {
            "enum": ["online", "cod", "credit"],
            "type": "string"
          },
          "place_of_supply": {
            "type": "string"
          },
          "status": {
            "enum": ["placed", "awaiting_payment", "paid", "cancelled"],
            "type": "string"
          },
          "total_minor": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "status",
          "payment_mode",
          "buyer_name",
          "currency",
          "goods_minor",
          "delivery_minor",
          "total_minor",
          "lines",
          "created_at",
          "channel",
          "is_gift"
        ],
        "type": "object"
      },
      "StoreOrderFulfilmentDto": {
        "properties": {
          "cancelled_at": {
            "format": "date-time",
            "type": "string"
          },
          "delivered_at": {
            "format": "date-time",
            "type": "string"
          },
          "order_id": {
            "description": "The Orders app's order (ship, deliver and cancel happen there).",
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "shipments": {
            "items": {
              "$ref": "#/components/schemas/StoreBuyerShipmentDto"
            },
            "type": "array"
          },
          "status": {
            "enum": ["CONFIRMED", "SHIPPED", "DELIVERED", "CANCELLED", "RETURNED"],
            "type": "string"
          }
        },
        "required": ["order_number", "status", "shipments", "order_id"],
        "type": "object"
      },
      "StoreOrderLineDto": {
        "properties": {
          "name": {
            "type": "string"
          },
          "qty": {
            "type": "integer"
          },
          "unit_price_minor": {
            "type": "integer"
          },
          "variant_name": {
            "type": "string"
          }
        },
        "required": ["name", "variant_name", "qty", "unit_price_minor"],
        "type": "object"
      },
      "StoreOrderPaymentDto": {
        "properties": {
          "amount_due_minor": {
            "type": "integer"
          },
          "amount_paid_minor": {
            "type": "integer"
          },
          "document_id": {
            "description": "The document that takes the money now (its tax invoice once converted).",
            "type": "string"
          },
          "document_number": {
            "type": "string"
          },
          "receipts": {
            "items": {
              "$ref": "#/components/schemas/StoreOrderReceiptDto"
            },
            "type": "array"
          }
        },
        "required": ["amount_paid_minor", "amount_due_minor", "receipts"],
        "type": "object"
      },
      "StoreOrderReceiptDto": {
        "properties": {
          "amount_minor": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": ["PAYMENT", "REFUND"],
            "type": "string"
          },
          "method": {
            "description": "The gateway that took it, `MANUAL` (recorded by a member) or `ADVANCE` (applied).",
            "enum": ["RAZORPAY", "STRIPE", "PAYTM", "CCAVENUE", "MANUAL", "ADVANCE"],
            "type": "string"
          },
          "paid_at": {
            "format": "date-time",
            "type": "string"
          },
          "reference": {
            "description": "The gateway's payment id, else the member's reference (UTR, refund id).",
            "type": "string"
          }
        },
        "required": ["id", "kind", "method", "amount_minor", "currency", "paid_at"],
        "type": "object"
      },
      "StoreRemovedDto": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": ["id"],
        "type": "object"
      },
      "StoreSettingsDto": {
        "properties": {
          "accent_color": {
            "type": "string"
          },
          "apple_audiences": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "auth_methods": {
            "items": {
              "enum": ["phone_otp", "google", "apple"],
              "type": "string"
            },
            "type": "array"
          },
          "business_profile_id": {
            "type": "string"
          },
          "cod_enabled": {
            "type": "boolean"
          },
          "contact_email": {
            "type": "string"
          },
          "contact_phone": {
            "type": "string"
          },
          "currency": {
            "description": "The workspace's selling currency (Sales settings).",
            "type": "string"
          },
          "default_action": {
            "enum": ["buy", "enquire"],
            "type": "string"
          },
          "delivery_flat_minor": {
            "type": "integer"
          },
          "delivery_free_above_minor": {
            "type": "integer"
          },
          "delivery_mode": {
            "enum": ["flat", "per_item", "free"],
            "type": "string"
          },
          "delivery_sac": {
            "type": "string"
          },
          "delivery_tax_rate": {
            "type": "number"
          },
          "display_name": {
            "type": "string"
          },
          "fssai_licence": {
            "type": "string"
          },
          "gateway_configured": {
            "description": "Whether a payment gateway is ready (online payment may be switched on).",
            "type": "boolean"
          },
          "google_client_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "grievance_contact": {
            "type": "string"
          },
          "grievance_officer": {
            "$ref": "#/components/schemas/StoreGrievanceOfficerDto"
          },
          "logo_file_id": {
            "type": "string"
          },
          "marketing_consent_text": {
            "type": "string"
          },
          "online_enabled": {
            "type": "boolean"
          },
          "policy_privacy": {
            "type": "string"
          },
          "policy_refund": {
            "type": "string"
          },
          "policy_shipping": {
            "type": "string"
          },
          "policy_terms": {
            "type": "string"
          },
          "require_captcha": {
            "type": "boolean"
          },
          "support_hours": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "whatsapp_number": {
            "type": "string"
          }
        },
        "required": [
          "default_action",
          "currency",
          "cod_enabled",
          "online_enabled",
          "gateway_configured",
          "delivery_mode",
          "delivery_flat_minor",
          "delivery_sac",
          "delivery_tax_rate",
          "auth_methods",
          "google_client_ids",
          "apple_audiences",
          "require_captcha"
        ],
        "type": "object"
      },
      "SupportCategoryDto": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "sort_order": {
            "type": "number"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": ["id", "name", "sort_order", "is_active", "created_at", "updated_at"],
        "type": "object"
      },
      "SupportCategoryRefDto": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "SupportEmailReplyStateDto": {
        "properties": {
          "can_reply": {
            "type": "boolean"
          },
          "from_email": {
            "description": "Replies are sent from this address.",
            "nullable": true,
            "type": "string"
          },
          "reason": {
            "description": "Why not: the connection is paused, the member has no access to it, or it is gone.",
            "enum": ["paused", "no_access", "missing"],
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["can_reply"],
        "type": "object"
      },
      "SupportLeadRefDto": {
        "properties": {
          "email": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "mobile": {
            "nullable": true,
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": ["id", "name"],
        "type": "object"
      },
      "SupportTicketAttachmentDto": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size_bytes": {
            "type": "string"
          },
          "url": {
            "description": "Short-lived download URL; absent when storage couldn't sign it.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": ["file_id", "file_name", "mime_type", "size_bytes"],
        "type": "object"
      },
      "SupportTicketDto": {
        "properties": {
          "assigned_user_id": {
            "nullable": true,
            "type": "string"
          },
          "assignee_name": {
            "nullable": true,
            "type": "string"
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportCategoryRefDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "closed_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "contact_id": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "customer_email": {
            "description": "EMAIL tickets: the customer's address.",
            "nullable": true,
            "type": "string"
          },
          "email_connection_id": {
            "description": "EMAIL tickets: the Email Marketing connection replies go out on.",
            "nullable": true,
            "type": "string"
          },
          "email_reply": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportEmailReplyStateDto"
              }
            ],
            "description": "EMAIL tickets only: read-only when the reader cannot reply (C-A9, C-A40).",
            "nullable": true,
            "type": "object"
          },
          "first_reply_due_at": {
            "description": "`created_at` + the priority's first-reply target. Absent when SLA is off or no target.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "first_response_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_agent_message_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_customer_message_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_message_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lead": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportLeadRefDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "lead_id": {
            "type": "string"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/SupportTicketMessageDto"
            },
            "type": "array"
          },
          "priority": {
            "enum": ["LOW", "NORMAL", "HIGH", "URGENT"],
            "type": "string"
          },
          "resolution": {
            "nullable": true,
            "type": "string"
          },
          "resolve_due_at": {
            "description": "`created_at` + the priority's resolve target. Absent when SLA is off or no target.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolved_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolved_by": {
            "nullable": true,
            "type": "string"
          },
          "sla_state": {
            "description": "The worse of the two clocks: `late` = a target was missed (stays so after a late reply), `due_soon` = a running clock has 20% or less of its target left, else `ok`. A first public reply stops the first-reply clock; resolving or closing stops both. Absent when SLA is off or the priority has no target.",
            "enum": ["ok", "due_soon", "late"],
            "nullable": true,
            "type": "string"
          },
          "source": {
            "enum": ["MANUAL", "WHATSAPP", "EMAIL", "PRODUCT"],
            "type": "string"
          },
          "status": {
            "enum": ["AWAITING_SUPPORT", "AWAITING_CUSTOMER", "ON_HOLD", "RESOLVED", "CLOSED"],
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "ticket_number": {
            "example": "TKT-000042",
            "type": "string"
          },
          "unread": {
            "description": "A customer message nobody has opened since, or never opened.",
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "waba_conversation_id": {
            "nullable": true,
            "type": "string"
          },
          "wal_chat_id": {
            "description": "Plan 29: the linked WhatsApp chat the ticket was opened from.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "ticket_number",
          "subject",
          "status",
          "priority",
          "source",
          "lead_id",
          "created_by",
          "unread",
          "created_at",
          "updated_at",
          "messages"
        ],
        "type": "object"
      },
      "SupportTicketMessageDto": {
        "properties": {
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/SupportTicketAttachmentDto"
            },
            "type": "array"
          },
          "author_name": {
            "nullable": true,
            "type": "string"
          },
          "author_type": {
            "enum": ["CUSTOMER", "AGENT", "SYSTEM"],
            "type": "string"
          },
          "author_user_id": {
            "nullable": true,
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "sender_channel": {
            "description": "Plan 29: which WhatsApp carried this message; null on email, manual and older ones.",
            "enum": ["official", "linked"],
            "nullable": true,
            "type": "string"
          },
          "sender_number": {
            "description": "The number as `+<digits>`, linked or official (plan 34); null when it is no longer known.",
            "nullable": true,
            "type": "string"
          },
          "sender_number_id": {
            "description": "The number on that side: Meta's phone-number id (official) or the linked number's id.",
            "nullable": true,
            "type": "string"
          },
          "via_email": {
            "description": "True when this message came in, or went out, by email.",
            "type": "boolean"
          },
          "via_whatsapp": {
            "description": "True when this message came from, or went to, the WhatsApp chat.",
            "type": "boolean"
          },
          "visibility": {
            "enum": ["PUBLIC", "INTERNAL"],
            "type": "string"
          }
        },
        "required": [
          "id",
          "author_type",
          "visibility",
          "body",
          "via_whatsapp",
          "via_email",
          "created_at",
          "attachments"
        ],
        "type": "object"
      },
      "SupportTicketSummaryDto": {
        "properties": {
          "assigned_user_id": {
            "nullable": true,
            "type": "string"
          },
          "assignee_name": {
            "nullable": true,
            "type": "string"
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportCategoryRefDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "closed_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "contact_id": {
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "customer_email": {
            "description": "EMAIL tickets: the customer's address.",
            "nullable": true,
            "type": "string"
          },
          "email_connection_id": {
            "description": "EMAIL tickets: the Email Marketing connection replies go out on.",
            "nullable": true,
            "type": "string"
          },
          "first_reply_due_at": {
            "description": "`created_at` + the priority's first-reply target. Absent when SLA is off or no target.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "first_response_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_agent_message_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_customer_message_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_message_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "lead": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SupportLeadRefDto"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "lead_id": {
            "type": "string"
          },
          "priority": {
            "enum": ["LOW", "NORMAL", "HIGH", "URGENT"],
            "type": "string"
          },
          "resolve_due_at": {
            "description": "`created_at` + the priority's resolve target. Absent when SLA is off or no target.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "resolved_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "sla_state": {
            "description": "The worse of the two clocks: `late` = a target was missed (stays so after a late reply), `due_soon` = a running clock has 20% or less of its target left, else `ok`. A first public reply stops the first-reply clock; resolving or closing stops both. Absent when SLA is off or the priority has no target.",
            "enum": ["ok", "due_soon", "late"],
            "nullable": true,
            "type": "string"
          },
          "source": {
            "enum": ["MANUAL", "WHATSAPP", "EMAIL", "PRODUCT"],
            "type": "string"
          },
          "status": {
            "enum": ["AWAITING_SUPPORT", "AWAITING_CUSTOMER", "ON_HOLD", "RESOLVED", "CLOSED"],
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "ticket_number": {
            "example": "TKT-000042",
            "type": "string"
          },
          "unread": {
            "description": "A customer message nobody has opened since, or never opened.",
            "type": "boolean"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "waba_conversation_id": {
            "nullable": true,
            "type": "string"
          },
          "wal_chat_id": {
            "description": "Plan 29: the linked WhatsApp chat the ticket was opened from.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "ticket_number",
          "subject",
          "status",
          "priority",
          "source",
          "lead_id",
          "created_by",
          "unread",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SyncConflictDto": {
        "properties": {
          "applied_at": {
            "description": "When a run wrote the pick.",
            "format": "date-time",
            "type": "string"
          },
          "choice": {
            "enum": ["local", "remote"],
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "connection_name": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "field": {
            "enum": ["name", "description", "sku", "price", "stock"],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "description": "The catalogue item (and variant).",
            "type": "string"
          },
          "link_id": {
            "type": "string"
          },
          "local_changed_at": {
            "description": "When the conflict was found on our side.",
            "format": "date-time",
            "type": "string"
          },
          "local_changed_by": {
            "type": "string"
          },
          "local_value": {
            "description": "Ours, as text (price in minor units, stock a count).",
            "type": "string"
          },
          "price_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "provider": {
            "enum": ["shopify", "woocommerce", "meta_catalog"],
            "type": "string"
          },
          "remote_changed_at": {
            "description": "The platform's last change of the item.",
            "format": "date-time",
            "type": "string"
          },
          "remote_value": {
            "description": "Theirs, as text.",
            "type": "string"
          },
          "resolved_at": {
            "format": "date-time",
            "type": "string"
          },
          "resolved_by": {
            "type": "string"
          },
          "status": {
            "enum": ["open", "resolved", "dismissed"],
            "type": "string"
          }
        },
        "required": [
          "id",
          "connection_id",
          "connection_name",
          "provider",
          "link_id",
          "product_id",
          "price_id",
          "label",
          "field",
          "status",
          "created_at"
        ],
        "type": "object"
      },
      "SyncConnectionDto": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "field_rules": {
            "$ref": "#/components/schemas/FieldRulesDto"
          },
          "id": {
            "type": "string"
          },
          "is_sandbox": {
            "type": "boolean"
          },
          "last_error": {
            "type": "string"
          },
          "last_full_sync_at": {
            "format": "date-time",
            "type": "string"
          },
          "last_run": {
            "$ref": "#/components/schemas/SyncLastRunDto"
          },
          "last_run_at": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "description": "Linked catalogue variants.",
            "type": "number"
          },
          "open_conflicts": {
            "type": "number"
          },
          "provider": {
            "enum": ["shopify", "woocommerce", "meta_catalog"],
            "type": "string"
          },
          "remote_host": {
            "description": "Shop domain, site address or catalogue id. Keys are never returned.",
            "type": "string"
          },
          "status": {
            "description": "`dry_run`: waiting for a member to confirm the first sync's dry run.",
            "enum": ["connected", "error", "paused", "dry_run"],
            "type": "string"
          }
        },
        "required": [
          "id",
          "provider",
          "display_name",
          "status",
          "is_sandbox",
          "field_rules",
          "links",
          "open_conflicts",
          "created_at"
        ],
        "type": "object"
      },
      "SyncLastRunDto": {
        "properties": {
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": ["full", "webhook", "poll", "dry_run", "manual", "local"],
            "type": "string"
          },
          "status": {
            "enum": ["running", "done", "failed"],
            "type": "string"
          }
        },
        "required": ["id", "kind", "status"],
        "type": "object"
      },
      "SyncLinkDto": {
        "properties": {
          "connection_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "last_synced_at": {
            "format": "date-time",
            "type": "string"
          },
          "price_id": {
            "type": "string"
          },
          "product_id": {
            "type": "string"
          },
          "remote_product_id": {
            "type": "string"
          },
          "remote_review_reason": {
            "type": "string"
          },
          "remote_review_status": {
            "description": "Meta's review of the item (its words: pending, approved, rejected…).",
            "type": "string"
          },
          "remote_variant_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "connection_id",
          "product_id",
          "price_id",
          "label",
          "remote_product_id",
          "remote_variant_id",
          "created_at"
        ],
        "type": "object"
      },
      "SyncReportChangeDto": {
        "properties": {
          "conflict": {
            "type": "number"
          },
          "field": {
            "enum": ["name", "description", "sku", "price", "stock"],
            "type": "string"
          },
          "pull": {
            "type": "number"
          },
          "push": {
            "type": "number"
          }
        },
        "required": ["field", "push", "pull", "conflict"],
        "type": "object"
      },
      "SyncReportLocalDto": {
        "properties": {
          "label": {
            "type": "string"
          },
          "price_id": {
            "type": "string"
          }
        },
        "required": ["price_id", "label"],
        "type": "object"
      },
      "SyncReportMatchDto": {
        "properties": {
          "by": {
            "enum": ["sku", "name"],
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "price_id": {
            "type": "string"
          },
          "remote_variant_id": {
            "type": "string"
          }
        },
        "required": ["price_id", "label", "remote_variant_id", "by"],
        "type": "object"
      },
      "SyncReportRemoteDto": {
        "properties": {
          "label": {
            "type": "string"
          },
          "remote_variant_id": {
            "type": "string"
          }
        },
        "required": ["remote_variant_id", "label"],
        "type": "object"
      },
      "SyncRunDto": {
        "properties": {
          "conflicts": {
            "type": "number"
          },
          "connection_id": {
            "type": "string"
          },
          "created": {
            "type": "number"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "failed": {
            "type": "number"
          },
          "finished_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": ["full", "webhook", "poll", "dry_run", "manual", "local"],
            "type": "string"
          },
          "linked": {
            "type": "number"
          },
          "pulled": {
            "type": "number"
          },
          "pushed": {
            "type": "number"
          },
          "report": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SyncRunReportDto"
              }
            ],
            "description": "Only on `GET store/sync/runs/:id`."
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "started_by": {
            "type": "string"
          },
          "status": {
            "enum": ["running", "done", "failed"],
            "type": "string"
          },
          "unchanged": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "connection_id",
          "kind",
          "status",
          "pulled",
          "pushed",
          "created",
          "linked",
          "conflicts",
          "unchanged",
          "failed",
          "started_at",
          "created_at"
        ],
        "type": "object"
      },
      "SyncRunReportDto": {
        "properties": {
          "changes": {
            "items": {
              "$ref": "#/components/schemas/SyncReportChangeDto"
            },
            "type": "array"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "matched": {
            "items": {
              "$ref": "#/components/schemas/SyncReportMatchDto"
            },
            "type": "array"
          },
          "truncated": {
            "description": "Lists were cut at 200 rows.",
            "type": "boolean"
          },
          "unmatched_local": {
            "description": "Ours with no match: created there when the name syncs out.",
            "items": {
              "$ref": "#/components/schemas/SyncReportLocalDto"
            },
            "type": "array"
          },
          "unmatched_remote": {
            "description": "Theirs with no match: not imported.",
            "items": {
              "$ref": "#/components/schemas/SyncReportRemoteDto"
            },
            "type": "array"
          }
        },
        "required": [
          "matched",
          "unmatched_local",
          "unmatched_remote",
          "changes",
          "errors",
          "truncated"
        ],
        "type": "object"
      },
      "UpdateStoreItemDto": {
        "properties": {
          "action": {
            "description": "Services stay `enquire`.",
            "enum": ["buy", "enquire", "default"],
            "type": "string"
          },
          "delivery_charge_minor": {
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "is_featured": {
            "type": "boolean"
          },
          "is_visible": {
            "type": "boolean"
          },
          "sort_order": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UpdateWebhookEndpointDto": {
        "properties": {
          "events": {
            "description": "Event names from `GET webhook-events` (e.g. lead.created, lead.updated, message.status).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "url": {
            "maxLength": 2048,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookEndpointDto": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "disabled_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "disabled_reason": {
            "enum": ["failing", "manual"],
            "nullable": true,
            "type": "string"
          },
          "events": {
            "description": "Event names from `GET webhook-events` (e.g. lead.created, lead.updated, message.status).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "failing_since": {
            "description": "Failing without a success since then; 3 days of it turn the endpoint off.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "failure_count": {
            "description": "Failed attempts since the last success.",
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "last_delivered_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_failure_at": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "previous_secret_expires_at": {
            "description": "After a rotation: the old secret also signs until then.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": ["id", "url", "events", "is_enabled", "failure_count", "created_at"],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key: secret (rb_live_… / rb_test_…) or, on the Store API, publishable (rb_pk_live_… / rb_pk_test_…)."
      },
      "tenant": {
        "type": "apiKey",
        "in": "header",
        "name": "x-workspace-id",
        "description": "The key's workspace id."
      }
    }
  }
}
