{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "BillingServ API V2",
    "description": "Resources and tools for developers to integrate with the BillingServ v2 API, including customer management, domain availability, hosted checkout, billing, and service operations. Authenticated API responses include X-Request-ID and X-API-Version: 2 headers, and rate-limited endpoints expose standard rate-limit headers and return 429 when a limit is exceeded. Clients may provide X-Request-ID for request correlation. The supported idempotent write operations accept Idempotency-Key. Internal service-to-service routes are intentionally excluded from this public contract. v1 is deprecated; use the v2 base URL and bearer-token authentication unless an endpoint states otherwise.",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://demo.onlinebillingform.com/api/v2",
      "description": "BillingServ demo API"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Customer"
    },
    {
      "name": "Package"
    },
    {
      "name": "Group"
    },
    {
      "name": "Country"
    },
    {
      "name": "County"
    },
    {
      "name": "VPN"
    },
    {
      "name": "Invoice"
    },
    {
      "name": "Order"
    },
    {
      "name": "Module"
    },
    {
      "name": "Report"
    },
    {
      "name": "Marketing"
    },
    {
      "name": "Setting"
    },
    {
      "name": "Checkout"
    },
    {
      "name": "Domain",
      "description": "Search enabled domain extensions and check domain availability."
    },
    {
      "name": "Usage"
    },
    {
      "name": "Support"
    },
    {
      "name": "Licensing"
    },
    {
      "name": "Webhooks",
      "description": "Outbound events sent by BillingServ to a configured customer endpoint."
    }
  ],
  "paths": {
    "/checkout/create": {
      "post": {
        "tags": [
          "Checkout"
        ],
        "summary": "Create hosted checkout link",
        "operationId": "POST_checkout_create",
        "description": "Creates a short-lived hosted checkout URL for a package, one domain, or up to 50 domain registrations. Use `package_id` with `cycle_id` for an existing package, `domain` with `years` for one domain, or `domains` for multiple domain registrations. `callback_url` is required. `customer_id` is optional; when supplied, it must reference a customer account (`account_type` 2). The checkout link is cached for 30 minutes. When the customer opens it, BillingServ creates a checkout-only session, allows supported saved payment methods, and redirects back to `callback_url` after payment.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedCheckoutResponse"
                },
                "example": {
                  "success": true,
                  "message": "Successfully",
                  "url": "https://demo.onlinebillingform.com/checkout/00000000-0000-0000-0000-000000000000"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain availability error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": [
                    "The requested domain is not available."
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          },
          "502": {
            "description": "The domain registrar could not confirm availability",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": [
                    "Unable to check domain availability right now."
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "description": "Provide exactly one checkout type: an existing package, one domain, or a list of domains.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CheckoutPackageRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDomainRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDomainsRequest"
                  }
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "description": "Provide exactly one checkout type: an existing package, one domain, or a list of domains.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CheckoutPackageRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDomainRequest"
                  },
                  {
                    "$ref": "#/components/schemas/CheckoutDomainsRequest"
                  }
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/domain/lookup": {
      "post": {
        "tags": [
          "Domain"
        ],
        "summary": "Check domain availability",
        "operationId": "POST_domain_lookup",
        "description": "Checks the configured registrar for the enabled domain extensions that match a name. Send the domain name without an extension, such as `billingserv`, to check up to 50 extensions. The endpoint is limited to 30 requests per minute per client.",
        "responses": {
          "200": {
            "description": "Availability results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainLookupResponse"
                },
                "example": {
                  "success": true,
                  "domain": "billingserv",
                  "registrar": "openprovider",
                  "results": [
                    {
                      "domain": "billingserv.co.uk",
                      "extension": "co.uk",
                      "available": true,
                      "premium": false
                    },
                    {
                      "domain": "billingserv.com",
                      "extension": "com",
                      "available": false,
                      "premium": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": [
                    "Enter a domain name without the extension, such as example."
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many domain availability requests. Retry after the rate limit window."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DomainLookupRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/DomainLookupRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/country/get": {
      "get": {
        "tags": [
          "Country"
        ],
        "summary": "Get country",
        "operationId": "GET_country_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get country. Review the response for the operation result or validation errors."
      }
    },
    "/country/lists": {
      "get": {
        "tags": [
          "Country"
        ],
        "summary": "List countries",
        "operationId": "GET_country_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "countries": {
                    "current_page": 1,
                    "data": [
                      {
                        "id": 1,
                        "name": "Afghanistan",
                        "iso2": "AF",
                        "iso3": "AFG",
                        "postcode_required": 0
                      }
                    ],
                    "last_page": 17,
                    "per_page": 15,
                    "total": 253
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list countries. Review the response for the operation result or validation errors."
      }
    },
    "/county/lists-by-country": {
      "get": {
        "tags": [
          "County"
        ],
        "summary": "List counties by country",
        "operationId": "GET_county_lists_by_country",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "country_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list counties by country. Review the response for the operation result or validation errors."
      }
    },
    "/customer/add-credit": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Add customer credit",
        "operationId": "POST_customer_add_credit",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "credit": {
                    "type": "number"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "credit"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "credit": {
                    "type": "number"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "credit"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to add customer credit. Review the response for the operation result or validation errors."
      }
    },
    "/customer/add-note": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Add customer note",
        "operationId": "POST_customer_add_note",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Customer note could not be saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "note"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "note"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to add customer note. Review the response for the operation result or validation errors."
      }
    },
    "/customer/check": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Check customer credentials and return an API token",
        "operationId": "POST_customer_check",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "user": {
                    "id": 1,
                    "name": "BillingServ Demo",
                    "username": "admin",
                    "email": "hello@baseserv.com",
                    "account_type": 1,
                    "live_api_token": "live_************************************"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "403": {
            "description": "The credentials belong to a non-customer account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": false,
                  "message": "This endpoint is only available to customer accounts."
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "username",
                  "password"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "username",
                  "password"
                ]
              }
            }
          }
        },
        "security": [],
        "description": "Use this BillingServ API endpoint to check customer credentials and return an API token. Review the response for the operation result or validation errors."
      }
    },
    "/customer/create": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Create customer",
        "operationId": "POST_customer_create",
        "responses": {
          "409": {
            "description": "Idempotency key conflict or request already in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "The selected country or county could not be found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "countryNotFound": {
                    "value": {
                      "success": false,
                      "errors": {
                        "country_id": "The selected country was not found."
                      },
                      "code": "country_not_found"
                    }
                  },
                  "countyNotFound": {
                    "value": {
                      "success": false,
                      "errors": {
                        "county_id": "The selected county was not found for this country."
                      },
                      "code": "county_not_found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Customer creation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Failed to create customer. Please try again later.",
                  "code": "customer_creation_failed"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "address_1": {
                    "type": "string"
                  },
                  "address_2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "county_id": {
                    "type": "integer"
                  },
                  "country_id": {
                    "type": "integer"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "fax": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  },
                  "credit": {
                    "type": "number"
                  },
                  "business_name": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "address_1",
                  "city",
                  "county_id",
                  "country_id",
                  "postal_code",
                  "phone",
                  "username",
                  "password"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "address_1": {
                    "type": "string"
                  },
                  "address_2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "county_id": {
                    "type": "integer"
                  },
                  "country_id": {
                    "type": "integer"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "fax": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  },
                  "credit": {
                    "type": "number"
                  },
                  "business_name": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "address_1",
                  "city",
                  "county_id",
                  "country_id",
                  "postal_code",
                  "phone",
                  "username",
                  "password"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create customer. Review the response for the operation result or validation errors."
      }
    },
    "/customer/delete": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Delete customer",
        "operationId": "POST_customer_delete",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Customer deletion failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete customer. Review the response for the operation result or validation errors."
      }
    },
    "/customer/delete-pay-method": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Delete customer payment method",
        "operationId": "POST_customer_delete_pay_method",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer or payment method not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Payment method could not be deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete customer payment method. Review the response for the operation result or validation errors."
      }
    },
    "/customer/get": {
      "get": {
        "tags": [
          "Customer"
        ],
        "summary": "Get customer",
        "operationId": "GET_customer_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get customer. Review the response for the operation result or validation errors."
      }
    },
    "/customer/get-credit": {
      "get": {
        "tags": [
          "Customer"
        ],
        "summary": "Get customer credit",
        "operationId": "GET_customer_get_credit",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get customer credit. Review the response for the operation result or validation errors."
      }
    },
    "/customer/lists": {
      "get": {
        "tags": [
          "Customer"
        ],
        "summary": "List customers",
        "operationId": "GET_customer_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "users": [
                    {
                      "id": 4,
                      "name": "Test User",
                      "username": "test@baseserv.com",
                      "email": "test@baseserv.com",
                      "account_type": 2,
                      "api_type": "sandbox",
                      "mailing_contact": {
                        "contact_name": "Test User",
                        "phone": "03302207048",
                        "email": "test@baseserv.com",
                        "city": "Test City",
                        "county_id": 1231,
                        "country_id": 81
                      }
                    }
                  ],
                  "pagination": {
                    "total": 1,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1,
                    "from": 1,
                    "to": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "description": "One of id, name, username, email, created_at, updated_at",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_dir",
            "in": "query",
            "required": false,
            "description": "asc or desc",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list customers. Review the response for the operation result or validation errors."
      }
    },
    "/customer/reset-password": {
      "get": {
        "tags": [
          "Customer"
        ],
        "summary": "Reset customer password",
        "operationId": "GET_customer_reset_password",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": false,
            "description": "Customer email address.",
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to reset customer password. Review the response for the operation result or validation errors."
      }
    },
    "/customer/update": {
      "post": {
        "tags": [
          "Customer"
        ],
        "summary": "Update customer",
        "operationId": "POST_customer_update",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Customer update failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "address_1": {
                    "type": "string"
                  },
                  "address_2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "county_id": {
                    "type": "integer"
                  },
                  "country_id": {
                    "type": "integer"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "fax": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  },
                  "credit": {
                    "type": "number"
                  },
                  "business_name": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  },
                  "vat": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "name",
                  "address_1",
                  "city",
                  "county_id",
                  "country_id",
                  "postal_code",
                  "phone",
                  "username"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "address_1": {
                    "type": "string"
                  },
                  "address_2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "county_id": {
                    "type": "integer"
                  },
                  "country_id": {
                    "type": "integer"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "fax": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  },
                  "credit": {
                    "type": "number"
                  },
                  "business_name": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  },
                  "vat": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "name",
                  "address_1",
                  "city",
                  "county_id",
                  "country_id",
                  "postal_code",
                  "phone",
                  "username"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update customer. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/accept-quote": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Accept quote",
        "operationId": "POST_invoice_accept_quote",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Quote not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to accept quote. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/capture-payment": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Capture invoice payment",
        "operationId": "POST_invoice_capture_payment",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "The invoice cannot be captured, for example because it is in a trial period",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to capture invoice payment. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/create-invoice": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Create invoice",
        "operationId": "POST_invoice_create_invoice",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "409": {
            "description": "Idempotency key conflict or request already in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "The customer does not have a usable mailing address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Customer mailing address is missing, incomplete, or invalid.",
                  "code": "customer_address_missing"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not available to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "customer_id": "The customer is not available to this API account."
                  },
                  "code": "customer_not_found"
                }
              }
            }
          },
          "500": {
            "description": "Invoice creation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Failed to create invoice. Please try again later.",
                  "code": "invoice_creation_failed"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "duedate": {
                    "type": "string",
                    "description": "Format: MM-DD-YYYY."
                  },
                  "customer_id": {
                    "type": "integer"
                  },
                  "comments": {
                    "type": "string"
                  },
                  "record": {
                    "$ref": "#/components/schemas/InvoiceRecordRequest"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "duedate",
                  "customer_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "duedate": {
                    "type": "string",
                    "description": "Format: MM-DD-YYYY."
                  },
                  "customer_id": {
                    "type": "integer"
                  },
                  "comments": {
                    "type": "string"
                  },
                  "record.item": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.description": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.price": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.quantity": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.tax_class": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.tax": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "duedate",
                  "customer_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create invoice. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/create-quote": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Create quote",
        "operationId": "POST_invoice_create_quote",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "409": {
            "description": "Idempotency key conflict or request already in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "The customer does not have a usable mailing address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Customer mailing address is missing, incomplete, or invalid.",
                  "code": "customer_address_missing"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found or not available to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "customer_id": "The customer is not available to this API account."
                  },
                  "code": "customer_not_found"
                }
              }
            }
          },
          "500": {
            "description": "Quote creation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Failed to create quote. Please try again later.",
                  "code": "quote_creation_failed"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "duedate": {
                    "type": "string",
                    "description": "Format: MM-DD-YYYY."
                  },
                  "customer_id": {
                    "type": "integer"
                  },
                  "comments": {
                    "type": "string"
                  },
                  "record": {
                    "$ref": "#/components/schemas/InvoiceRecordRequest"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "duedate",
                  "customer_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "duedate": {
                    "type": "string",
                    "description": "Format: MM-DD-YYYY."
                  },
                  "customer_id": {
                    "type": "integer"
                  },
                  "comments": {
                    "type": "string"
                  },
                  "record.item": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.description": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.price": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.quantity": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.tax_class": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.tax": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "duedate",
                  "customer_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create quote. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/delete-invoice": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Delete invoice",
        "operationId": "POST_invoice_delete_invoice",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete invoice. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/delete-quote": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Delete quote",
        "operationId": "POST_invoice_delete_quote",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Quote not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete quote. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/get-payment-method": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get invoice payment method",
        "operationId": "GET_invoice_get_payment_method",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invoice_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get invoice payment method. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/get-transactions": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get invoice transactions",
        "operationId": "GET_invoice_get_transactions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invoice_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get invoice transactions. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/lists": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "List invoices",
        "operationId": "GET_invoice_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 271,
                      "customer_id": 4,
                      "invoice_number": 248524,
                      "total": 145,
                      "credit": 0,
                      "status": "1",
                      "due_at": "2023-10-21T21:00:00.000000Z",
                      "estimate": false,
                      "tax": 0
                    }
                  ],
                  "meta": {
                    "current_page": 1,
                    "last_page": 4,
                    "per_page": 15,
                    "total": 46
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": true,
            "description": "One of UNPAID, PAID, OVERDUE, REFUNDED, CANCELED, PENDING, ALL",
            "schema": {
              "type": "string",
              "enum": [
                "UNPAID",
                "PAID",
                "OVERDUE",
                "REFUNDED",
                "CANCELED",
                "PENDING",
                "ALL"
              ],
              "description": "One of UNPAID, PAID, OVERDUE, REFUNDED, CANCELED, PENDING, ALL"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list invoices. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/send-invoice": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Send invoice",
        "operationId": "POST_invoice_send_invoice",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to send invoice. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/send-invoice-reminder": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Send invoice reminder",
        "operationId": "POST_invoice_send_invoice_reminder",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to send invoice reminder. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/update-invoice": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Update invoice",
        "operationId": "POST_invoice_update_invoice",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "409": {
            "description": "Idempotency key conflict or request already in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Customer or invoice not found or not available to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "customerNotFound": {
                    "value": {
                      "success": false,
                      "errors": {
                        "customer_id": "The customer is not available to this API account."
                      },
                      "code": "customer_not_found"
                    }
                  },
                  "invoiceNotFound": {
                    "value": {
                      "success": false,
                      "errors": "Invoice ID: 123 not found.",
                      "code": "invoice_not_found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Invoice update failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Failed to update invoice. Please try again later.",
                  "code": "invoice_update_failed"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  },
                  "duedate": {
                    "type": "string",
                    "description": "Format: MM-DD-YYYY."
                  },
                  "customer_id": {
                    "type": "integer"
                  },
                  "comments": {
                    "type": "string"
                  },
                  "record": {
                    "$ref": "#/components/schemas/InvoiceRecordRequest"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id",
                  "duedate",
                  "customer_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  },
                  "duedate": {
                    "type": "string",
                    "description": "Format: MM-DD-YYYY."
                  },
                  "customer_id": {
                    "type": "integer"
                  },
                  "comments": {
                    "type": "string"
                  },
                  "record.item": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.description": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.price": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.quantity": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.tax_class": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "record.tax": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id",
                  "duedate",
                  "customer_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update invoice. Review the response for the operation result or validation errors."
      }
    },
    "/invoice/update-transaction": {
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Update invoice transaction",
        "operationId": "POST_invoice_update_transaction",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  },
                  "transaction_id": {
                    "type": "integer"
                  },
                  "gateway_id": {
                    "type": "integer"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "status": {
                    "type": "integer"
                  },
                  "message": {
                    "type": "string"
                  },
                  "json_response": {
                    "type": "string"
                  },
                  "transaction_key": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id",
                  "transaction_id",
                  "amount",
                  "status"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "type": "integer"
                  },
                  "transaction_id": {
                    "type": "integer"
                  },
                  "gateway_id": {
                    "type": "integer"
                  },
                  "amount": {
                    "type": "number"
                  },
                  "status": {
                    "type": "integer"
                  },
                  "message": {
                    "type": "string"
                  },
                  "json_response": {
                    "type": "string"
                  },
                  "transaction_key": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "invoice_id",
                  "transaction_id",
                  "amount",
                  "status"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update invoice transaction. Review the response for the operation result or validation errors."
      }
    },
    "/marketing/create-discount": {
      "post": {
        "tags": [
          "Marketing"
        ],
        "summary": "Create discount",
        "operationId": "POST_marketing_create_discount",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "minimum_value": {
                    "type": "number"
                  },
                  "discount_value": {
                    "type": "number"
                  },
                  "start": {
                    "type": "string",
                    "format": "date"
                  },
                  "end": {
                    "type": "string",
                    "format": "date"
                  },
                  "type": {
                    "type": "integer",
                    "description": "0 = percentage, 1 = fixed/code"
                  },
                  "recurring": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "uses": {
                    "type": "string"
                  },
                  "selected_packages": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "minimum_value",
                  "discount_value",
                  "start",
                  "type",
                  "recurring",
                  "uses"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "minimum_value": {
                    "type": "number"
                  },
                  "discount_value": {
                    "type": "number"
                  },
                  "start": {
                    "type": "string",
                    "format": "date"
                  },
                  "end": {
                    "type": "string",
                    "format": "date"
                  },
                  "type": {
                    "type": "integer",
                    "description": "0 = percentage, 1 = fixed/code"
                  },
                  "recurring": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "uses": {
                    "type": "string"
                  },
                  "selected_packages": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "minimum_value",
                  "discount_value",
                  "start",
                  "type",
                  "recurring",
                  "uses"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create discount. Review the response for the operation result or validation errors."
      }
    },
    "/marketing/delete-discount": {
      "post": {
        "tags": [
          "Marketing"
        ],
        "summary": "Delete discount",
        "operationId": "POST_marketing_delete_discount",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "discount_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "discount_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "discount_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "discount_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete discount. Review the response for the operation result or validation errors."
      }
    },
    "/marketing/get-discount": {
      "get": {
        "tags": [
          "Marketing"
        ],
        "summary": "Get discount",
        "operationId": "GET_marketing_get_discount",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "discount_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get discount. Review the response for the operation result or validation errors."
      }
    },
    "/marketing/lists": {
      "get": {
        "tags": [
          "Marketing"
        ],
        "summary": "List discounts",
        "operationId": "GET_marketing_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "discounts": {
                    "current_page": 1,
                    "data": [
                      {
                        "id": 5,
                        "value": "10",
                        "discount": "10.00",
                        "type": "0",
                        "recurring": false,
                        "uses": 0
                      }
                    ],
                    "last_page": 1,
                    "total": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "0 = percentage, 1 = fixed/code",
            "schema": {
              "type": "integer",
              "description": "0 = percentage, 1 = fixed/code"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list discounts. Review the response for the operation result or validation errors."
      }
    },
    "/marketing/update-discount": {
      "post": {
        "tags": [
          "Marketing"
        ],
        "summary": "Update discount",
        "operationId": "POST_marketing_update_discount",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "discount_id": {
                    "type": "integer"
                  },
                  "minimum_value": {
                    "type": "number"
                  },
                  "discount_value": {
                    "type": "number"
                  },
                  "start": {
                    "type": "string",
                    "format": "date"
                  },
                  "end": {
                    "type": "string",
                    "format": "date"
                  },
                  "type": {
                    "type": "integer",
                    "description": "0 = percentage, 1 = fixed/code"
                  },
                  "recurring": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "uses": {
                    "type": "string"
                  },
                  "selected_packages": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "discount_id",
                  "minimum_value",
                  "discount_value",
                  "start",
                  "type",
                  "recurring",
                  "uses"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "discount_id": {
                    "type": "integer"
                  },
                  "minimum_value": {
                    "type": "number"
                  },
                  "discount_value": {
                    "type": "number"
                  },
                  "start": {
                    "type": "string",
                    "format": "date"
                  },
                  "end": {
                    "type": "string",
                    "format": "date"
                  },
                  "type": {
                    "type": "integer",
                    "description": "0 = percentage, 1 = fixed/code"
                  },
                  "recurring": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  },
                  "uses": {
                    "type": "string"
                  },
                  "selected_packages": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "discount_id",
                  "minimum_value",
                  "discount_value",
                  "start",
                  "type",
                  "recurring",
                  "uses"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update discount. Review the response for the operation result or validation errors."
      }
    },
    "/meter-event": {
      "post": {
        "tags": [
          "Usage"
        ],
        "summary": "Record usage event",
        "operationId": "POST_meter_event",
        "description": "Records bill-in-arrears usage for a configured package usage metric on a customer order. The authenticated API key must own the order, and `name` must match a usage metric configured on the order's package.",
        "responses": {
          "200": {
            "description": "Usage event recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageEventResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 481,
                    "metric": "Bandwidth",
                    "qty": 25,
                    "unit_price": "0.050000",
                    "billable_qty": 5,
                    "free_qty": 20,
                    "amount": 0.25,
                    "usage": {
                      "used": 105,
                      "remaining_free": 0,
                      "remaining_free_percent": 0,
                      "overage_qty": 5,
                      "billable_qty": 5,
                      "current_unbilled_amount": "0.2500",
                      "threshold": {
                        "level": "warning",
                        "threshold": 10,
                        "message": "Free usage is below 10%."
                      }
                    },
                    "meter": {
                      "id": 7,
                      "name": "Bandwidth",
                      "unit_label": "GB",
                      "included_allowance": 100,
                      "unit_price": "0.050000",
                      "usage": {
                        "used": 105,
                        "remaining_free": 0,
                        "remaining_free_percent": 0,
                        "overage_qty": 5,
                        "billable_qty": 5,
                        "current_unbilled_amount": "0.2500",
                        "threshold": {
                          "level": "warning",
                          "threshold": 10,
                          "message": "Free usage is below 10%."
                        }
                      }
                    },
                    "data": {
                      "resource_id": "server-123",
                      "source": "provisioning-system"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          },
          "404": {
            "description": "Order or usage metric not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalidOrder": {
                    "summary": "Invalid order",
                    "value": {
                      "success": false,
                      "message": "Invalid order."
                    }
                  },
                  "metricNotFound": {
                    "summary": "Metric not found",
                    "value": {
                      "success": false,
                      "message": "Usage metric not found."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "customer_id": [
                      "The customer id field is required."
                    ],
                    "order_id": [
                      "The order id field is required."
                    ],
                    "name": [
                      "The name field is required."
                    ],
                    "qty": [
                      "The qty field is required."
                    ]
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsageEventRequest"
              },
              "example": {
                "customer_id": 4,
                "order_id": 13,
                "name": "Bandwidth",
                "qty": 25,
                "payload": {
                  "resource_id": "server-123",
                  "source": "provisioning-system"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/UsageEventRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/meter/{customer_id}/get/{order_id}": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "List order usage meters",
        "operationId": "GET_meter_customer_id_get_order_id",
        "description": "Returns usage billing meters configured on the order's package, including current unbilled usage, remaining free allowance, billable quantity, and threshold warnings. The authenticated API key must own the order.",
        "responses": {
          "200": {
            "description": "Usage meters returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageMetersResponse"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 7,
                      "name": "Bandwidth",
                      "unit_label": "GB",
                      "included_allowance": 100,
                      "unit_price": "0.050000",
                      "usage": {
                        "used": 105,
                        "remaining_free": 0,
                        "remaining_free_percent": 0,
                        "overage_qty": 5,
                        "billable_qty": 5,
                        "current_unbilled_amount": "0.2500",
                        "threshold": {
                          "level": "warning",
                          "threshold": 10,
                          "message": "Free usage is below 10%."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          },
          "404": {
            "description": "Order or package not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "orderNotFound": {
                    "summary": "Order not found",
                    "value": {
                      "success": false,
                      "message": "Order not found for this customer."
                    }
                  },
                  "packageNotAssigned": {
                    "summary": "Package not assigned",
                    "value": {
                      "success": false,
                      "message": "Package not assigned to this order."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Order id and customer id is required."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "required": true,
            "description": "Customer ID that owns the order.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "description": "Order ID to retrieve usage meters for.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/module/activate-deactivate": {
      "post": {
        "tags": [
          "Module"
        ],
        "summary": "Activate or deactivate module",
        "operationId": "POST_module_activate_deactivate",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "module": {
                    "type": "string"
                  },
                  "status": {
                    "type": "integer",
                    "description": "1 = active, 2 = deactivated"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "module",
                  "status"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "module": {
                    "type": "string"
                  },
                  "status": {
                    "type": "integer",
                    "description": "1 = active, 2 = deactivated"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "module",
                  "status"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to activate or deactivate module. Review the response for the operation result or validation errors."
      }
    },
    "/module/get-module-configuration": {
      "get": {
        "tags": [
          "Module"
        ],
        "summary": "Get module configuration",
        "operationId": "GET_module_get_module_configuration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "module": {
                    "settings": [
                      {
                        "user_id": 1,
                        "name": "stripe.enabled",
                        "value": "1"
                      }
                    ],
                    "integrations": []
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get module configuration. Review the response for the operation result or validation errors."
      }
    },
    "/order/accept-order": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Accept order",
        "operationId": "POST_order_accept_order",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to accept order. Review the response for the operation result or validation errors."
      }
    },
    "/order/add-order": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Add order",
        "operationId": "POST_order_add_order",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "409": {
            "description": "Idempotency key conflict or request already in progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Package or customer not found or not available to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "packageNotFound": {
                    "value": {
                      "success": false,
                      "errors": {
                        "package_id": "The package is not available to this API account."
                      },
                      "code": "package_not_found"
                    }
                  },
                  "customerNotFound": {
                    "value": {
                      "success": false,
                      "errors": {
                        "customer_id": "The customer is not available to this API account."
                      },
                      "code": "customer_not_found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Order creation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "An unexpected error occurred while creating the order.",
                  "code": "order_creation_failed"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer"
                  },
                  "package_id": {
                    "type": "integer"
                  },
                  "cycle_id": {
                    "type": "integer"
                  },
                  "price": {
                    "type": "number"
                  },
                  "options": {
                    "$ref": "#/components/schemas/OrderOptionsRequest"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "customer_id",
                  "package_id",
                  "cycle_id",
                  "price"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "customer_id": {
                    "type": "integer"
                  },
                  "package_id": {
                    "type": "integer"
                  },
                  "cycle_id": {
                    "type": "integer"
                  },
                  "price": {
                    "type": "number"
                  },
                  "options.id": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "options.amount": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "options.value": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "options.cycle_type": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "customer_id",
                  "package_id",
                  "cycle_id",
                  "price"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to add order. Review the response for the operation result or validation errors."
      }
    },
    "/order/available-package-changes": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "List available package changes",
        "operationId": "GET_order_available_package_changes",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "order_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list available package changes. Review the response for the operation result or validation errors."
      }
    },
    "/order/cancel-order": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Cancel order",
        "operationId": "POST_order_cancel_order",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to cancel order. Review the response for the operation result or validation errors."
      }
    },
    "/order/change-package": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Change order package",
        "operationId": "POST_order_change_package",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  },
                  "package_id": {
                    "type": "integer"
                  },
                  "cycle_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id",
                  "package_id",
                  "cycle_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  },
                  "package_id": {
                    "type": "integer"
                  },
                  "cycle_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id",
                  "package_id",
                  "cycle_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to change order package. Review the response for the operation result or validation errors."
      }
    },
    "/order/check-fraud": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "Check order fraud status",
        "operationId": "GET_order_check_fraud",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The order is missing customer or currency data required for fraud checking",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The fraud detection service could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "order_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "paymentMethod.number",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to check order fraud status. Review the response for the operation result or validation errors."
      }
    },
    "/order/delete-order": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Delete order",
        "operationId": "POST_order_delete_order",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete order. Review the response for the operation result or validation errors."
      }
    },
    "/order/fraud-order": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Mark order as fraud",
        "operationId": "POST_order_fraud_order",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order or associated customer not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  },
                  "fraudlabs_json": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  },
                  "fraudlabs_json": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to mark order as fraud. Review the response for the operation result or validation errors."
      }
    },
    "/order/get-orders": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "List orders",
        "operationId": "GET_order_get_orders",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "orders": [
                    {
                      "id": 13,
                      "customer": {
                        "id": 4,
                        "email": "test@baseserv.com"
                      },
                      "package": {
                        "id": 66,
                        "name": "Test Package 1"
                      },
                      "cycle": {
                        "id": 87,
                        "price": 45
                      },
                      "status": "6",
                      "price": 145,
                      "currency": {
                        "id": 3,
                        "short_name": "EUR"
                      }
                    }
                  ],
                  "pagination": {
                    "total": 12,
                    "per_page": 15,
                    "current_page": 1,
                    "last_page": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list orders. Review the response for the operation result or validation errors."
      }
    },
    "/order/get-orders-by-status": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "List orders by status",
        "operationId": "GET_order_get_orders_by_status",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": true,
            "description": "One of RECENT, PENDING, SETUP, SHIPPED, CANCELLED, RETURNED, TERMINATED, SUSPENDED, ERROR, ALL",
            "schema": {
              "type": "integer",
              "description": "One of RECENT, PENDING, SETUP, SHIPPED, CANCELLED, RETURNED, TERMINATED, SUSPENDED, ERROR, ALL"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list orders by status. Review the response for the operation result or validation errors."
      }
    },
    "/order/pending-order": {
      "post": {
        "tags": [
          "Order"
        ],
        "summary": "Mark order as pending",
        "operationId": "POST_order_pending_order",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "order_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to mark order as pending. Review the response for the operation result or validation errors."
      }
    },
    "/order/preview-package-change": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "Preview package change",
        "operationId": "GET_order_preview_package_change",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "description": "Order not found or not accessible to this API account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "order_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "package_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cycle_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to preview package change. Review the response for the operation result or validation errors."
      }
    },
    "/package/create": {
      "post": {
        "tags": [
          "Package"
        ],
        "summary": "Create package",
        "operationId": "POST_package_create",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "digital_delivery": {
                    "delivery_enabled": true,
                    "download_policy": "cap_limited",
                    "max_downloads": 5,
                    "link_expiry_hours": null,
                    "ip_locked": true,
                    "watermark_pdfs": true,
                    "licensing_enabled": true,
                    "activation_limit": 1,
                    "customer_license_management": true,
                    "maximum_reissues": 3,
                    "enforce_domain": true,
                    "enforce_ip": false,
                    "enforce_installation_path": true,
                    "license_key_prefix": "APP",
                    "license_key_length": 20,
                    "offline_cache_minutes": 5
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "group_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tax": {
                    "type": "number"
                  },
                  "url": {
                    "type": "string"
                  },
                  "prorate": {
                    "type": "string",
                    "enum": [
                      "Y",
                      "N"
                    ]
                  },
                  "trial": {
                    "type": "string"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "keep": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "files": {
                    "type": "array",
                    "description": "Optional digital download files. Submit each file using the `files[]` multipart field. Accepted types: JPEG, PNG, JPG, GIF, SVG, PDF, DOC, DOCX, and ZIP. Maximum size: 20 MB per file.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "product_images": {
                    "type": "array",
                    "description": "Optional product images. Submit each image using the `product_images[]` multipart field. Accepted types: JPEG, PNG, JPG, GIF, and SVG. Maximum size: 2 MB per image.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "cycle.cycle": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cycle.price": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cycle.setup": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "featured": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1"
                    ]
                  },
                  "upgrade_paths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cycle.id": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "upgrade_paths.*.target_package_id": {
                    "type": "integer",
                    "description": "Target package id for upgrade path"
                  },
                  "upgrade_paths.*.sort_order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional upgrade path sort order"
                  },
                  "theme": {
                    "type": "integer",
                    "enum": [
                      1,
                      2
                    ],
                    "description": "Order page theme: 1 = ecommerce view, 2 = simple. Defaults to 2 on create."
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Stock quantity"
                  },
                  "is_outofstock": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1"
                    ],
                    "description": "Whether the package is marked out of stock"
                  },
                  "digital_delivery": {
                    "$ref": "#/components/schemas/DigitalDeliverySettings",
                    "description": "For multipart clients, send nested fields using bracket notation such as `digital_delivery[delivery_enabled]`."
                  }
                },
                "additionalProperties": true,
                "required": [
                  "group_id",
                  "name"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create package. Review the response for the operation result or validation errors."
      }
    },
    "/package/delete": {
      "post": {
        "tags": [
          "Package"
        ],
        "summary": "Delete package",
        "operationId": "POST_package_delete",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete package. Review the response for the operation result or validation errors."
      }
    },
    "/package/get": {
      "get": {
        "tags": [
          "Package"
        ],
        "summary": "Get package",
        "operationId": "GET_package_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "package": {
                    "id": 66,
                    "name": "Licensed Application",
                    "digital_delivery": {
                      "delivery_enabled": true,
                      "download_policy": "cap_limited",
                      "max_downloads": 5,
                      "link_expiry_hours": null,
                      "ip_locked": true,
                      "watermark_pdfs": true,
                      "licensing_enabled": true,
                      "activation_limit": 1,
                      "customer_license_management": true,
                      "maximum_reissues": 3,
                      "enforce_domain": true,
                      "enforce_ip": false,
                      "enforce_installation_path": true,
                      "license_key_prefix": "APP",
                      "license_key_length": 20,
                      "offline_cache_minutes": 5
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get package. Review the response for the operation result or validation errors."
      }
    },
    "/package/get-by-customer": {
      "get": {
        "tags": [
          "Package"
        ],
        "summary": "Get packages available to a customer",
        "operationId": "GET_package_get_by_customer",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "packages": {
                    "current_page": 1,
                    "data": [
                      {
                        "id": 66,
                        "name": "Licensed Application",
                        "digital_delivery": {
                          "delivery_enabled": true,
                          "download_policy": "cap_limited",
                          "licensing_enabled": true,
                          "activation_limit": 1
                        }
                      }
                    ],
                    "per_page": 15,
                    "total": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get packages available to a customer. Review the response for the operation result or validation errors."
      }
    },
    "/package/group/create": {
      "post": {
        "tags": [
          "Group"
        ],
        "summary": "Create group",
        "operationId": "POST_package_group_create",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "type": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "type"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "type": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "type"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create group. Review the response for the operation result or validation errors."
      }
    },
    "/package/group/delete": {
      "post": {
        "tags": [
          "Group"
        ],
        "summary": "Delete group",
        "operationId": "POST_package_group_delete",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete group. Review the response for the operation result or validation errors."
      }
    },
    "/package/group/get": {
      "get": {
        "tags": [
          "Group"
        ],
        "summary": "Get group",
        "operationId": "GET_package_group_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get group. Review the response for the operation result or validation errors."
      }
    },
    "/package/group/lists": {
      "get": {
        "tags": [
          "Group"
        ],
        "summary": "List groups",
        "operationId": "GET_package_group_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "groups": {
                    "current_page": 1,
                    "data": [
                      {
                        "id": 1221,
                        "name": "Test Package Group",
                        "type": 1,
                        "visible": "1"
                      }
                    ],
                    "last_page": 1,
                    "total": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list groups. Review the response for the operation result or validation errors."
      }
    },
    "/package/group/update": {
      "post": {
        "tags": [
          "Group"
        ],
        "summary": "Update group",
        "operationId": "POST_package_group_update",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "type": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "name",
                  "type"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "type": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "name",
                  "type"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update group. Review the response for the operation result or validation errors."
      }
    },
    "/package/lists": {
      "get": {
        "tags": [
          "Package"
        ],
        "summary": "List packages",
        "operationId": "GET_package_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "packages": {
                    "current_page": 1,
                    "data": [
                      {
                        "id": 66,
                        "group_id": 1221,
                        "name": "Test Package 1",
                        "tax": 0,
                        "prorate": "N",
                        "url": "https://demo.onlinebillingform.com/order/1221/66",
                        "cycles": [
                          {
                            "id": 87,
                            "price": 45,
                            "fee": 100,
                            "cycle": 5,
                            "cycle_text": "Monthly"
                          }
                        ],
                        "digital_delivery": {
                          "delivery_enabled": true,
                          "download_policy": "cap_limited",
                          "max_downloads": 5,
                          "link_expiry_hours": null,
                          "ip_locked": true,
                          "watermark_pdfs": true,
                          "licensing_enabled": true,
                          "activation_limit": 1,
                          "customer_license_management": true,
                          "maximum_reissues": 3,
                          "enforce_domain": true,
                          "enforce_ip": false,
                          "enforce_installation_path": true,
                          "license_key_prefix": "APP",
                          "license_key_length": 20,
                          "offline_cache_minutes": 5
                        }
                      }
                    ],
                    "last_page": 1,
                    "per_page": 15,
                    "total": 4
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "featured",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list packages. Review the response for the operation result or validation errors."
      }
    },
    "/package/option/create": {
      "post": {
        "tags": [
          "Package"
        ],
        "summary": "Create package option",
        "operationId": "POST_package_option_create",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "internal_name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "field_type": {
                    "type": "integer"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "required": {
                    "type": "string",
                    "description": "Y or N"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "internal_name",
                  "display_name",
                  "field_type"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "internal_name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "field_type": {
                    "type": "integer"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "required": {
                    "type": "string",
                    "description": "Y or N"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "internal_name",
                  "display_name",
                  "field_type"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create package option. Review the response for the operation result or validation errors."
      }
    },
    "/package/option/delete": {
      "post": {
        "tags": [
          "Package"
        ],
        "summary": "Delete package option",
        "operationId": "POST_package_option_delete",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ApiConflict"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete package option. Review the response for the operation result or validation errors."
      }
    },
    "/package/option/get": {
      "get": {
        "tags": [
          "Package"
        ],
        "summary": "Get package option",
        "operationId": "GET_package_option_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get package option. Review the response for the operation result or validation errors."
      }
    },
    "/package/option/lists": {
      "get": {
        "tags": [
          "Package"
        ],
        "summary": "List package options",
        "operationId": "GET_package_option_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list package options. Review the response for the operation result or validation errors."
      }
    },
    "/package/option/update": {
      "post": {
        "tags": [
          "Package"
        ],
        "summary": "Update package option",
        "operationId": "POST_package_option_update",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "internal_name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "field_type": {
                    "type": "integer"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "required": {
                    "type": "string",
                    "description": "Y or N"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "internal_name",
                  "display_name",
                  "field_type"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "internal_name": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "field_type": {
                    "type": "integer"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "required": {
                    "type": "string",
                    "description": "Y or N"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "internal_name",
                  "display_name",
                  "field_type"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update package option. Review the response for the operation result or validation errors."
      }
    },
    "/package/show": {
      "get": {
        "tags": [
          "Package"
        ],
        "summary": "Show package",
        "operationId": "GET_package_show",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "package": {
                    "id": 66,
                    "name": "Licensed Application",
                    "digital_delivery": {
                      "delivery_enabled": true,
                      "download_policy": "cap_limited",
                      "max_downloads": 5,
                      "link_expiry_hours": null,
                      "ip_locked": true,
                      "watermark_pdfs": true,
                      "licensing_enabled": true,
                      "activation_limit": 1,
                      "customer_license_management": true,
                      "maximum_reissues": 3,
                      "enforce_domain": true,
                      "enforce_ip": false,
                      "enforce_installation_path": true,
                      "license_key_prefix": "APP",
                      "license_key_length": 20,
                      "offline_cache_minutes": 5
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to show package. Review the response for the operation result or validation errors."
      }
    },
    "/package/update": {
      "post": {
        "tags": [
          "Package"
        ],
        "summary": "Update package",
        "operationId": "POST_package_update",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "digital_delivery": {
                    "delivery_enabled": true,
                    "download_policy": "cap_limited",
                    "max_downloads": 5,
                    "link_expiry_hours": null,
                    "ip_locked": true,
                    "watermark_pdfs": true,
                    "licensing_enabled": true,
                    "activation_limit": 1,
                    "customer_license_management": true,
                    "maximum_reissues": 3,
                    "enforce_domain": true,
                    "enforce_ip": false,
                    "enforce_installation_path": true,
                    "license_key_prefix": "APP",
                    "license_key_length": 20,
                    "offline_cache_minutes": 5
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "group_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "tax": {
                    "type": "number"
                  },
                  "url": {
                    "type": "string"
                  },
                  "prorate": {
                    "type": "string",
                    "enum": [
                      "Y",
                      "N"
                    ]
                  },
                  "trial": {
                    "type": "string"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "keep": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "files": {
                    "type": "array",
                    "description": "Optional digital download files. Submit each file using the `files[]` multipart field. Accepted types: JPEG, PNG, JPG, GIF, SVG, PDF, DOC, DOCX, and ZIP. Maximum size: 20 MB per file.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "product_images": {
                    "type": "array",
                    "description": "Optional product images. Submit each image using the `product_images[]` multipart field. Accepted types: JPEG, PNG, JPG, GIF, and SVG. Maximum size: 2 MB per image.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  },
                  "cycle.cycle": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cycle.price": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cycle.setup": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "featured": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1"
                    ]
                  },
                  "upgrade_paths": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "cycle.id": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Required to change cycles: pass an existing cycle id to update that cycle, or null to add a new one. Existing cycles whose id is not listed are deleted. Omit all cycle fields to leave cycles unchanged."
                  },
                  "upgrade_paths.*.target_package_id": {
                    "type": "integer",
                    "description": "Target package id for upgrade path"
                  },
                  "upgrade_paths.*.sort_order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional upgrade path sort order"
                  },
                  "theme": {
                    "type": "integer",
                    "enum": [
                      1,
                      2
                    ],
                    "description": "Order page theme: 1 = ecommerce view, 2 = simple. Defaults to 2 on create."
                  },
                  "qty": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Stock quantity"
                  },
                  "is_outofstock": {
                    "type": "string",
                    "enum": [
                      "0",
                      "1"
                    ],
                    "description": "Whether the package is marked out of stock"
                  },
                  "digital_delivery": {
                    "$ref": "#/components/schemas/DigitalDeliverySettings",
                    "description": "For multipart clients, send nested fields using bracket notation such as `digital_delivery[delivery_enabled]`."
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "group_id",
                  "name"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update package. Review the response for the operation result or validation errors."
      }
    },
    "/report/annual-sales": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Annual sales report",
        "operationId": "GET_report_annual_sales",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to annual sales report. Review the response for the operation result or validation errors."
      }
    },
    "/report/customer-credit": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Customer credit report",
        "operationId": "GET_report_customer_credit",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to customer credit report. Review the response for the operation result or validation errors."
      }
    },
    "/report/customer-debt": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Customer debt report",
        "operationId": "GET_report_customer_debt",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to customer debt report. Review the response for the operation result or validation errors."
      }
    },
    "/report/customer-invoice": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Customer invoice report",
        "operationId": "GET_report_customer_invoice",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to customer invoice report. Review the response for the operation result or validation errors."
      }
    },
    "/report/customer-receipt": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Customer receipt report",
        "operationId": "GET_report_customer_receipt",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to customer receipt report. Review the response for the operation result or validation errors."
      }
    },
    "/report/package-leaderboard": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Package leaderboard report",
        "operationId": "GET_report_package_leaderboard",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to package leaderboard report. Review the response for the operation result or validation errors."
      }
    },
    "/report/revenue-trend": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Revenue trend report",
        "operationId": "GET_report_revenue_trend",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to revenue trend report. Review the response for the operation result or validation errors."
      }
    },
    "/report/sales-by-customer": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Sales by customer report",
        "operationId": "GET_report_sales_by_customer",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "description": "yearly, monthly, or daily.",
            "schema": {
              "type": "string",
              "enum": [
                "yearly",
                "monthly",
                "daily"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Date in YYYY-MM-DD format.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to sales by customer report. Review the response for the operation result or validation errors."
      }
    },
    "/report/sales-by-staff": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Sales by staff report",
        "operationId": "GET_report_sales_by_staff",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "description": "yearly, monthly, or daily.",
            "schema": {
              "type": "string",
              "enum": [
                "yearly",
                "monthly",
                "daily"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Date in YYYY-MM-DD format.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to sales by staff report. Review the response for the operation result or validation errors."
      }
    },
    "/setting/create-staff": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Create staff user",
        "operationId": "POST_setting_create_staff",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "permission": {
                    "$ref": "#/components/schemas/StaffPermissionsRequest"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "email",
                  "username"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "permission.dashboard": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.packages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.customers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.invoices": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.marketing": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.reports": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.support": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.settings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "email",
                  "username"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create staff user. Review the response for the operation result or validation errors."
      }
    },
    "/setting/create-tax-class": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Create tax class",
        "operationId": "POST_setting_create_tax_class",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "rate": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Object/array keyed by tax zone id"
                  },
                  "default": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "rate",
                  "default"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "rate": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Object/array keyed by tax zone id"
                  },
                  "default": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "rate",
                  "default"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create tax class. Review the response for the operation result or validation errors."
      }
    },
    "/setting/create-tax-zone": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Create tax zone",
        "operationId": "POST_setting_create_tax_zone",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "counties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "counties"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "counties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "name",
                  "counties"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create tax zone. Review the response for the operation result or validation errors."
      }
    },
    "/setting/delete-staff": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Delete staff user",
        "operationId": "POST_setting_delete_staff",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "user_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "user_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete staff user. Review the response for the operation result or validation errors."
      }
    },
    "/setting/delete-tax-class": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Delete tax class",
        "operationId": "POST_setting_delete_tax_class",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "class_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "class_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "class_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "class_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete tax class. Review the response for the operation result or validation errors."
      }
    },
    "/setting/delete-tax-zone": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Delete tax zone",
        "operationId": "POST_setting_delete_tax_zone",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zone_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "zone_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "zone_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "zone_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete tax zone. Review the response for the operation result or validation errors."
      }
    },
    "/setting/get-staff": {
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "Get staff user",
        "operationId": "GET_setting_get_staff",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get staff user. Review the response for the operation result or validation errors."
      }
    },
    "/setting/get-tax-class": {
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "Get tax class",
        "operationId": "GET_setting_get_tax_class",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "class_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get tax class. Review the response for the operation result or validation errors."
      }
    },
    "/setting/get-tax-zone": {
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "Get tax zone",
        "operationId": "GET_setting_get_tax_zone",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "zone_id",
            "in": "query",
            "required": true,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get tax zone. Review the response for the operation result or validation errors."
      }
    },
    "/setting/invoice": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Update invoice settings",
        "operationId": "POST_setting_invoice",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prefix": {
                    "type": "string"
                  },
                  "orderReturnURL": {
                    "type": "string",
                    "format": "uri"
                  },
                  "startNumber": {
                    "type": "integer"
                  },
                  "paymentsDue": {
                    "type": "integer"
                  },
                  "lateFees": {
                    "type": "number"
                  },
                  "lateFeesTax": {
                    "type": "integer"
                  },
                  "reminders": {
                    "type": "integer"
                  },
                  "reminders4suspend": {
                    "type": "integer"
                  },
                  "days2send": {
                    "type": "integer"
                  },
                  "total-order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "defaultCurrency": {
                    "type": "integer"
                  },
                  "currency": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "exchangerate": {
                    "type": "number"
                  },
                  "vat": {
                    "$ref": "#/components/schemas/VatSettingsRequest"
                  },
                  "companyRegistration": {
                    "type": "string"
                  },
                  "fixedDiscount": {
                    "type": "boolean"
                  },
                  "discountCode": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "prefix": {
                    "type": "string"
                  },
                  "orderReturnURL": {
                    "type": "string",
                    "format": "uri"
                  },
                  "startNumber": {
                    "type": "integer"
                  },
                  "paymentsDue": {
                    "type": "integer"
                  },
                  "lateFees": {
                    "type": "number"
                  },
                  "lateFeesTax": {
                    "type": "integer"
                  },
                  "reminders": {
                    "type": "integer"
                  },
                  "reminders4suspend": {
                    "type": "integer"
                  },
                  "days2send": {
                    "type": "integer"
                  },
                  "total-order": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "defaultCurrency": {
                    "type": "integer"
                  },
                  "currency": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "exchangerate": {
                    "type": "number"
                  },
                  "vat": {
                    "type": "integer"
                  },
                  "vat.name": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "vat.number": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "companyRegistration": {
                    "type": "string"
                  },
                  "fixedDiscount": {
                    "type": "boolean"
                  },
                  "discountCode": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update invoice settings. Review the response for the operation result or validation errors."
      },
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "Get invoice settings",
        "operationId": "GET_setting_invoice",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get invoice settings. Review the response for the operation result or validation errors."
      }
    },
    "/setting/lists-staff": {
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "List staff users",
        "operationId": "GET_setting_lists_staff",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "staffs": {
                    "current_page": 1,
                    "data": [],
                    "last_page": 1,
                    "total": 0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list staff users. Review the response for the operation result or validation errors."
      }
    },
    "/setting/lists-tax-class": {
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "List tax classes",
        "operationId": "GET_setting_lists_tax_class",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list tax classes. Review the response for the operation result or validation errors."
      }
    },
    "/setting/lists-tax-zone": {
      "get": {
        "tags": [
          "Setting"
        ],
        "summary": "List tax zones",
        "operationId": "GET_setting_lists_tax_zone",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list tax zones. Review the response for the operation result or validation errors."
      }
    },
    "/setting/update-staff": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Update staff user",
        "operationId": "POST_setting_update_staff",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "permission": {
                    "$ref": "#/components/schemas/StaffPermissionsRequest"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "user_id",
                  "name",
                  "email",
                  "username"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "username": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password"
                  },
                  "permission.dashboard": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.packages": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.customers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.invoices": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.marketing": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.reports": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.support": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission.settings": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "permission": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "user_id",
                  "name",
                  "email",
                  "username"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update staff user. Review the response for the operation result or validation errors."
      }
    },
    "/setting/update-tax-class": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Update tax class",
        "operationId": "POST_setting_update_tax_class",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "class_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "rate": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Object/array keyed by tax zone id"
                  },
                  "default": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "additionalProperties": true,
                "required": [
                  "class_id",
                  "name",
                  "rate",
                  "default"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "class_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "rate": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Object/array keyed by tax zone id"
                  },
                  "default": {
                    "type": "integer",
                    "enum": [
                      0,
                      1
                    ]
                  }
                },
                "additionalProperties": true,
                "required": [
                  "class_id",
                  "name",
                  "rate",
                  "default"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update tax class. Review the response for the operation result or validation errors."
      }
    },
    "/setting/update-tax-zone": {
      "post": {
        "tags": [
          "Setting"
        ],
        "summary": "Update tax zone",
        "operationId": "POST_setting_update_tax_zone",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "zone_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "counties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "zone_id",
                  "name",
                  "counties"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "zone_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "counties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": true,
                "required": [
                  "zone_id",
                  "name",
                  "counties"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update tax zone. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/branding/create": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Create VPN branding",
        "operationId": "POST_vpn_branding_create",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "business_name": {
                    "type": "string"
                  },
                  "support_email": {
                    "type": "string",
                    "format": "email"
                  },
                  "logo_images": {
                    "type": "string",
                    "format": "binary"
                  },
                  "home_screen_1": {
                    "type": "string",
                    "format": "binary"
                  },
                  "home_screen_2": {
                    "type": "string",
                    "format": "binary"
                  },
                  "home_screen_3": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "business_name",
                  "support_email",
                  "logo_images",
                  "home_screen_1",
                  "home_screen_2",
                  "home_screen_3"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create VPN branding. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/branding/get": {
      "get": {
        "tags": [
          "VPN"
        ],
        "summary": "Get VPN branding",
        "operationId": "GET_vpn_branding_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": false,
                  "errors": "No branding data found."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "No VPN branding is configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "noBranding": {
                    "value": {
                      "success": false,
                      "errors": "No branding data found."
                    }
                  },
                  "accountBrandingMissing": {
                    "value": {
                      "success": false,
                      "errors": "Branding not found for your account."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "description": "Use this BillingServ API endpoint to get VPN branding. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/connection/get": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Create VPN connection",
        "operationId": "POST_vpn_connection_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_id": {
                    "type": "integer"
                  },
                  "device_info": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "server_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "server_id": {
                    "type": "integer"
                  },
                  "device_info": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "server_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create VPN connection. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/disconnect": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Disconnect VPN connection",
        "operationId": "POST_vpn_disconnect",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "connection_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "connection_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to disconnect VPN connection. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/get/details": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Get VPN details from client result",
        "operationId": "POST_vpn_get_details",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "result": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "result"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "result": {
                    "type": "string"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "result"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get VPN details from client result. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/servers/create": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Create VPN server",
        "operationId": "POST_vpn_servers_create",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country_id": {
                    "type": "integer"
                  },
                  "server_name": {
                    "type": "string"
                  },
                  "ip_address": {
                    "type": "string",
                    "format": "ipv4"
                  },
                  "ssh_port": {
                    "type": "integer"
                  },
                  "ssh_username": {
                    "type": "string"
                  },
                  "ssh_password": {
                    "type": "string",
                    "format": "password"
                  },
                  "max_connection": {
                    "type": "integer"
                  },
                  "vpn_type": {
                    "type": "integer",
                    "description": "1=OpenVPN, 2=WireGuard, 3=IKEv2, 4=other"
                  },
                  "vpn_port": {
                    "type": "string",
                    "description": "default, random, or custom"
                  },
                  "vpn_custom_port": {
                    "type": "string"
                  },
                  "vpn_protocol": {
                    "type": "string",
                    "description": "udp or tcp"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "country_id",
                  "server_name",
                  "ip_address",
                  "ssh_port",
                  "ssh_username",
                  "ssh_password",
                  "max_connection",
                  "vpn_type"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "country_id": {
                    "type": "integer"
                  },
                  "server_name": {
                    "type": "string"
                  },
                  "ip_address": {
                    "type": "string",
                    "format": "ipv4"
                  },
                  "ssh_port": {
                    "type": "integer"
                  },
                  "ssh_username": {
                    "type": "string"
                  },
                  "ssh_password": {
                    "type": "string",
                    "format": "password"
                  },
                  "max_connection": {
                    "type": "integer"
                  },
                  "vpn_type": {
                    "type": "integer",
                    "description": "1=OpenVPN, 2=WireGuard, 3=IKEv2, 4=other"
                  },
                  "vpn_port": {
                    "type": "string",
                    "description": "default, random, or custom"
                  },
                  "vpn_custom_port": {
                    "type": "string"
                  },
                  "vpn_protocol": {
                    "type": "string",
                    "description": "udp or tcp"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "country_id",
                  "server_name",
                  "ip_address",
                  "ssh_port",
                  "ssh_username",
                  "ssh_password",
                  "max_connection",
                  "vpn_type"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create VPN server. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/servers/delete": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Delete VPN server",
        "operationId": "POST_vpn_servers_delete",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete VPN server. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/servers/deploy": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Deploy VPN server",
        "operationId": "POST_vpn_servers_deploy",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "password_deploy": {
                    "type": "string",
                    "format": "password"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "password_deploy"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "password_deploy": {
                    "type": "string",
                    "format": "password"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "password_deploy"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to deploy VPN server. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/servers/get": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Get VPN server",
        "operationId": "POST_vpn_servers_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get VPN server. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/servers/list": {
      "get": {
        "tags": [
          "VPN"
        ],
        "summary": "List VPN servers",
        "description": "Returns the paginated VPN server list together with the ordered server-group representation used by VPN applications. The order of `server_groups` matches the order configured in VPN Deploy, and the order of each group's `servers` array matches the configured server order. Only online, enabled servers are included. Configured groups remain present when empty. An `Other` group is appended only when ungrouped available servers exist.",
        "operationId": "GET_vpn_servers_list",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "vpn_systems",
                    "server_groups"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "vpn_systems": {
                      "type": "object",
                      "description": "Paginated flat VPN server list.",
                      "required": [
                        "data",
                        "current_page",
                        "first_page_url",
                        "from",
                        "last_page",
                        "last_page_url",
                        "next_page_url",
                        "path",
                        "per_page",
                        "prev_page_url",
                        "to",
                        "total"
                      ],
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "id",
                              "server_name",
                              "ip_address",
                              "ssh_port",
                              "ssh_username",
                              "max_connections",
                              "vpn_type",
                              "flag_countries",
                              "status_online",
                              "is_disabled",
                              "connections_count"
                            ],
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "server_name": {
                                "type": "string"
                              },
                              "ip_address": {
                                "type": "string"
                              },
                              "ssh_port": {
                                "type": "integer"
                              },
                              "ssh_username": {
                                "type": "string"
                              },
                              "max_connections": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "vpn_type": {
                                "type": "string",
                                "enum": [
                                  "openVPN",
                                  "wireguard",
                                  "amneziawg"
                                ]
                              },
                              "flag_countries": {
                                "type": "string"
                              },
                              "status_online": {
                                "type": "integer",
                                "enum": [
                                  0,
                                  1
                                ]
                              },
                              "is_disabled": {
                                "type": "boolean"
                              },
                              "connections_count": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Number of current VPN connection records for this server."
                              }
                            }
                          }
                        },
                        "current_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "first_page_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "from": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "last_page": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "last_page_url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "next_page_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "path": {
                          "type": "string",
                          "format": "uri"
                        },
                        "per_page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "prev_page_url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uri"
                        },
                        "to": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        }
                      }
                    },
                    "server_groups": {
                      "type": "array",
                      "description": "Ordered VPN groups. Clients should preserve this array order when displaying locations.",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "name",
                          "servers"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable group UUID, or `other` for the conditional ungrouped-server group."
                          },
                          "name": {
                            "type": "string"
                          },
                          "servers": {
                            "type": "array",
                            "description": "Available servers in their configured order.",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "id",
                                "server_name",
                                "ip_address",
                                "vpn_type",
                                "flag_countries",
                                "status_online",
                                "is_disabled",
                                "connections_count"
                              ],
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "server_name": {
                                  "type": "string"
                                },
                                "ip_address": {
                                  "type": "string"
                                },
                                "vpn_type": {
                                  "type": "string",
                                  "enum": [
                                    "openVPN",
                                    "wireguard",
                                    "amneziawg"
                                  ]
                                },
                                "flag_countries": {
                                  "type": "string"
                                },
                                "status_online": {
                                  "type": "boolean"
                                },
                                "is_disabled": {
                                  "type": "boolean"
                                },
                                "connections_count": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "description": "Number of current VPN connection records for this server."
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "vpn_systems": {
                    "data": [
                      {
                        "id": 30,
                        "server_name": "Europe VPN 01",
                        "ip_address": "10.0.0.30",
                        "ssh_port": 22,
                        "ssh_username": "root",
                        "max_connections": null,
                        "vpn_type": "openVPN",
                        "flag_countries": "AD",
                        "status_online": 1,
                        "is_disabled": false,
                        "connections_count": 1
                      }
                    ],
                    "current_page": 1,
                    "first_page_url": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list?page=1",
                    "from": 1,
                    "last_page": 1,
                    "last_page_url": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list?page=1",
                    "next_page_url": null,
                    "path": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list",
                    "per_page": 15,
                    "prev_page_url": null,
                    "to": 1,
                    "total": 1
                  },
                  "server_groups": [
                    {
                      "id": "c49f2148-adf3-469c-b1ca-5d68e28e7efb",
                      "name": "Europe",
                      "servers": []
                    },
                    {
                      "id": "f584646b-7a83-42e8-b444-30f26b1d7696",
                      "name": "USA",
                      "servers": [
                        {
                          "id": 30,
                          "server_name": "Europe VPN 01",
                          "ip_address": "10.0.0.30",
                          "vpn_type": "openVPN",
                          "flag_countries": "AD",
                          "status_online": true,
                          "is_disabled": false,
                          "connections_count": 1
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "per_page": [
                      "The per page field must not be greater than 100."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of records returned in the `vpn_systems` pagination object. This does not paginate `server_groups`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 15
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/vpn/servers/update": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Update VPN server",
        "operationId": "POST_vpn_servers_update",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "500": {
            "$ref": "#/components/responses/ApiServerError"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "country_id": {
                    "type": "integer"
                  },
                  "server_name": {
                    "type": "string"
                  },
                  "ip_address": {
                    "type": "string",
                    "format": "ipv4"
                  },
                  "ssh_port": {
                    "type": "integer"
                  },
                  "ssh_username": {
                    "type": "string"
                  },
                  "ssh_password_current": {
                    "type": "string",
                    "format": "password"
                  },
                  "max_connection": {
                    "type": "integer"
                  },
                  "vpn_type": {
                    "type": "integer"
                  },
                  "ssh_password_new": {
                    "type": "string"
                  },
                  "vpn_port": {
                    "type": "string",
                    "description": "default, random, or custom"
                  },
                  "vpn_custom_port": {
                    "type": "string"
                  },
                  "vpn_protocol": {
                    "type": "string",
                    "description": "udp or tcp"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "country_id",
                  "server_name",
                  "ip_address",
                  "ssh_port",
                  "ssh_username",
                  "ssh_password_current",
                  "max_connection"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "country_id": {
                    "type": "integer"
                  },
                  "server_name": {
                    "type": "string"
                  },
                  "ip_address": {
                    "type": "string",
                    "format": "ipv4"
                  },
                  "ssh_port": {
                    "type": "integer"
                  },
                  "ssh_username": {
                    "type": "string"
                  },
                  "ssh_password_current": {
                    "type": "string",
                    "format": "password"
                  },
                  "max_connection": {
                    "type": "integer"
                  },
                  "vpn_type": {
                    "type": "integer"
                  },
                  "ssh_password_new": {
                    "type": "string"
                  },
                  "vpn_port": {
                    "type": "string",
                    "description": "default, random, or custom"
                  },
                  "vpn_custom_port": {
                    "type": "string"
                  },
                  "vpn_protocol": {
                    "type": "string",
                    "description": "udp or tcp"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "country_id",
                  "server_name",
                  "ip_address",
                  "ssh_port",
                  "ssh_username",
                  "ssh_password_current",
                  "max_connection"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update VPN server. Review the response for the operation result or validation errors."
      }
    },
    "/vpn/vpn-details/get": {
      "post": {
        "tags": [
          "VPN"
        ],
        "summary": "Get customer VPN connection details",
        "operationId": "POST_vpn_vpn_details_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "connection_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "connection_id"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "connection_id": {
                    "type": "integer"
                  }
                },
                "additionalProperties": true,
                "required": [
                  "id",
                  "connection_id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get customer VPN connection details. Review the response for the operation result or validation errors."
      }
    },
    "/ticket/create": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Create support ticket",
        "operationId": "POST_ticket_create",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "ticket": {
                    "id": 1,
                    "subject": "Cannot access my invoices",
                    "user_id": 42,
                    "assignee_by": null,
                    "status": "open",
                    "support_department": "Billing",
                    "priority": "low",
                    "last_action": "Created",
                    "messages": [
                      {
                        "id": 10,
                        "support_ticket_id": 1,
                        "replay_by": 5,
                        "message": "<p>Thanks for reaching out, we are looking into this.</p>"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string",
                    "description": "Ticket subject. Letters, numbers, spaces, and basic punctuation only."
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "ID of the customer the ticket belongs to."
                  },
                  "message": {
                    "type": "string",
                    "description": "Initial ticket message. Standard rich text formatting is allowed; emojis and unsupported HTML tags are rejected."
                  },
                  "support_department": {
                    "type": "string",
                    "description": "Support department the ticket is filed under. Required when departments are configured."
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "emergency"
                    ],
                    "default": "low"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "pending",
                      "close",
                      "awaiting_reply"
                    ],
                    "default": "open"
                  },
                  "assignee_by": {
                    "type": "integer",
                    "description": "Staff user ID to assign the ticket to."
                  }
                },
                "required": [
                  "subject",
                  "user_id",
                  "message",
                  "support_department"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to create support ticket. Review the response for the operation result or validation errors."
      }
    },
    "/ticket/update": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Update support ticket",
        "operationId": "POST_ticket_update",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "ticket": {
                    "id": 1,
                    "subject": "Cannot access my invoices",
                    "user_id": 42,
                    "assignee_by": null,
                    "status": "pending",
                    "support_department": "Billing",
                    "priority": "low",
                    "last_action": "Created"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "404": {
            "description": "Support ticket not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Support ticket ID: 1 not found."
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Support ticket ID."
                  },
                  "subject": {
                    "type": "string",
                    "description": "Ticket subject. Letters, numbers, spaces, and basic punctuation only."
                  },
                  "user_id": {
                    "type": "integer",
                    "description": "ID of the customer the ticket belongs to."
                  },
                  "assignee_by": {
                    "type": "integer",
                    "description": "Staff user ID to assign the ticket to."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "pending",
                      "close",
                      "awaiting_reply"
                    ]
                  },
                  "support_department": {
                    "type": "string"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high",
                      "emergency"
                    ]
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to update support ticket. Review the response for the operation result or validation errors."
      }
    },
    "/ticket/lists": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "List support tickets",
        "operationId": "GET_ticket_lists",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "tickets": {
                    "current_page": 1,
                    "data": [
                      {
                        "id": 1,
                        "subject": "Cannot access my invoices",
                        "user_id": 42,
                        "assignee_by": null,
                        "status": "open",
                        "support_department": "Billing",
                        "priority": "low",
                        "last_action": "Created"
                      }
                    ],
                    "per_page": 15,
                    "total": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "required": false,
            "description": "Filter by the customer the ticket belongs to.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by ticket status.",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "pending",
                "close",
                "awaiting_reply"
              ]
            }
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "description": "Filter by ticket priority.",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "emergency"
              ]
            }
          },
          {
            "name": "support_department",
            "in": "query",
            "required": false,
            "description": "Filter by support department.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee_by",
            "in": "query",
            "required": false,
            "description": "Filter by assigned staff user ID.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to list support tickets. Review the response for the operation result or validation errors."
      }
    },
    "/ticket/get": {
      "get": {
        "tags": [
          "Support"
        ],
        "summary": "Get support ticket",
        "operationId": "GET_ticket_get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "ticket": {
                    "id": 1,
                    "subject": "Cannot access my invoices",
                    "user_id": 42,
                    "assignee_by": null,
                    "status": "open",
                    "support_department": "Billing",
                    "priority": "low",
                    "last_action": "Created",
                    "messages": [
                      {
                        "id": 10,
                        "support_ticket_id": 1,
                        "replay_by": 5,
                        "message": "<p>Thanks for reaching out, we are looking into this.</p>"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "404": {
            "description": "Support ticket not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Support ticket ID: 1 not found."
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Support ticket ID.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to get support ticket. Review the response for the operation result or validation errors."
      }
    },
    "/ticket/reply": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Reply to support ticket",
        "operationId": "POST_ticket_reply",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "message": {
                    "id": 10,
                    "support_ticket_id": 1,
                    "replay_by": 5,
                    "message": "<p>Thanks for reaching out, we are looking into this.</p>"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "404": {
            "description": "Support ticket not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Support ticket ID: 1 not found."
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Support ticket ID."
                  },
                  "message": {
                    "type": "string",
                    "description": "Reply message. Standard rich text formatting is allowed; emojis and unsupported HTML tags are rejected."
                  }
                },
                "required": [
                  "id",
                  "message"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to reply to support ticket. Review the response for the operation result or validation errors."
      }
    },
    "/ticket/delete": {
      "post": {
        "tags": [
          "Support"
        ],
        "summary": "Delete support ticket",
        "operationId": "POST_ticket_delete",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                "example": {
                  "success": true,
                  "message": "Support ticket ID: 1 deleted."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Invalid API Key"
                }
              }
            }
          },
          "404": {
            "description": "Support ticket not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Support ticket ID: 1 not found."
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": {
                    "id": [
                      "The id field is required."
                    ]
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key does not have permission for this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "errors": "Insufficient permissions for this endpoint."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Support ticket ID. Deleting a ticket also deletes all of its messages."
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Use this BillingServ API endpoint to delete support ticket. Review the response for the operation result or validation errors."
      }
    },
    "/license/activate": {
      "post": {
        "tags": [
          "Licensing"
        ],
        "summary": "Activate a software license",
        "operationId": "POST_license_activate",
        "description": "Registers a device or server installation against a license key. Server installations are bound to the configured domain, IP address, and installation-path policies. The license key is the credential; no bearer token is required.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseActivationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "License activated or existing activation refreshed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseActivationResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "403": {
            "description": "License is suspended, expired, deactivated, or registered to a different installation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "License key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed or the activation limit was reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/license/validate": {
      "post": {
        "tags": [
          "Licensing"
        ],
        "summary": "Validate a software license",
        "operationId": "POST_license_validate",
        "description": "Validates an existing activation and refreshes its last-check timestamp. A valid response includes a short-lived Ed25519-signed offline token for temporary use when the API cannot be reached.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseValidationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation completed. Inspect the `valid` and `reason` properties.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseValidationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "404": {
            "description": "License key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/license/deactivate": {
      "post": {
        "tags": [
          "Licensing"
        ],
        "summary": "Deactivate a license installation",
        "operationId": "POST_license_deactivate",
        "description": "Deactivates the matching device or server instance and releases its activation slot.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseDeactivationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deactivation processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseDeactivationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "404": {
            "description": "License key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenseErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "billingServEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Receive a BillingServ webhook event",
        "description": "BillingServ sends this request to the HTTPS endpoint configured on the API Information page. When a Webhook Signing Secret is configured, verify the BillingServ-Signature header against the exact raw request body before parsing it. Persist or enqueue the event and respond within 10 seconds. Deliveries may be retried and should be deduplicated using the event ID.",
        "operationId": "billingServWebhookEvent",
        "parameters": [
          {
            "name": "Webhook-Id",
            "in": "header",
            "required": true,
            "description": "Unique event ID. Matches the payload `id` and can be used as an idempotency key.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Webhook-Event",
            "in": "header",
            "required": true,
            "description": "Event name. Matches the payload `type`.",
            "schema": {
              "$ref": "#/components/schemas/WebhookEventType"
            }
          },
          {
            "name": "BillingServ-Signature",
            "in": "header",
            "required": false,
            "description": "Optional HMAC-SHA-256 signature. When a Webhook Signing Secret is configured, the format is `t=<unix_timestamp>,v1=<hex_signature>` and the signature covers `timestamp + \".\" + raw request body`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEnvelope"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event accepted"
          },
          "204": {
            "description": "Event accepted with no response body"
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Use `Authorization: Bearer <live_api_key>`."
      }
    },
    "responses": {
      "ApiBadRequest": {
        "description": "The request could not be processed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            }
          }
        }
      },
      "ApiConflict": {
        "description": "The request conflicts with the current resource state.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            }
          }
        }
      },
      "ApiNotFound": {
        "description": "The requested resource was not found or is not available to this API account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            }
          }
        }
      },
      "ApiServerError": {
        "description": "The server could not complete the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            }
          }
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Optional key for `POST /customer/create`, `POST /invoice/create-quote`, `POST /invoice/create-invoice`, `POST /invoice/update-invoice`, and `POST /order/add-order`. Reusing the same key with the same request replays a successful response for 24 hours; reusing it with a different request returns 409.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[A-Za-z0-9._-]{1,100}$"
        }
      }
    },
    "schemas": {
      "InvoiceRecordRequest": {
        "type": "object",
        "description": "Optional invoice line-item arrays. Entries at the same index form one line item.",
        "properties": {
          "item": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "quantity": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "tax_class": {
            "type": "array",
            "items": {}
          },
          "tax": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "additionalProperties": true
      },
      "OrderOptionsRequest": {
        "type": "object",
        "description": "Matching option arrays. Each index represents one selected package option.",
        "properties": {
          "id": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "amount": {
            "type": "array",
            "items": {
              "type": "number",
              "minimum": 0
            }
          },
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cycle_type": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "required": [
          "id",
          "amount",
          "value",
          "cycle_type"
        ],
        "additionalProperties": true
      },
      "StaffPermissionsRequest": {
        "type": "object",
        "description": "Optional staff permissions. Set a permission to `Y` to enable it.",
        "properties": {
          "dashboard": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "packages": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "customers": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "invoices": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "marketing": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "reports": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "support": {
            "type": "string",
            "enum": [
              "Y"
            ]
          },
          "settings": {
            "type": "string",
            "enum": [
              "Y"
            ]
          }
        },
        "additionalProperties": true
      },
      "VatSettingsRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "number": {
            "type": "string",
            "maxLength": 255
          }
        },
        "additionalProperties": true
      },
      "WebhookEventType": {
        "type": "string",
        "enum": [
          "webhook.test",
          "payment.succeeded",
          "payment.failed",
          "customer.created",
          "customer.updated",
          "customer.deleted",
          "customer.restored",
          "order.created",
          "order.updated",
          "order.deleted",
          "order.restored",
          "subscription.cancelled",
          "subscription.renewed",
          "invoice.created",
          "invoice.updated",
          "invoice.paid",
          "invoice.deleted",
          "invoice.restored",
          "credit_note.created",
          "credit_note.updated",
          "credit_note.deleted",
          "support_ticket.created",
          "support_ticket.updated",
          "support_ticket.deleted",
          "support_ticket.message_created"
        ]
      },
      "WebhookEnvelope": {
        "type": "object",
        "description": "Common envelope used for every outbound BillingServ webhook.",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique event ID."
          },
          "type": {
            "$ref": "#/components/schemas/WebhookEventType"
          },
          "version": {
            "type": "string",
            "const": "1",
            "description": "Webhook envelope version. The current version is `1`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookTestData"
              },
              {
                "$ref": "#/components/schemas/PaymentWebhookData"
              },
              {
                "$ref": "#/components/schemas/CustomerWebhookData"
              },
              {
                "$ref": "#/components/schemas/InvoiceWebhookData"
              },
              {
                "$ref": "#/components/schemas/OrderWebhookData"
              },
              {
                "$ref": "#/components/schemas/CreditNoteWebhookData"
              },
              {
                "$ref": "#/components/schemas/SupportTicketWebhookData"
              },
              {
                "$ref": "#/components/schemas/SupportTicketMessageWebhookData"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "created_at",
          "data"
        ]
      },
      "WebhookTestData": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "examples": [
              "This is a test webhook from BillingServ."
            ]
          }
        },
        "required": [
          "message"
        ]
      },
      "PaymentWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "transaction_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoice_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "customer_id": {
            "type": "integer"
          },
          "gateway": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "currency_id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed"
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "CustomerWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "vat_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_verified_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "updated_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "deleted_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "InvoiceWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "invoice_number": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "customer_id": {
            "type": "integer"
          },
          "order_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tax": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "total": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "currency_id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "unpaid",
              "paid",
              "overdue",
              "refunded",
              "cancelled",
              "pending",
              "unknown"
            ]
          },
          "due_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "comments": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimate": {
            "type": "boolean"
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "updated_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "deleted_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "OrderWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "customer_id": {
            "type": "integer"
          },
          "package_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "cycle_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "price": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "currency_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "domain_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancellation_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_invoice": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "next_invoice": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "cancelled_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "updated_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "deleted_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "CreditNoteWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "credit_note_number": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "invoice_id": {
            "type": "integer"
          },
          "customer_id": {
            "type": "integer"
          },
          "amount": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "tax_amount": {
            "$ref": "#/components/schemas/MoneyAmount"
          },
          "currency_id": {
            "type": "integer"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "added_to_account_credit": {
            "type": "boolean"
          },
          "issued_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "updated_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "SupportTicketWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "customer_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "order_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "subject": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "department": {
            "type": [
              "string",
              "null"
            ]
          },
          "assignee_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_address": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "last_action": {
            "type": [
              "string",
              "null"
            ]
          },
          "sla_due_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "first_response_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          },
          "updated_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "SupportTicketMessageWebhookData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "ticket_id": {
            "type": "integer"
          },
          "author_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "message": {
            "type": "string",
            "description": "Sanitized HTML may be present."
          },
          "created_at": {
            "$ref": "#/components/schemas/NullableDateTime"
          }
        }
      },
      "MoneyAmount": {
        "type": "string",
        "pattern": "^-?[0-9]+\\.[0-9]{2}$",
        "examples": [
          "100.00"
        ],
        "description": "Decimal money value serialized as a string."
      },
      "NullableDateTime": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "HostedCheckoutResponse": {
        "type": "object",
        "description": "A hosted checkout URL created by BillingServ. The URL expires after 30 minutes if it is not completed.",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "message": {
            "type": "string",
            "example": "Successfully"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Hosted checkout URL to open or redirect the customer to."
          }
        },
        "required": [
          "success",
          "message",
          "url"
        ],
        "additionalProperties": true
      },
      "CheckoutPackageRequest": {
        "type": "object",
        "description": "Creates hosted checkout for an existing package and billing cycle.",
        "properties": {
          "package_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Package or order-group package ID to add to checkout."
          },
          "cycle_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Billing cycle ID for the selected package."
          },
          "callback_url": {
            "type": "string",
            "format": "uri",
            "description": "URL BillingServ redirects to after hosted checkout succeeds or fails."
          },
          "customer_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Optional existing BillingServ customer user ID. If supplied, the user must have account_type 2."
          }
        },
        "required": [
          "package_id",
          "cycle_id",
          "callback_url"
        ],
        "additionalProperties": false
      },
      "CheckoutDomainRequest": {
        "type": "object",
        "description": "Creates hosted checkout for one available domain registration.",
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 255,
            "description": "Full domain name to register, including its extension, such as `billingserv.co.uk`."
          },
          "years": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "description": "Registration period in years. The account domain setting may allow a lower maximum."
          },
          "callback_url": {
            "type": "string",
            "format": "uri",
            "description": "URL BillingServ redirects to after hosted checkout succeeds or fails."
          },
          "customer_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Optional existing BillingServ customer user ID. If supplied, the user must have account_type 2."
          }
        },
        "required": [
          "domain",
          "years",
          "callback_url"
        ],
        "additionalProperties": false
      },
      "DomainCheckoutItem": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 255,
            "description": "Full domain name to register, including its extension."
          },
          "years": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "description": "Registration period in years. The account domain setting may allow a lower maximum."
          }
        },
        "required": [
          "domain",
          "years"
        ],
        "additionalProperties": false
      },
      "CheckoutDomainsRequest": {
        "type": "object",
        "description": "Creates one hosted checkout containing up to 50 available domain registrations.",
        "properties": {
          "domains": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/DomainCheckoutItem"
            }
          },
          "callback_url": {
            "type": "string",
            "format": "uri",
            "description": "URL BillingServ redirects to after hosted checkout succeeds or fails."
          },
          "customer_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Optional existing BillingServ customer user ID. If supplied, the user must have account_type 2."
          }
        },
        "required": [
          "domains",
          "callback_url"
        ],
        "additionalProperties": false
      },
      "DomainLookupRequest": {
        "type": "object",
        "description": "Search for a domain name without its extension. The API normalizes surrounding whitespace and letter casing.",
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 63,
            "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$",
            "description": "Domain name without an extension, such as `billingserv`. Do not include `.com` or another extension."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 50,
            "description": "Maximum number of enabled extensions to check."
          }
        },
        "required": [
          "domain"
        ],
        "additionalProperties": false
      },
      "DomainAvailabilityResult": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "Complete domain name checked by the registrar."
          },
          "extension": {
            "type": "string",
            "description": "Domain extension, without a leading dot."
          },
          "available": {
            "type": "boolean"
          },
          "premium": {
            "type": "boolean",
            "description": "Whether the registrar marked the domain as premium."
          }
        },
        "required": [
          "domain",
          "extension",
          "available",
          "premium"
        ],
        "additionalProperties": false
      },
      "DomainLookupResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "domain": {
            "type": "string",
            "description": "Normalized domain name that was searched."
          },
          "registrar": {
            "type": "string",
            "description": "Registrar used for this availability check."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DomainAvailabilityResult"
            }
          }
        },
        "required": [
          "success",
          "domain",
          "registrar",
          "results"
        ],
        "additionalProperties": true
      },
      "ApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "errors": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": true
              }
            ]
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error category when provided."
          },
          "request_id": {
            "type": "string",
            "description": "Request identifier returned in the X-Request-ID response header."
          }
        },
        "additionalProperties": true
      },
      "ValidationErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "errors": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "string"
              }
            ]
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error category when provided."
          },
          "request_id": {
            "type": "string",
            "description": "Request identifier returned in the X-Request-ID response header."
          }
        },
        "additionalProperties": true
      },
      "UsageThreshold": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string",
            "example": "warning"
          },
          "threshold": {
            "type": "integer",
            "enum": [
              10,
              25
            ]
          },
          "message": {
            "type": "string",
            "example": "Free usage is below 10%."
          }
        },
        "additionalProperties": true
      },
      "UsageStatus": {
        "type": "object",
        "properties": {
          "used": {
            "type": "number",
            "description": "Total unbilled usage recorded for this metric."
          },
          "remaining_free": {
            "type": "number",
            "description": "Remaining included allowance before overage billing applies."
          },
          "remaining_free_percent": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Percentage of included allowance remaining. Null when the metric has no included allowance."
          },
          "overage_qty": {
            "type": "number",
            "description": "Quantity above the included allowance."
          },
          "billable_qty": {
            "type": "number",
            "description": "Quantity currently billable in arrears."
          },
          "current_unbilled_amount": {
            "type": "string",
            "description": "Current unbilled amount for this metric, formatted with four decimal places."
          },
          "threshold": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UsageThreshold"
              },
              {
                "type": "null"
              }
            ],
            "description": "Warning information when free allowance is below 25% or 10%; otherwise null."
          }
        },
        "additionalProperties": true
      },
      "UsageMeter": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Package usage metric ID."
          },
          "name": {
            "type": "string",
            "description": "Usage metric name. Use this value as `name` when recording usage."
          },
          "unit_label": {
            "type": "string",
            "description": "Display label for the usage unit."
          },
          "included_allowance": {
            "type": "number",
            "description": "Included free quantity for this metric."
          },
          "unit_price": {
            "type": "string",
            "description": "Overage unit price formatted with six decimal places."
          },
          "usage": {
            "$ref": "#/components/schemas/UsageStatus"
          }
        },
        "additionalProperties": true
      },
      "UsageMetersResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageMeter"
            }
          }
        },
        "additionalProperties": true
      },
      "UsageEventRequest": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer",
            "description": "Customer ID that owns the order."
          },
          "order_id": {
            "type": "integer",
            "description": "Order ID to record usage against."
          },
          "name": {
            "type": "string",
            "description": "Usage metric name configured on the order package."
          },
          "qty": {
            "type": "number",
            "minimum": 1,
            "description": "Usage quantity to add. Must be at least 1."
          },
          "payload": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "array",
                "items": []
              },
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional metadata stored with the usage event. Non-object values are wrapped by the API under `value`."
          }
        },
        "required": [
          "customer_id",
          "order_id",
          "name",
          "qty"
        ],
        "additionalProperties": true
      },
      "UsageEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Recorded usage event ID."
          },
          "metric": {
            "type": "string",
            "description": "Usage metric name."
          },
          "qty": {
            "type": "number",
            "description": "Quantity recorded by this event."
          },
          "unit_price": {
            "type": "string",
            "description": "Overage unit price formatted with six decimal places."
          },
          "billable_qty": {
            "type": "number",
            "description": "Portion of this event that became billable after allowance was applied."
          },
          "free_qty": {
            "type": "number",
            "description": "Portion of this event deducted from the remaining free allowance."
          },
          "amount": {
            "type": "number",
            "description": "Incremental billable amount created by this event."
          },
          "usage": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UsageStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "meter": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UsageMeter"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Stored payload metadata for the event."
          }
        },
        "additionalProperties": true
      },
      "UsageEventResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/UsageEvent"
          }
        },
        "additionalProperties": true
      },
      "LicenseStatus": {
        "type": "string",
        "enum": [
          "active",
          "reissued",
          "suspended",
          "expired",
          "revoked"
        ]
      },
      "LicenseActivationRequest": {
        "type": "object",
        "properties": {
          "license_key": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "maxLength": 255,
            "description": "Stable device UUID or server installation identifier."
          },
          "instance_type": {
            "type": "string",
            "enum": [
              "device",
              "server"
            ]
          },
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Required for server activations."
          },
          "installation_path": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2048,
            "description": "Required for server activations."
          },
          "device_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "operating_system": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "application_version": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        },
        "required": [
          "license_key",
          "instance",
          "instance_type"
        ],
        "additionalProperties": false
      },
      "LicenseValidationRequest": {
        "type": "object",
        "properties": {
          "license_key": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "maxLength": 255
          },
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "installation_path": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2048
          },
          "application_version": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        },
        "required": [
          "license_key",
          "instance"
        ],
        "additionalProperties": false
      },
      "LicenseDeactivationRequest": {
        "type": "object",
        "properties": {
          "license_key": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "license_key",
          "instance"
        ],
        "additionalProperties": false
      },
      "LicenseActivationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "activated": {
            "type": "boolean"
          },
          "instance": {
            "type": "string"
          },
          "instance_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "device",
              "server",
              null
            ]
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "activations_used": {
            "type": "integer",
            "minimum": 0
          },
          "activation_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          }
        },
        "required": [
          "success",
          "activated",
          "instance",
          "instance_type",
          "domain",
          "activations_used",
          "activation_limit"
        ]
      },
      "LicenseValidationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "valid": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/LicenseStatus"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "license_reissued",
              "license_suspended",
              "license_expired",
              "license_revoked",
              "activation_not_found",
              "installation_mismatch",
              null
            ]
          },
          "activations_used": {
            "type": "integer",
            "minimum": 0
          },
          "activation_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "offline_token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Ed25519-signed compact offline validation token; only returned when valid."
          },
          "offline_public_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base64url-encoded Ed25519 public key."
          },
          "offline_expires_at": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Unix timestamp at which the offline token expires."
          }
        },
        "required": [
          "success",
          "valid",
          "status",
          "reason",
          "activations_used",
          "activation_limit",
          "offline_token",
          "offline_public_key",
          "offline_expires_at"
        ]
      },
      "LicenseDeactivationResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "deactivated": {
            "type": "boolean"
          }
        },
        "required": [
          "success",
          "deactivated"
        ]
      },
      "LicenseErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "error"
        ]
      },
      "DigitalDeliverySettings": {
        "type": "object",
        "description": "Digital download and software licensing configuration for the package. Omitted properties are normalized to their documented defaults.",
        "properties": {
          "delivery_enabled": {
            "type": "boolean",
            "default": false
          },
          "download_policy": {
            "type": "string",
            "enum": [
              "open",
              "cap_limited",
              "time_limited"
            ],
            "default": "open"
          },
          "max_downloads": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Used when `download_policy` is `cap_limited`."
          },
          "link_expiry_hours": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Hours after the first download; used when `download_policy` is `time_limited`."
          },
          "ip_locked": {
            "type": "boolean",
            "readOnly": true,
            "description": "Always enabled by the server when digital downloads are enabled."
          },
          "watermark_pdfs": {
            "type": "boolean",
            "default": false
          },
          "licensing_enabled": {
            "type": "boolean",
            "default": false
          },
          "activation_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Null permits unlimited installations."
          },
          "customer_license_management": {
            "type": "boolean",
            "default": false
          },
          "maximum_reissues": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Maximum customer-initiated reissues; null permits unlimited reissues."
          },
          "enforce_domain": {
            "type": "boolean",
            "default": true
          },
          "enforce_ip": {
            "type": "boolean",
            "default": false
          },
          "enforce_installation_path": {
            "type": "boolean",
            "default": true
          },
          "license_key_prefix": {
            "type": "string",
            "maxLength": 12,
            "pattern": "^[A-Za-z0-9]*$"
          },
          "license_key_length": {
            "type": "integer",
            "minimum": 12,
            "maximum": 64,
            "default": 20
          },
          "offline_cache_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1440,
            "default": 5
          }
        },
        "additionalProperties": false
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
