{
  "openapi": "3.1.1",
  "info": {
    "title": "Tillstack API",
    "description": "Inventory, sales and payment reconciliation for operators, resellers and merchants.\n\n**Authentication.** Server-to-server calls send an API key in \u0060X-Api-Key\u0060 (\u0060tsk_live_\u2026\u0060, or \u0060tsk_test_\u2026\u0060 in the sandbox).\nWrite endpoints used by an operator backend additionally require \u0060X-Tillstack-Signature: t={unix seconds},v1={hex}\u0060, where the hex is the HMAC-SHA256 of\n\u0060{t}.{raw body}\u0060 under the key\u0027s signing secret (5-minute clock tolerance). People sign in at \u0060/v1/auth/login\u0060 and send the access token as a Bearer token. A terminal uses a\nshort-lived session token from \u0060POST /v1/terminals/{tid}/sessions\u0060.\n\n**Money** is always an integer number of kobo. **Errors** are \u0060application/problem\u002Bjson\u0060 with a stable \u0060code\u0060.\n\n**Webhooks** are listed under the \u0060webhooks\u0060 section: each delivery is signed with \u0060Tillstack-Signature\u0060\n(\u0060v1=\u0060 \u002B hex HMAC-SHA256 of \u0060{Tillstack-Timestamp}.{raw body}\u0060 using the endpoint secret) and is at-least-once,\nso de-duplicate on the event \u0060id\u0060.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "http://localhost/"
    }
  ],
  "paths": {
    "/v1/public/branding": {
      "get": {
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "name": "host",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/branding": {
      "get": {
        "tags": [
          "OrganizationBranding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "OrganizationBranding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBrandingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBrandingRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBrandingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/domains": {
      "get": {
        "tags": [
          "OrganizationBranding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "OrganizationBranding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/domains/{domainId}/refresh": {
      "post": {
        "tags": [
          "OrganizationBranding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/domains/{domainId}": {
      "delete": {
        "tags": [
          "OrganizationBranding"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "domainId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/domains": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/DomainStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks/events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks/{endpointId}": {
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks/{endpointId}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks/{endpointId}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks/{endpointId}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/DeliveryStatus"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/webhooks/{endpointId}/deliveries/{deliveryId}/retry": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpointId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "deliveryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/auth/forgot-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ForgotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/auth/reset-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ResetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/auth/refresh": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/OrgType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}": {
      "put": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/users": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/profile": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/users/{userId}": {
      "put": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StaffRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/StaffRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/users/{userId}/password": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/organizations/{id}/api-keys": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminals": {
      "get": {
        "tags": [
          "Terminals"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "unassigned",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TerminalStatus"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Terminals"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/TerminalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminals/{id}": {
      "put": {
        "tags": [
          "Terminals"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTerminalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTerminalRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTerminalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminals/{tid}/sessions": {
      "post": {
        "tags": [
          "Terminals"
        ],
        "parameters": [
          {
            "name": "tid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/email": {
      "get": {
        "tags": [
          "EmailAdmin"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/email/test": {
      "post": {
        "tags": [
          "EmailAdmin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestEmailRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestEmailRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/TestEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/categories": {
      "get": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NameRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NameRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/NameRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/categories/order": {
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/categories/{id}": {
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/products/{id}/image": {
      "post": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/branches": {
      "post": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BranchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BranchRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/BranchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/branches/{branchId}": {
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBranchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBranchRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBranchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/products": {
      "get": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CreateProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/products/{id}": {
      "get": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProductRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/products/import": {
      "post": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ImportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/products/order": {
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/products/{id}/variants": {
      "post": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewVariant"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/NewVariant"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/NewVariant"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/variants/{variantId}": {
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVariantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVariantRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVariantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/variants/{variantId}/prices/{branchId}": {
      "put": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PriceRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/PriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/catalog": {
      "get": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/lookup": {
      "get": {
        "tags": [
          "MerchantCatalog"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "barcode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/adjustments": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdjustRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/AdjustRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/receipts": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/reorder-levels": {
      "put": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ReorderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/levels": {
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "lowOnly",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/movements": {
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "variantId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reason",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/StockReason"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/valuation": {
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "detail",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/transfers": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/TransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TransferStatus"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/transfers/{id}": {
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/transfers/{id}/receive": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReceiveTransferRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReceiveTransferRequest"
                  }
                ]
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReceiveTransferRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/transfers/{id}/cancel": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/counts": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCountRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartCountRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/StartCountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/CountStatus"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/counts/{id}": {
      "get": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/counts/{id}/lines": {
      "put": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountLinesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CountLinesRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CountLinesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/counts/{id}/post": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/inventory/counts/{id}/cancel": {
      "post": {
        "tags": [
          "MerchantInventory"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/images/{imageId}": {
      "get": {
        "tags": [
          "Images"
        ],
        "parameters": [
          {
            "name": "imageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "w",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "h",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "fit",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fmt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/sales": {
      "post": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SaleRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/SaleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "shiftId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SaleStatus"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "receipt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/sales/{saleId}": {
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "saleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/sales/{saleId}/returns": {
      "post": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "saleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/ReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/shifts": {
      "post": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenShiftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenShiftRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/OpenShiftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ShiftStatus"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/shifts/{shiftId}": {
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/shifts/{shiftId}/close": {
      "post": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseShiftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseShiftRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CloseShiftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/reports/z": {
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "shiftId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/oversells": {
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/OversellStatus"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/oversells/{alertId}/acknowledge": {
      "post": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/rejections": {
      "get": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "resolved",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/rejections/{rejectionId}/resolve": {
      "post": {
        "tags": [
          "MerchantSales"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "rejectionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/transactions": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IngestRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/IngestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/transactions": {
      "get": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/MatchStatus"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TxnType"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "rrn",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/reconciliation/summary": {
      "get": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "graceMinutes",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/reconciliation/exceptions": {
      "get": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "graceMinutes",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/reconciliation/run": {
      "post": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/transactions/{transactionId}/match": {
      "post": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MatchRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/MatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/transactions/{transactionId}/ignore": {
      "post": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NoteRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/merchants/{merchantId}/reports/sales": {
      "get": {
        "tags": [
          "MerchantReconciliation"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SalesGroupBy"
            }
          },
          {
            "name": "branchId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "terminalId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/reports/network": {
      "get": {
        "tags": [
          "NetworkReports"
        ],
        "parameters": [
          {
            "name": "groupBy",
            "in": "query",
            "schema": {
              "default": 0,
              "$ref": "#/components/schemas/NetworkGroupBy"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/reports/platform": {
      "get": {
        "tags": [
          "NetworkReports"
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 14
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/sync/merchants": {
      "put": {
        "tags": [
          "Sync"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MerchantsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MerchantsRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/MerchantsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/sync/branches": {
      "put": {
        "tags": [
          "Sync"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BranchesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BranchesRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/BranchesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/sync/terminals": {
      "put": {
        "tags": [
          "Sync"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalsRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/TerminalsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/sync/webhooks": {
      "post": {
        "tags": [
          "Sync"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/WebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/imports": {
      "post": {
        "tags": [
          "Imports"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ImportKind"
            }
          },
          {
            "name": "fileName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Imports"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/imports/{id}": {
      "get": {
        "tags": [
          "Imports"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/catalog": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/categories": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/lookup": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "barcode",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/stock/{variantId}": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "variantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/sales": {
      "post": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalSaleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalSaleRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/TerminalSaleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/sales/{saleId}": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "saleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/sales/{saleId}/returns": {
      "post": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "saleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalReturnRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TerminalReturnRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/TerminalReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/shifts": {
      "post": {
        "tags": [
          "Terminal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenShiftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenShiftRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/OpenShiftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/shifts/{shiftId}/close": {
      "post": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseShiftRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseShiftRequest"
              }
            },
            "application/*\u002Bjson": {
              "schema": {
                "$ref": "#/components/schemas/CloseShiftRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/shifts/{shiftId}": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/terminal/shifts/{shiftId}/report": {
      "get": {
        "tags": [
          "Terminal"
        ],
        "parameters": [
          {
            "name": "shiftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddDomainRequest": {
        "required": [
          "host"
        ],
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          }
        }
      },
      "AdjustRequest": {
        "required": [
          "branchId",
          "variantId",
          "quantityDelta",
          "note",
          "unitCostKobo"
        ],
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantityDelta": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "unitCostKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "BranchesRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BranchItem"
            }
          }
        }
      },
      "BranchItem": {
        "required": [
          "externalId",
          "merchantExternalId",
          "name",
          "code"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "merchantExternalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "BranchRequest": {
        "required": [
          "name",
          "code"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "CloseShiftRequest": {
        "required": [
          "countedCashKobo",
          "closedAt",
          "cashierRef"
        ],
        "type": "object",
        "properties": {
          "countedCashKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "closedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cashierRef": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CountedInput": {
        "required": [
          "variantId",
          "countedQty"
        ],
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "countedQty": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "CountLinesRequest": {
        "required": [
          "lines"
        ],
        "type": "object",
        "properties": {
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/CountedInput"
            }
          }
        }
      },
      "CountStatus": {
        "type": "integer"
      },
      "CreateApiKeyRequest": {
        "required": [
          "name",
          "scopes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateEndpointRequest": {
        "required": [
          "url",
          "events",
          "description"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "events": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateOrganizationRequest": {
        "required": [
          "type",
          "parentId",
          "name",
          "slug"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/OrgType"
          },
          "parentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "sandbox": {
            "type": "boolean",
            "default": false
          },
          "mid": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateProductRequest": {
        "required": [
          "name",
          "description",
          "categoryId",
          "unit",
          "taxClass",
          "trackStock",
          "variants"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "categoryId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "taxClass": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TaxClass"
              }
            ]
          },
          "trackStock": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "variants": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/NewVariant"
            }
          }
        }
      },
      "CreateUserRequest": {
        "required": [
          "email",
          "fullName",
          "password",
          "role"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "password": {
            "type": [
              "null",
              "string"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          },
          "invite": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "DeliveryStatus": {
        "type": "integer"
      },
      "DomainStatus": {
        "type": "integer"
      },
      "ForgotRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "ImportKind": {
        "type": "integer"
      },
      "ImportRequest": {
        "required": [
          "csv",
          "dryRun"
        ],
        "type": "object",
        "properties": {
          "csv": {
            "type": [
              "null",
              "string"
            ]
          },
          "dryRun": {
            "type": "boolean"
          }
        }
      },
      "IngestRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TransactionItem"
            }
          }
        }
      },
      "JsonElement": {},
      "LoginRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "MatchRequest": {
        "required": [
          "saleTenderId",
          "note"
        ],
        "type": "object",
        "properties": {
          "saleTenderId": {
            "type": "string",
            "format": "uuid"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MatchStatus": {
        "type": "integer"
      },
      "MerchantItem": {
        "required": [
          "externalId",
          "name"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "mid": {
            "type": [
              "null",
              "string"
            ]
          },
          "slug": {
            "type": [
              "null",
              "string"
            ]
          },
          "resellerId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrgStatus"
              }
            ]
          }
        }
      },
      "MerchantsRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MerchantItem"
            }
          }
        }
      },
      "NameRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "NetworkGroupBy": {
        "type": "integer"
      },
      "NewVariant": {
        "required": [
          "sku",
          "name",
          "barcode",
          "priceKobo"
        ],
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "barcode": {
            "type": [
              "null",
              "string"
            ]
          },
          "priceKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "costKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "NoteRequest": {
        "required": [
          "note"
        ],
        "type": "object",
        "properties": {
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OpenShiftRequest": {
        "required": [
          "shiftId",
          "branchId",
          "tid",
          "openedAt",
          "openingFloatKobo",
          "cashierRef"
        ],
        "type": "object",
        "properties": {
          "shiftId": {
            "type": "string",
            "format": "uuid"
          },
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "tid": {
            "type": "string"
          },
          "openedAt": {
            "type": "string",
            "format": "date-time"
          },
          "openingFloatKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "cashierRef": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OrderRequest": {
        "required": [
          "ids"
        ],
        "type": "object",
        "properties": {
          "ids": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "OrgStatus": {
        "type": "integer"
      },
      "OrgType": {
        "type": "integer"
      },
      "OversellStatus": {
        "type": "integer"
      },
      "PasswordRequest": {
        "required": [
          "password"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          }
        }
      },
      "PriceRequest": {
        "required": [
          "priceKobo"
        ],
        "type": "object",
        "properties": {
          "priceKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ProfileRequest": {
        "required": [
          "name",
          "address",
          "phone",
          "contactEmail",
          "taxId",
          "receiptFooter",
          "dailySummary"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "address": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "taxId": {
            "type": [
              "null",
              "string"
            ]
          },
          "receiptFooter": {
            "type": [
              "null",
              "string"
            ]
          },
          "dailySummary": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "ReceiptLineInput": {
        "required": [
          "variantId",
          "quantity",
          "unitCostKobo"
        ],
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unitCostKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ReceiptRequest": {
        "required": [
          "branchId",
          "reference",
          "supplierName",
          "note",
          "lines"
        ],
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          },
          "supplierName": {
            "type": [
              "null",
              "string"
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ReceiptLineInput"
            }
          }
        }
      },
      "ReceivedLineInput": {
        "required": [
          "variantId",
          "quantityReceived"
        ],
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantityReceived": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ReceiveTransferRequest": {
        "required": [
          "lines"
        ],
        "type": "object",
        "properties": {
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ReceivedLineInput"
            }
          }
        }
      },
      "RefreshRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "RefundInput": {
        "required": [
          "type",
          "amountKobo"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TenderType"
          },
          "amountKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "rrn": {
            "type": [
              "null",
              "string"
            ]
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReorderRequest": {
        "required": [
          "branchId",
          "variantId",
          "reorderLevel"
        ],
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "reorderLevel": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "ResetRequest": {
        "required": [
          "token",
          "password"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "ReturnLineInput": {
        "required": [
          "saleLineId",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "saleLineId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "restock": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "ReturnRequest": {
        "required": [
          "returnId",
          "occurredAt",
          "reason",
          "cashierRef",
          "lines",
          "refunds"
        ],
        "type": "object",
        "properties": {
          "returnId": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "cashierRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ReturnLineInput"
            }
          },
          "refunds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RefundInput"
            }
          }
        }
      },
      "SaleLineInput": {
        "required": [
          "variantId",
          "quantity",
          "unitPriceKobo"
        ],
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unitPriceKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "discountKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          }
        }
      },
      "SaleRequest": {
        "required": [
          "saleId",
          "branchId",
          "tid",
          "shiftId",
          "receiptNo",
          "cashierRef",
          "occurredAt",
          "lines",
          "tenders",
          "expectedTotalKobo",
          "note"
        ],
        "type": "object",
        "properties": {
          "saleId": {
            "type": "string",
            "format": "uuid"
          },
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "tid": {
            "type": [
              "null",
              "string"
            ]
          },
          "shiftId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "receiptNo": {
            "type": [
              "null",
              "string"
            ]
          },
          "cashierRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SaleLineInput"
            }
          },
          "tenders": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TenderInput"
            }
          },
          "expectedTotalKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SalesGroupBy": {
        "type": "integer"
      },
      "SaleStatus": {
        "type": "integer"
      },
      "ShiftStatus": {
        "type": "integer"
      },
      "StaffRequest": {
        "required": [
          "fullName",
          "role",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "fullName": {
            "type": [
              "null",
              "string"
            ]
          },
          "role": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserRole"
              }
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "StartCountRequest": {
        "required": [
          "branchId",
          "name",
          "variantIds"
        ],
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "variantIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "StockReason": {
        "type": "integer"
      },
      "TaxClass": {
        "type": "integer"
      },
      "TenderInput": {
        "required": [
          "type",
          "amountKobo"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TenderType"
          },
          "amountKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "rrn": {
            "type": [
              "null",
              "string"
            ]
          },
          "stan": {
            "type": [
              "null",
              "string"
            ]
          },
          "tid": {
            "type": [
              "null",
              "string"
            ]
          },
          "maskedPan": {
            "type": [
              "null",
              "string"
            ]
          },
          "authCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TenderType": {
        "type": "integer"
      },
      "TerminalItem": {
        "required": [
          "externalId",
          "tid"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "tid": {
            "type": "string"
          },
          "serialNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TerminalStatus"
              }
            ]
          },
          "merchantExternalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "branchExternalId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TerminalRequest": {
        "required": [
          "tid",
          "serialNumber",
          "model",
          "merchantId",
          "branchId",
          "operatorId"
        ],
        "type": "object",
        "properties": {
          "tid": {
            "type": "string"
          },
          "serialNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "merchantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "branchId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "operatorId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "TerminalReturnRequest": {
        "required": [
          "returnId",
          "occurredAt",
          "reason",
          "cashierRef",
          "lines",
          "refunds"
        ],
        "type": "object",
        "properties": {
          "returnId": {
            "type": "string",
            "format": "uuid"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "cashierRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ReturnLineInput"
            }
          },
          "refunds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/RefundInput"
            }
          }
        }
      },
      "TerminalSaleRequest": {
        "required": [
          "saleId",
          "receiptNo",
          "cashierRef",
          "occurredAt",
          "shiftId",
          "lines",
          "tenders",
          "expectedTotalKobo",
          "note"
        ],
        "type": "object",
        "properties": {
          "saleId": {
            "type": "string",
            "format": "uuid"
          },
          "receiptNo": {
            "type": [
              "null",
              "string"
            ]
          },
          "cashierRef": {
            "type": [
              "null",
              "string"
            ]
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "shiftId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SaleLineInput"
            }
          },
          "tenders": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TenderInput"
            }
          },
          "expectedTotalKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TerminalsRequest": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TerminalItem"
            }
          }
        }
      },
      "TerminalStatus": {
        "type": "integer"
      },
      "TestEmailRequest": {
        "required": [
          "to"
        ],
        "type": "object",
        "properties": {
          "to": {
            "type": "string"
          }
        }
      },
      "TransactionItem": {
        "required": [
          "externalId",
          "tid",
          "mid",
          "type",
          "rrn",
          "stan",
          "amountKobo",
          "responseCode",
          "occurredAt"
        ],
        "type": "object",
        "properties": {
          "externalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "tid": {
            "type": "string"
          },
          "mid": {
            "type": [
              "null",
              "string"
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TxnType"
              }
            ]
          },
          "rrn": {
            "type": [
              "null",
              "string"
            ]
          },
          "stan": {
            "type": [
              "null",
              "string"
            ]
          },
          "amountKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "responseCode": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "maskedPan": {
            "type": [
              "null",
              "string"
            ]
          },
          "authCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheme": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TransferLineInput": {
        "required": [
          "variantId",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d\u002B)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "TransferRequest": {
        "required": [
          "fromBranchId",
          "toBranchId",
          "reference",
          "note",
          "lines"
        ],
        "type": "object",
        "properties": {
          "fromBranchId": {
            "type": "string",
            "format": "uuid"
          },
          "toBranchId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "lines": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/TransferLineInput"
            }
          }
        }
      },
      "TransferStatus": {
        "type": "integer"
      },
      "TxnType": {
        "type": "integer"
      },
      "UpdateBranchRequest": {
        "required": [
          "name",
          "code",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "code": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateBrandingRequest": {
        "required": [
          "brandName",
          "logoUrl",
          "primaryColor"
        ],
        "type": "object",
        "properties": {
          "brandName": {
            "type": [
              "null",
              "string"
            ]
          },
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "primaryColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "showPoweredBy": {
            "type": "boolean",
            "default": true
          },
          "canOverrideBranding": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateCategoryRequest": {
        "required": [
          "name",
          "isActive",
          "color"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "color": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateEndpointRequest": {
        "required": [
          "url",
          "events",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateOrganizationRequest": {
        "required": [
          "name",
          "status",
          "mid"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OrgStatus"
              }
            ]
          },
          "mid": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateProductRequest": {
        "required": [
          "name",
          "description",
          "categoryId",
          "unit",
          "taxClass",
          "trackStock",
          "isActive",
          "isFavourite"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "categoryId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ]
          },
          "taxClass": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TaxClass"
              }
            ]
          },
          "trackStock": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "isFavourite": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateTerminalRequest": {
        "required": [
          "serialNumber",
          "model",
          "status",
          "assignment",
          "merchantId",
          "branchId"
        ],
        "type": "object",
        "properties": {
          "serialNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "model": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TerminalStatus"
              }
            ]
          },
          "assignment": {
            "type": [
              "null",
              "string"
            ]
          },
          "merchantId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "branchId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "UpdateVariantRequest": {
        "required": [
          "name",
          "barcode",
          "priceKobo",
          "costKobo",
          "isActive"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "barcode": {
            "type": [
              "null",
              "string"
            ]
          },
          "priceKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "costKobo": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UserRole": {
        "type": "integer"
      },
      "WebhookRequest": {
        "required": [
          "eventId",
          "type",
          "occurredAt",
          "data"
        ],
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/JsonElement"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "tsk_live_\u2026 or tsk_test_\u2026",
        "name": "X-Api-Key",
        "in": "header"
      },
      "Bearer": {
        "type": "http",
        "description": "User or terminal access token.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Public"
    },
    {
      "name": "Me"
    },
    {
      "name": "OrganizationBranding"
    },
    {
      "name": "Admin"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Organizations"
    },
    {
      "name": "Terminals"
    },
    {
      "name": "EmailAdmin"
    },
    {
      "name": "MerchantCatalog"
    },
    {
      "name": "MerchantInventory"
    },
    {
      "name": "Images"
    },
    {
      "name": "MerchantSales"
    },
    {
      "name": "Transactions"
    },
    {
      "name": "MerchantReconciliation"
    },
    {
      "name": "NetworkReports"
    },
    {
      "name": "Sync"
    },
    {
      "name": "Imports"
    },
    {
      "name": "Terminal"
    }
  ],
  "webhooks": {
    "sale.created": {
      "post": {
        "summary": "sale.created event",
        "description": "Envelope: \u0060{ id, type, createdAt, livemode, merchantId, data }\u0060. Reply with any 2xx within 10 seconds; anything else is retried with backoff (about a day, 7 attempts).",
        "responses": {
          "200": {
            "description": "Received."
          }
        }
      }
    },
    "sale.returned": {
      "post": {
        "summary": "sale.returned event",
        "description": "Envelope: \u0060{ id, type, createdAt, livemode, merchantId, data }\u0060. Reply with any 2xx within 10 seconds; anything else is retried with backoff (about a day, 7 attempts).",
        "responses": {
          "200": {
            "description": "Received."
          }
        }
      }
    },
    "stock.low": {
      "post": {
        "summary": "stock.low event",
        "description": "Envelope: \u0060{ id, type, createdAt, livemode, merchantId, data }\u0060. Reply with any 2xx within 10 seconds; anything else is retried with backoff (about a day, 7 attempts).",
        "responses": {
          "200": {
            "description": "Received."
          }
        }
      }
    },
    "transaction.unmatched": {
      "post": {
        "summary": "transaction.unmatched event",
        "description": "Envelope: \u0060{ id, type, createdAt, livemode, merchantId, data }\u0060. Reply with any 2xx within 10 seconds; anything else is retried with backoff (about a day, 7 attempts).",
        "responses": {
          "200": {
            "description": "Received."
          }
        }
      }
    },
    "import.completed": {
      "post": {
        "summary": "import.completed event",
        "description": "Envelope: \u0060{ id, type, createdAt, livemode, merchantId, data }\u0060. Reply with any 2xx within 10 seconds; anything else is retried with backoff (about a day, 7 attempts).",
        "responses": {
          "200": {
            "description": "Received."
          }
        }
      }
    }
  }
}
