{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "support@enad.io",
      "name": "API support",
      "url": "http://enad.io/support"
    },
    "description": "This is the documentation for Auth API v1",
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "termsOfService": "http://enad.io/terms/",
    "title": "Public API",
    "version": "1.0"
  },
  "paths": {
    "/api/v1/:app_id/auth/change-password": {
      "post": {
        "description": "Set new password using reset token",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.SetPasswordRequest"
              }
            }
          },
          "description": "New password",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Change password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/:app_id/auth/login": {
      "post": {
        "description": "Authenticates a user and returns access token",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.LoginRequest"
              }
            }
          },
          "description": "Login credentials",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Login user",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/:app_id/auth/refresh": {
      "post": {
        "description": "Get new access token using refresh token",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.RefreshTokenRequest"
              }
            }
          },
          "description": "Refresh token",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.Credentials"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Invalid refresh token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Refresh token",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/:app_id/auth/reset-password": {
      "post": {
        "description": "Generate a password reset link",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.ResetPasswordRequest"
              }
            }
          },
          "description": "Email address",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reset password link created and sent via email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Create password reset link",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/:app_id/auth/signup": {
      "post": {
        "description": "Register a new user account",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.RegisterRequest"
              }
            }
          },
          "description": "User registration details",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Register new user",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/:app_id/auth/verify-email": {
      "post": {
        "description": "Generate an email verification link",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.SendVerificationEmailRequest"
              }
            }
          },
          "description": "Email address",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Email verification link created and sent via email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Create email verification link",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/:app_id/auth/verify-email-token": {
      "post": {
        "description": "Verify user's email address",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.VerifyEmailRequest"
              }
            }
          },
          "description": "Email verification token",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_tokens.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Verify email",
        "tags": [
          "Auth"
        ]
      }
    },
    "/api/v1/{app_id}/attributes": {
      "get": {
        "description": "Retrieves a paginated list of attributes for a given application ID. Supports filtering by template key and searching by attribute name.",
        "parameters": [
          {
            "description": "Application ID",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number for pagination",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Number of items per page",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "description": "Filter by attribute template key",
            "in": "query",
            "name": "template_key",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Search term for attribute name",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-Attribute"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          }
        },
        "summary": "List attributes for an application",
        "tags": [
          "Attributes"
        ]
      }
    },
    "/api/v1/{app_id}/attributes/{attribute_id}": {
      "get": {
        "description": "Retrieves a specific attribute by its ID for a given application ID.",
        "parameters": [
          {
            "description": "Application ID",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Attribute ID",
            "in": "path",
            "name": "attribute_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested attribute",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attribute"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "404": {
            "description": "Attribute not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          }
        },
        "summary": "Get a single attribute",
        "tags": [
          "Attributes"
        ]
      }
    },
    "/api/v1/{app_id}/carts": {
      "get": {
        "description": "Returns a paginated list of saved external cart references for the authenticated user.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number (default: 1, minimum: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page (default: 20, minimum: 1, maximum: 100)",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of carts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-github_com_enadhq_koopa-key_internal_pkg_server_models_CartResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "List saved carts for authenticated user",
        "tags": [
          "Cart"
        ]
      },
      "post": {
        "description": "Save an external cart ID for the authenticated user so it can be resumed later.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CreateCartRequest"
              }
            }
          },
          "description": "Cart creation data",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CartResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate cart",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Save a new cart reference",
        "tags": [
          "Cart"
        ]
      }
    },
    "/api/v1/{app_id}/carts/{id}": {
      "delete": {
        "description": "Remove a saved cart reference for the authenticated user.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the saved cart entry",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Cart not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Delete a saved cart",
        "tags": [
          "Cart"
        ]
      }
    },
    "/api/v1/{app_id}/files/{file_id}": {
      "delete": {
        "description": "Deletes a file by its ID",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the file to delete",
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_files.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete a file",
        "tags": [
          "Files"
        ]
      },
      "patch": {
        "description": "Updates file metadata without re-uploading the file. Only provided fields are updated.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the file",
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_files.PatchFileRequest"
              }
            }
          },
          "description": "Fields to update",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.File"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Patch file metadata",
        "tags": [
          "Files"
        ]
      }
    },
    "/api/v1/{app_id}/files/upload": {
      "post": {
        "description": "Uploads a file as base64 and optionally links it to users or organisations",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_files.UploadFileRequest"
              }
            }
          },
          "description": "File upload data",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.File"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Upload a file",
        "tags": [
          "Files"
        ]
      }
    },
    "/api/v1/{app_id}/lookup/orders": {
      "get": {
        "description": "List all orders for the app with filtering and pagination (max 50 per page). Authenticated via service token.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Limit for pagination (default: 50, max: 50)",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Page number for pagination (default: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Filter by customer email (billing or shipping address)",
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by order reference",
            "in": "query",
            "name": "reference",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by product SKU (product_number) in order lines",
            "in": "query",
            "name": "product_sku",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by variant SKU (variant_number) in order lines",
            "in": "query",
            "name": "variant_sku",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter orders created after this timestamp (RFC3339)",
            "in": "query",
            "name": "created_after",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ListAllOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "List all orders for an app",
        "tags": [
          "Orders"
        ]
      }
    },
    "/api/v1/{app_id}/lookup/orders/{id}": {
      "get": {
        "description": "Get a single order by ID with full product and variant data. Authenticated via service token.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the order",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Get order by ID for an app",
        "tags": [
          "Orders"
        ]
      }
    },
    "/api/v1/{app_id}/lookup/orders/reference/{reference}": {
      "get": {
        "description": "Get a single order by reference with full product and variant data. Authenticated via service token.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Order reference",
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Get order by reference for an app",
        "tags": [
          "Orders"
        ]
      }
    },
    "/api/v1/{app_id}/lookup/organisations/{organisation-number}": {
      "get": {
        "description": "Get a single organisation that the user is related to",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Organisation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get organisation by organisation number",
        "tags": [
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/lookup/user": {
      "post": {
        "description": "Lookup user by email",
        "parameters": [
          {
            "description": "uuid of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only count orders created after this date (YYYY-MM-DD)",
            "in": "query",
            "name": "order_after",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User object with order count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.LookupEmailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "User dosn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Lookup user by email",
        "tags": [
          "Users"
        ]
      }
    },
    "/api/v1/{app_id}/orders": {
      "get": {
        "description": "List all orders for the authenticated user with pagination, ordered by created_at DESC",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Limit for pagination (default: 20, max: 20)",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Page number for pagination (default: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ListOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "List orders for authenticated user",
        "tags": [
          "Orders"
        ]
      }
    },
    "/api/v1/{app_id}/orders/{id}": {
      "get": {
        "description": "Get a single order by ID for the authenticated user with full product and variant data",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the order",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Get order by ID for authenticated user",
        "tags": [
          "Orders"
        ]
      }
    },
    "/api/v1/{app_id}/orders/reference/{reference}": {
      "get": {
        "description": "Get a single order by reference for the authenticated user with full product and variant data",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Order reference",
            "in": "path",
            "name": "reference",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Get order by reference for authenticated user",
        "tags": [
          "Orders"
        ]
      }
    },
    "/api/v1/{app_id}/organisations": {
      "get": {
        "description": "List all organisations for the current user",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number for pagination. If not provided, all organisations are returned.",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page. Max 20. If not provided, all organisations are returned.",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Search query for organisation name and number",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ListOrganisationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List organisations",
        "tags": [
          "Organisations"
        ]
      },
      "post": {
        "description": "Register a new organisation and attach the current logged in users to the organisation",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.RegisterCompanyRequest"
              }
            }
          },
          "description": "User registration details",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Register new organisation",
        "tags": [
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/organisations/{id}": {
      "delete": {
        "description": "Delete an organisation",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_organisations.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete organisation",
        "tags": [
          "Organisations"
        ]
      },
      "get": {
        "description": "Get a single organisation that the user is related to",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Organisation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get organisation",
        "tags": [
          "Organisations"
        ]
      },
      "patch": {
        "description": "Update specific fields of an organisation",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyPatchRequest"
              }
            }
          },
          "description": "Fields to update",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Organisation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Patch organisation",
        "tags": [
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/organisations/{id}/tree": {
      "get": {
        "description": "Get the tree of organisations that the requested organisation is part of",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationTreeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Organisation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get organisation tree",
        "tags": [
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/organisations/{id}/users": {
      "get": {
        "description": "Get a paginated list of users belonging to a specific organisation with optional search on first_name, last_name, and email.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number for pagination",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "description": "Number of items per page",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "description": "Search query for first_name, last_name, and email",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-github_com_enadhq_koopa-key_internal_pkg_server_models_User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Organisation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List users for an organisation",
        "tags": [
          "Organisations"
        ]
      },
      "post": {
        "description": "Adds a user to an organisation with default level. Only admins can perform this action.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/internal_pkg_server_domains_organisations.AddUserToOrganisationRequest"
              }
            }
          },
          "description": "User ID to add",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_organisations.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add user to organisation",
        "tags": [
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/organisations/{id}/users/{user_id}": {
      "delete": {
        "description": "Removes a user from an organisation. Only admins can perform this action.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the organisation",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the user to remove",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/internal_pkg_server_domains_organisations.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Remove user from organisation",
        "tags": [
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/organisations/{organisation_id}/attributes/{attribute_id}": {
      "delete": {
        "description": "Disassociates an attribute from a specific organisation.",
        "parameters": [
          {
            "description": "Application ID",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Organisation ID",
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Attribute ID",
            "in": "path",
            "name": "attribute_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated organisation object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "404": {
            "description": "Organisation or Attribute relationship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          }
        },
        "summary": "Remove attribute relationship from an organisation",
        "tags": [
          "Attributes",
          "Organisations"
        ]
      },
      "post": {
        "description": "Associates an attribute with a specific organisation.",
        "parameters": [
          {
            "description": "Application ID",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Organisation ID",
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Attribute ID",
            "in": "path",
            "name": "attribute_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated organisation object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "404": {
            "description": "Organisation or Attribute not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          }
        },
        "summary": "Add attribute relationship to an organisation",
        "tags": [
          "Attributes",
          "Organisations"
        ]
      }
    },
    "/api/v1/{app_id}/shared/wishlists/{token}": {
      "get": {
        "description": "View a wishlist using a share token. Requires api-key for server verification. Returns paginated items.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Share token",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number (default: 1, minimum: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page (default: 20, minimum: 1, maximum: 100)",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistWithItemsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found or token expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "summary": "Get shared wishlist (paginated)",
        "tags": [
          "Wishlist"
        ]
      }
    },
    "/api/v1/{app_id}/user": {
      "delete": {
        "description": "Deletes the current user's account, with optional soft delete that anonymizes the data",
        "parameters": [
          {
            "description": "uuid of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete current user",
        "tags": [
          "Users"
        ]
      },
      "get": {
        "description": "Gets the user from the token",
        "parameters": [
          {
            "description": "uuid of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Gets the user from the token",
        "tags": [
          "Users"
        ]
      },
      "patch": {
        "description": "Updates the user information for the authenticated user",
        "parameters": [
          {
            "description": "uuid of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.UpdateUserRequest"
              }
            }
          },
          "description": "User update data",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated user object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Updates the user information",
        "tags": [
          "Users"
        ]
      }
    },
    "/api/v1/{app_id}/users/{user_id}": {
      "get": {
        "description": "Get a user by their ID within the same app",
        "parameters": [
          {
            "description": "uuid of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "uuid of the user",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get user by ID",
        "tags": [
          "Users"
        ]
      }
    },
    "/api/v1/{app_id}/users/{user_id}/attributes/{attribute_id}": {
      "delete": {
        "description": "Disassociates an attribute from a specific user.",
        "parameters": [
          {
            "description": "Application ID",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Attribute ID",
            "in": "path",
            "name": "attribute_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated user object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "404": {
            "description": "User or Attribute relationship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          }
        },
        "summary": "Remove attribute relationship from a user",
        "tags": [
          "Attributes",
          "Users"
        ]
      },
      "post": {
        "description": "Associates an attribute with a specific user.",
        "parameters": [
          {
            "description": "Application ID",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "User ID",
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Attribute ID",
            "in": "path",
            "name": "attribute_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The updated user object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "404": {
            "description": "User or Attribute not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError"
                }
              }
            }
          }
        },
        "summary": "Add attribute relationship to a user",
        "tags": [
          "Attributes",
          "Users"
        ]
      }
    },
    "/api/v1/{app_id}/wishlists": {
      "get": {
        "description": "Returns a paginated list of wishlists for the authenticated user. The total_items count reflects the filtered results (if applied).",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter wishlists by name",
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number (default: 1, minimum: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page (default: 20, minimum: 1, maximum: 100)",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of wishlists with metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-github_com_enadhq_koopa-key_internal_pkg_server_models_WishlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "List wishlists for authenticated user",
        "tags": [
          "Wishlist"
        ]
      },
      "post": {
        "description": "Create a new empty wishlist for the authenticated user",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CreateWishlistRequest"
              }
            }
          },
          "description": "Wishlist creation data",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Create a new wishlist",
        "tags": [
          "Wishlist"
        ]
      }
    },
    "/api/v1/{app_id}/wishlists/{id}": {
      "delete": {
        "description": "Delete a wishlist for the authenticated user",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Delete wishlist",
        "tags": [
          "Wishlist"
        ]
      },
      "get": {
        "description": "Returns a wishlist with paginated wishlist items.",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number (default: 1, minimum: 1)",
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page (default: 20, minimum: 1, maximum: 100)",
            "in": "query",
            "name": "per_page",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistWithItemsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Get a particular wishlist with items.",
        "tags": [
          "Wishlist"
        ]
      },
      "patch": {
        "description": "Update wishlist details for the authenticated user",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.UpdateWishlistRequest"
              }
            }
          },
          "description": "Wishlist update data",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Update wishlist",
        "tags": [
          "Wishlist"
        ]
      }
    },
    "/api/v1/{app_id}/wishlists/{id}/items": {
      "delete": {
        "description": "Remove one or more items from a wishlist for the authenticated user",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.DeleteWishlistItemsRequest"
              }
            }
          },
          "description": "Items to remove",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Items removed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Remove items from wishlist",
        "tags": [
          "Wishlist"
        ]
      },
      "post": {
        "description": "Add one or more items to a wishlist for the authenticated user",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.AddWishlistItemsRequest"
              }
            }
          },
          "description": "Items to add",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Items added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Add items to wishlist",
        "tags": [
          "Wishlist"
        ]
      }
    },
    "/api/v1/{app_id}/wishlists/{id}/share": {
      "post": {
        "description": "Generate a shareable token for a wishlist. Returns existing valid token if one exists (otherwise creates a new one). The expires_at field is optional (can be null for no expiration, or a timestamp).",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CreateWishlistShareRequest"
              }
            }
          },
          "description": "Share token request (expires_at can be null or a timestamp)",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistShareTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or expiration time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Create or get share token for wishlist",
        "tags": [
          "Wishlist"
        ]
      }
    },
    "/api/v1/{app_id}/wishlists/{id}/share/{token}": {
      "delete": {
        "description": "Revoke a shareable token for a wishlist",
        "parameters": [
          {
            "description": "UUID of the app",
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the wishlist",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Token to revoke",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Share token deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Message"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "404": {
            "description": "Wishlist not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Revoke wishlist share token",
        "tags": [
          "Wishlist"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "//customers.enad.io"
    }
  ],
  "components": {
    "schemas": {
      "Attribute": {
        "description": "Attribute represents a product attribute with its complete information.",
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "template_key": {
            "type": "string"
          },
          "translations": {
            "$ref": "#/components/schemas/AttributeTranslations"
          },
          "values": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/AttributeValue"
              },
              "type": "array"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "AttributeTranslations": {
        "description": "AttributeTranslations contains translations for attribute names and descriptions.",
        "properties": {
          "description": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "AttributeValue": {
        "description": "AttributeValue represents an attribute value with its translations and type.",
        "properties": {
          "translations": {
            "$ref": "#/components/schemas/AttributeValueTranslations"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AttributeValueTranslations": {
        "description": "AttributeValueTranslations contains translations for attribute values in different languages.",
        "properties": {
          "value": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.AddWishlistItemsRequest": {
        "properties": {
          "product_ids": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "product_ids"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.Address": {
        "properties": {
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "zip_code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.AddressPatch": {
        "properties": {
          "city": {
            "type": "string"
          },
          "co_address": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "house_number": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "state_province": {
            "type": "string"
          },
          "street_address": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.BrandResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "variant": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CartResponse": {
        "properties": {
          "cart_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CommunicationPreferences": {
        "properties": {
          "allow_email": {
            "type": "boolean"
          },
          "allow_postal": {
            "type": "boolean"
          },
          "allow_sms": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.Company": {
        "properties": {
          "app_id": {
            "type": "string"
          },
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "type": "array"
          },
          "billing_address": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddress"
            },
            "type": "array"
          },
          "comment": {
            "type": "string"
          },
          "contact_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "credit_check": {
            "type": "boolean"
          },
          "custom_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "email": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.File"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "invoice_email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisation_number": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "shipping_address": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddress"
            },
            "type": "array"
          },
          "status": {
            "type": "string"
          },
          "store_groups": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.StoreGroup"
            },
            "type": "array"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Tag"
            },
            "type": "array"
          },
          "tax_id_vat_number": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddress": {
        "properties": {
          "city": {
            "type": "string"
          },
          "co_address": {
            "type": "string"
          },
          "company_id": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "house_number": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "shipping_type": {
            "type": "string"
          },
          "state_province": {
            "type": "string"
          },
          "street_address": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddressRequest": {
        "properties": {
          "city": {
            "type": "string"
          },
          "co_address": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "house_number": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "shipping_type": {
            "type": "string"
          },
          "state_province": {
            "type": "string"
          },
          "street_address": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyPatchRequest": {
        "properties": {
          "attribute_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "billing_addresses": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.AddressPatch"
            },
            "type": "array"
          },
          "comment": {
            "type": "string"
          },
          "contact_name": {
            "type": "string"
          },
          "credit_check": {
            "type": "boolean"
          },
          "custom_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "email": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "invoice_email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisation_number": {
            "description": "Sending organisation_number:null will set the organisation number to null. Omit to not update field",
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "shipping_addresses": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.AddressPatch"
            },
            "type": "array"
          },
          "status": {
            "enum": [
              "active",
              "pending"
            ],
            "type": "string"
          },
          "store_groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tax_id_vat_number": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CreateCartRequest": {
        "properties": {
          "cart_id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "cart_id",
          "source"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CreateWishlistRequest": {
        "properties": {
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.CreateWishlistShareRequest": {
        "properties": {
          "expires_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.DeleteWishlistItemsRequest": {
        "properties": {
          "product_ids": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "product_ids"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.File": {
        "properties": {
          "app_id": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "custom_fields": {
            "additionalProperties": {},
            "type": "object"
          },
          "filename": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationResponse": {
        "properties": {
          "company": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Company"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.GetOrganisationTreeResponse": {
        "properties": {
          "companyTree": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationTree"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.ImageResponse": {
        "properties": {
          "alt_text": {
            "type": "string"
          },
          "blurhash": {
            "type": "string"
          },
          "custom": {
            "additionalProperties": {},
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.ListAllOrdersResponse": {
        "properties": {
          "limit": {
            "type": "integer"
          },
          "orders": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.ListOrdersResponse": {
        "properties": {
          "limit": {
            "type": "integer"
          },
          "orders": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.ListOrganisationsResponse": {
        "properties": {
          "companies": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationWithUserRelation"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.LoginRequest": {
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.LookupEmailResponse": {
        "properties": {
          "orders_count": {
            "type": "integer"
          },
          "user": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.Message": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.OrderLineResponse": {
        "properties": {
          "base_price_amount": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "currency_code": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ProductResponse"
          },
          "product_id": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "tax_group_id": {
            "type": "string"
          },
          "total_discount_amount": {
            "type": "number"
          },
          "total_price_amount": {
            "type": "number"
          },
          "total_sale_price": {
            "type": "number"
          },
          "total_tax_amount": {
            "type": "number"
          },
          "updated_at": {
            "type": "string"
          },
          "variant": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.VariantResponse"
          },
          "variant_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.OrderResponse": {
        "properties": {
          "app_id": {
            "type": "string"
          },
          "billing_address": {
            "type": "string"
          },
          "bonus_total": {
            "type": "number"
          },
          "country_code": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "currency_code": {
            "type": "string"
          },
          "discount_total": {
            "type": "number"
          },
          "gift_card_total": {
            "type": "number"
          },
          "grand_total": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "language_code": {
            "type": "string"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrderLineResponse"
            },
            "type": "array"
          },
          "merchant_user_id": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "payment_method_id": {
            "type": "string"
          },
          "payment_method_name": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "shipping_address": {
            "type": "string"
          },
          "shipping_methods": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "shipping_total": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "sub_total": {
            "type": "number"
          },
          "tax_total": {
            "type": "number"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationTree": {
        "properties": {
          "app_id": {
            "type": "string"
          },
          "children": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationTree"
            },
            "type": "array"
          },
          "comment": {
            "type": "string"
          },
          "contact_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "credit_check": {
            "type": "boolean"
          },
          "custom_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "email": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoice_email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisation_number": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tax_id_vat_number": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationWithUserRelation": {
        "properties": {
          "app_id": {
            "type": "string"
          },
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "type": "array"
          },
          "billing_address": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddress"
            },
            "type": "array"
          },
          "comment": {
            "type": "string"
          },
          "contact_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "credit_check": {
            "type": "boolean"
          },
          "custom_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "email": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.File"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "invoice_email": {
            "type": "string"
          },
          "level": {
            "description": "Can be null when a child organisation is without this user relation",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisation_number": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "role": {
            "description": "Can be null when a child organisation is without this user relation",
            "type": "string"
          },
          "role_name": {
            "description": "Can be null when a child organisation is without this user relation",
            "type": "string"
          },
          "shipping_address": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddress"
            },
            "type": "array"
          },
          "status": {
            "type": "string"
          },
          "store_groups": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.StoreGroup"
            },
            "type": "array"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Tag"
            },
            "type": "array"
          },
          "tax_id_vat_number": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-Attribute": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_items": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-github_com_enadhq_koopa-key_internal_pkg_server_models_CartResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CartResponse"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_items": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-github_com_enadhq_koopa-key_internal_pkg_server_models_User": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_items": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.PaginatedResponse-github_com_enadhq_koopa-key_internal_pkg_server_models_WishlistResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistResponse"
            },
            "type": "array"
          },
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_items": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.ProductResponse": {
        "properties": {
          "brand": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.BrandResponse"
          },
          "created_at": {
            "type": "string"
          },
          "custom": {
            "additionalProperties": {},
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "html_description": {
            "type": "string"
          },
          "html_short_description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ImageResponse"
            },
            "type": "array"
          },
          "product_name": {
            "type": "string"
          },
          "product_number": {
            "type": "string"
          },
          "short_description": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "translations_description": {
            "additionalProperties": {},
            "type": "object"
          },
          "translations_html_description": {
            "additionalProperties": {},
            "type": "object"
          },
          "translations_html_short_description": {
            "additionalProperties": {},
            "type": "object"
          },
          "translations_short_description": {
            "additionalProperties": {},
            "type": "object"
          },
          "translations_slug": {
            "additionalProperties": {},
            "type": "object"
          },
          "updated_at": {
            "type": "string"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.VariantResponse"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.RefreshTokenRequest": {
        "properties": {
          "refresh_token": {
            "type": "string"
          }
        },
        "required": [
          "refresh_token"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.RegisterCompanyRequest": {
        "properties": {
          "attribute_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "billing_address": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddressRequest"
            },
            "type": "array"
          },
          "comment": {
            "type": "string"
          },
          "contact_name": {
            "type": "string"
          },
          "credit_check": {
            "type": "boolean"
          },
          "custom_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "customer_role": {
            "description": "The role asigned to the signed in user in the organisation and user relationship. The slug of the custom role",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "external_ref": {
            "type": "string"
          },
          "invoice_email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisation_number": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "shipping_address": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CompanyAddressRequest"
            },
            "type": "array"
          },
          "status": {
            "enum": [
              "active",
              "pending"
            ],
            "type": "string"
          },
          "store_groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tax_id_vat_number": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "status",
          "user_id"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.RegisterRequest": {
        "properties": {
          "allow_email_notifications": {
            "type": "boolean"
          },
          "allow_phone_notifications": {
            "type": "boolean"
          },
          "allow_postal_notifications": {
            "type": "boolean"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "language": {
            "description": "should be either \"en\" or \"en-gb\"",
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "market": {
            "type": "string"
          },
          "password": {
            "minLength": 8,
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "pending"
            ],
            "type": "string"
          },
          "store_group": {
            "type": "string"
          },
          "street": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.StoreGroup": {
        "properties": {
          "country_of_sale": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "store_type": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.Tag": {
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.UpdateUserRequest": {
        "properties": {
          "allow_email_notifications": {
            "type": "boolean"
          },
          "allow_phone_notifications": {
            "type": "boolean"
          },
          "allow_postal_notifications": {
            "type": "boolean"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "country_code": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "market": {
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "postal_code": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive",
              "pending"
            ],
            "type": "string"
          },
          "store_group": {
            "type": "string"
          },
          "street": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.UpdateWishlistRequest": {
        "properties": {
          "is_default": {
            "type": "boolean"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.User": {
        "properties": {
          "additions": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "address": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Address"
          },
          "app_id": {
            "type": "string"
          },
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "type": "array"
          },
          "communication_preferences": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.CommunicationPreferences"
          },
          "created_at": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "email_verified": {
            "type": "boolean"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.File"
            },
            "type": "array"
          },
          "first_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_super_admin": {
            "type": "boolean"
          },
          "language": {
            "type": "string"
          },
          "last_login_at": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "market": {
            "type": "string"
          },
          "market_currency": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "organisations": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.OrganisationWithUserRelation"
            },
            "type": "array"
          },
          "phone_number": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "store_group": {
            "type": "string"
          },
          "store_group_id": {
            "type": "string"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.Tag"
            },
            "type": "array"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.VariantPriceResponse": {
        "properties": {
          "amount_cents_with_tax": {
            "type": "integer"
          },
          "country_codes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "market_id": {
            "type": "string"
          },
          "market_slug": {
            "type": "string"
          },
          "on_sale": {
            "type": "boolean"
          },
          "reference_price": {
            "type": "integer"
          },
          "sale_end_date": {
            "type": "string"
          },
          "sale_price_with_tax": {
            "type": "integer"
          },
          "sale_start_date": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "store_group": {
            "type": "string"
          },
          "store_group_slug": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "variant_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.VariantResponse": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "images": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ImageResponse"
            },
            "type": "array"
          },
          "prices": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.VariantPriceResponse"
            },
            "type": "array"
          },
          "product_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "translations_name": {
            "additionalProperties": {},
            "type": "object"
          },
          "updated_at": {
            "type": "string"
          },
          "validate_stock": {
            "type": "boolean"
          },
          "variant_name": {
            "type": "string"
          },
          "variant_number": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistItemResponse": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.ProductResponse"
          },
          "product_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistResponse": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "item_count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistShareTokenResponse": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "wishlist_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistWithItemsResponse": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.WishlistItemResponse"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_items": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          },
          "updated_at": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_web.ErrorMessage": {
        "properties": {
          "details": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_web.HttpError": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_web.Status"
          },
          "details": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "extra_fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_web.Message": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "github_com_enadhq_koopa-key_internal_pkg_server_web.Status": {
        "enum": [
          201,
          403,
          401,
          500,
          404,
          400,
          409
        ],
        "type": "integer",
        "x-enum-varnames": [
          "StatusCreated",
          "StatusForbidden",
          "StatusNotAuthorized",
          "StatusInternalError",
          "StatusNotFound",
          "StatusBadRequest",
          "StatusConflict"
        ]
      },
      "internal_pkg_server_domains_files.Message": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "internal_pkg_server_domains_files.PatchFileRequest": {
        "properties": {
          "custom_fields": {
            "additionalProperties": {},
            "type": "object"
          },
          "order_reference": {
            "type": "string"
          },
          "organisation_number": {
            "type": "string"
          },
          "relationship_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "internal_pkg_server_domains_files.UploadFileRequest": {
        "properties": {
          "base64_encoded_image": {
            "type": "string"
          },
          "custom_fields": {
            "additionalProperties": {},
            "type": "object"
          },
          "filename": {
            "type": "string"
          },
          "order_reference": {
            "type": "string"
          },
          "organisation_number": {
            "type": "string"
          },
          "relationship_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "base64_encoded_image"
        ],
        "type": "object"
      },
      "internal_pkg_server_domains_organisations.AddUserToOrganisationRequest": {
        "properties": {
          "level": {
            "enum": [
              "admin",
              "default"
            ],
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          }
        },
        "required": [
          "level",
          "role",
          "user_id"
        ],
        "type": "object"
      },
      "internal_pkg_server_domains_organisations.Message": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.Credentials": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "refresh_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.LoginResponse": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "refresh_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/github_com_enadhq_koopa-key_internal_pkg_server_models.User"
          }
        },
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.Message": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.ResetPasswordRequest": {
        "properties": {
          "email": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.SendVerificationEmailRequest": {
        "properties": {
          "email": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.SetPasswordRequest": {
        "properties": {
          "password": {
            "minLength": 8,
            "type": "string"
          },
          "reset_password_token": {
            "type": "string"
          }
        },
        "required": [
          "password",
          "reset_password_token"
        ],
        "type": "object"
      },
      "internal_pkg_server_domains_tokens.VerifyEmailRequest": {
        "properties": {
          "email_verification_token": {
            "type": "string"
          }
        },
        "required": [
          "email_verification_token"
        ],
        "type": "object"
      }
    }
  }
}
