{
  "openapi": "3.1.0",
  "info": {
    "title": "Valdyr API",
    "version": "2026-09-01.bullfinch",
    "description": "The Valdyr API provides all you need to own your user's connectivity experience.\n\nGo back to [Valdyr.tech](https://valdyr.tech)\n",
    "license": {
      "name": "Proprietary",
      "identifier": "LicenseRef-Valdyr-Proprietary"
    }
  },
  "servers": [
    {
      "url": "{BASE_URL}",
      "description": "The base URL for the API, provided for your domain.",
      "variables": {
        "BASE_URL": {
          "default": "https://apiv2.example.com/api/v2",
          "description": "The base URL for your domain."
        }
      }
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "bearerAuth": [],
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Auth",
      "description": "Authenticate users and obtain access tokens."
    },
    {
      "name": "Users",
      "description": "Manage users."
    },
    {
      "name": "Customers",
      "description": "Manage customers."
    },
    {
      "name": "Subscriptions",
      "description": "Manage subscriptions and subscription."
    },
    {
      "name": "Subscription Actions",
      "description": "Start actions on subscriptions, and follow the progress of each action."
    },
    {
      "name": "Subscription Addons",
      "description": "Manage subscription addons."
    },
    {
      "name": "Subscription Usage",
      "description": "Get subscription usage."
    },
    {
      "name": "Tags",
      "description": "Manage the tags of subscriptions, customers and licenses."
    },
    {
      "name": "Subscribers",
      "description": "Manage subscribers."
    },
    {
      "name": "Licenses",
      "description": "Manage licenses."
    },
    {
      "name": "Product Offerings",
      "description": "Browse product offerings."
    },
    {
      "name": "Product Catalogs",
      "description": "Browse product catalogs."
    },
    {
      "name": "Product Discounts",
      "description": "Discounts and promotions."
    },
    {
      "name": "Orders",
      "description": "Manage orders and line items."
    },
    {
      "name": "Payment Intents",
      "description": "Inspect the amounts the platform is collecting, including attempts, refunds, and billed items."
    },
    {
      "name": "Payment Links",
      "description": "Create and manage payment links for orders and invoices."
    },
    {
      "name": "Payment Sessions",
      "description": "Create and manage payment sessions for orders."
    },
    {
      "name": "Payment Profiles",
      "description": "Manage customer payment profiles and methods."
    },
    {
      "name": "Payment Profile Sessions",
      "description": "Create sessions for setting up payment profiles."
    },
    {
      "name": "Signing sessions",
      "description": "Handle contract signing sessions for postpaid orders."
    },
    {
      "name": "Porting",
      "description": "Manage number porting for subscriptions."
    },
    {
      "name": "Invoices",
      "description": "Read the final invoices of the customers, their charges and their payments."
    },
    {
      "name": "Tools",
      "description": "Tools for address validation, number porting, device info, and network coverage."
    },
    {
      "name": "Inventory",
      "description": "Manage phone number inventory, SIM cards, and reservations."
    },
    {
      "name": "Workflows",
      "description": "Dynamic processing of customer journeys and events."
    },
    {
      "name": "Reports",
      "description": "Retrieve generated reports and download their files."
    }
  ],
  "paths": {
    "/auth/email/start": {
      "post": {
        "summary": "Start email login",
        "description": "Initiates an email-based login flow by sending a verification code to the provided email address.\n\nThe response includes a nonce that must be used when verifying the login, along with timing information for the verification code.\n\nThis endpoint always returns 202 Accepted to prevent email enumeration attacks.\n",
        "operationId": "startEmailLogin",
        "tags": [
          "Auth"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartEmailLoginRequest"
              },
              "example": {
                "email": "john.doe@example.com"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Login flow initiated. A verification code has been sent to the email address if it exists in the system.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartEmailLoginResponse"
                },
                "example": {
                  "nonce": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "expiresIn": 300,
                  "createdAt": "2024-01-15T10:30:00Z",
                  "expiresAt": "2024-01-15T10:35:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/auth/email/verify": {
      "post": {
        "summary": "Verify email login",
        "description": "Verifies an email login by validating the verification code sent to the email address.\n\nOn success, returns an OAuth2-style bearer token response with:\n- `accessToken`: JWT token for authenticating subsequent API requests\n- `tokenType`: Always \"Bearer\"\n- `expiresIn`: Token lifetime in seconds\n- `userId`: The authenticated user's identifier\n\nUse the access token in the Authorization header: `Authorization: Bearer {accessToken}`\n",
        "operationId": "verifyEmailLogin",
        "tags": [
          "Auth"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailLoginRequest"
              },
              "example": {
                "email": "john.doe@example.com",
                "nonce": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "code": "123456"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Login verified successfully. Returns access token for API authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                },
                "example": {
                  "accessToken": "\u003caccess-token\u003e",
                  "tokenType": "Bearer",
                  "expiresIn": 604800,
                  "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/auth/sms/start": {
      "post": {
        "summary": "Start SMS login",
        "description": "Starts a login by SMS. A verification code goes to the phone number of the user.\n\nThe response contains the nonce for the verification, and the validity of the code.\n\nThe response is 202 Accepted also when no user has the phone number. Thus a caller cannot find out which phone numbers belong to an account.\n",
        "operationId": "startSmsLogin",
        "tags": [
          "Auth"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSmsLoginRequest"
              },
              "example": {
                "msisdn": "+15551234567"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The login started. If a user has the phone number, the phone number gets a verification code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartSmsLoginResponse"
                },
                "example": {
                  "nonce": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "expiresIn": 300,
                  "createdAt": "2024-01-15T10:30:00Z",
                  "expiresAt": "2024-01-15T10:35:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/auth/sms/verify": {
      "post": {
        "summary": "Verify SMS login",
        "description": "Completes a login by SMS with the verification code that the phone number received.\n\nThe response is an OAuth2 bearer token response:\n- `accessToken`: The JWT that authenticates the next API requests\n- `tokenType`: Always \"Bearer\"\n- `expiresIn`: The lifetime of the token in seconds\n- `userId`: The identifier of the user\n\nSend the access token in the Authorization header: `Authorization: Bearer {accessToken}`\n",
        "operationId": "verifySmsLogin",
        "tags": [
          "Auth"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifySmsLoginRequest"
              },
              "example": {
                "msisdn": "+15551234567",
                "nonce": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "code": "123456"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The code is correct. The response contains the access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                },
                "example": {
                  "accessToken": "\u003caccess-token\u003e",
                  "tokenType": "Bearer",
                  "expiresIn": 604800,
                  "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/users": {
      "get": {
        "summary": "List users",
        "description": "List all users.\n\nWill return all users the requester has access to.\n",
        "operationId": "listUsers",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "description": "A free text search string to filter users by name or email."
          },
          {
            "in": "query",
            "name": "customerId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of users.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create user",
        "description": "Create a new user.",
        "operationId": "createUser",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              },
              "example": {
                "name": "John Doe",
                "email": "john.doe@example.com",
                "msisdn": "+15551234567",
                "role": "ADMIN",
                "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                "referenceId": "hr-employee-98765"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                },
                "example": {
                  "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                  "name": "John Doe",
                  "email": "john.doe@example.com",
                  "msisdn": "+15551234567",
                  "referenceId": "hr-employee-98765",
                  "customers": [
                    {
                      "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                      "name": "Acme Corp"
                    }
                  ],
                  "createdAt": "2024-01-15T10:30:00Z",
                  "updatedAt": "2024-01-15T10:30:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/users/{userId}": {
      "get": {
        "summary": "Get user",
        "description": "Get a user by ID or referenceId.",
        "operationId": "getUser",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the user. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_hr-employee-98765`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "User details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "summary": "Update user",
        "description": "Update an existing user.",
        "operationId": "updateUser",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the user. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_hr-employee-98765`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "User updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customers": {
      "get": {
        "summary": "List customers",
        "description": "List all customers.\n\nWill return all customers the requester has access to.\n",
        "operationId": "listCustomers",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "description": "A free text search string to filter customers."
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of customers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Customer"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                      "customerType": "BUSINESS",
                      "name": "Acme Corp",
                      "humanReadableId": "29A-BY3Z-X78",
                      "referenceId": "crm-customer-12345",
                      "preferredLocale": "en-US",
                      "contact": {
                        "email": "john.doe@example.com",
                        "msisdn": "+15551234567"
                      },
                      "billing": {
                        "method": "EMAIL_INVOICE",
                        "email": "billing@example.com",
                        "currency": "USD",
                        "autoPay": false
                      },
                      "users": [
                        {
                          "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                          "name": "John Doe",
                          "role": "ADMIN"
                        }
                      ],
                      "contactPerson": {
                        "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                        "name": "John Doe",
                        "role": "ADMIN"
                      },
                      "shippingAddress": {
                        "street": "123 Main Street",
                        "city": "New York",
                        "zip": "10001",
                        "state": "NY",
                        "country": "US"
                      },
                      "deliveryAddress": {
                        "street": "123 Main Street",
                        "city": "New York",
                        "zip": "10001",
                        "state": "NY",
                        "country": "US"
                      }
                    }
                  ],
                  "pagination": {
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create customer",
        "description": "Create a new customer.",
        "operationId": "createCustomer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              },
              "example": {
                "customerType": "BUSINESS",
                "name": "Acme Corp",
                "referenceId": "crm-customer-12345",
                "preferredLocale": "en-US",
                "contact": {
                  "email": "john.doe@example.com",
                  "msisdn": "+15551234567"
                },
                "billing": {
                  "method": "EMAIL_INVOICE",
                  "email": "billing@example.com",
                  "currency": "USD"
                },
                "userIds": [
                  "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
                ],
                "contactPersonUserId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                "shippingAddress": {
                  "street": "123 Main Street",
                  "city": "New York",
                  "zip": "10001",
                  "state": "NY",
                  "country": "US"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Customer created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "example": {
                  "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                  "customerType": "BUSINESS",
                  "name": "Acme Corp",
                  "humanReadableId": "29A-BY3Z-X78",
                  "referenceId": "crm-customer-12345",
                  "preferredLocale": "en-US",
                  "contact": {
                    "email": "john.doe@example.com",
                    "msisdn": "+15551234567"
                  },
                  "billing": {
                    "method": "EMAIL_INVOICE",
                    "email": "billing@example.com",
                    "currency": "USD",
                    "autoPay": false
                  },
                  "users": [
                    {
                      "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                      "name": "John Doe",
                      "role": "ADMIN"
                    }
                  ],
                  "contactPerson": {
                    "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                    "name": "John Doe",
                    "role": "ADMIN"
                  },
                  "shippingAddress": {
                    "street": "123 Main Street",
                    "city": "New York",
                    "zip": "10001",
                    "state": "NY",
                    "country": "US"
                  },
                  "deliveryAddress": {
                    "street": "123 Main Street",
                    "city": "New York",
                    "zip": "10001",
                    "state": "NY",
                    "country": "US"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customers/{customerId}": {
      "get": {
        "summary": "Get customer",
        "description": "Get a customer by ID or referenceId.",
        "operationId": "getCustomer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Customer details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "example": {
                  "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                  "customerType": "BUSINESS",
                  "name": "Acme Corp",
                  "humanReadableId": "29A-BY3Z-X78",
                  "referenceId": "crm-customer-12345",
                  "preferredLocale": "en-US",
                  "contact": {
                    "email": "john.doe@example.com",
                    "msisdn": "+15551234567"
                  },
                  "billing": {
                    "method": "EMAIL_INVOICE",
                    "email": "billing@example.com",
                    "currency": "USD",
                    "autoPay": false
                  },
                  "users": [
                    {
                      "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                      "name": "John Doe",
                      "role": "ADMIN"
                    }
                  ],
                  "contactPerson": {
                    "userId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                    "name": "John Doe",
                    "role": "ADMIN"
                  },
                  "shippingAddress": {
                    "street": "123 Main Street",
                    "city": "New York",
                    "zip": "10001",
                    "state": "NY",
                    "country": "US"
                  },
                  "deliveryAddress": {
                    "street": "123 Main Street",
                    "city": "New York",
                    "zip": "10001",
                    "state": "NY",
                    "country": "US"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "summary": "Update customer",
        "description": "Update an existing customer.",
        "operationId": "updateCustomer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCustomerRequest"
              },
              "examples": {
                "updateContact": {
                  "summary": "Update customer contact information",
                  "value": {
                    "contact": {
                      "email": "newemail@example.com",
                      "msisdn": "+15559876543"
                    }
                  }
                },
                "updateBilling": {
                  "summary": "Update billing method and address",
                  "value": {
                    "billing": {
                      "method": "PAPER_INVOICE",
                      "address": {
                        "street": "789 Business Blvd",
                        "city": "Chicago",
                        "state": "IL",
                        "zip": "60601",
                        "country": "US"
                      },
                      "currency": "USD"
                    }
                  }
                },
                "fullUpdate": {
                  "summary": "Complete customer update",
                  "value": {
                    "name": "Updated Customer Name",
                    "preferredLocale": "sv-SE",
                    "contact": {
                      "email": "updated@example.com",
                      "msisdn": "+46701234567"
                    },
                    "billing": {
                      "method": "EMAIL_INVOICE",
                      "email": "billing@updated.com",
                      "currency": "SEK",
                      "autoPay": true
                    },
                    "shippingAddress": {
                      "street": "Updated Street 123",
                      "city": "Stockholm",
                      "zip": "11122",
                      "country": "SE"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Customer updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customers/{customerId}/users": {
      "delete": {
        "summary": "Remove user from customer",
        "description": "Remove a user from a customer. The user keeps their account, so they can still be added to\nanother customer later, but loses the roles and permissions this customer granted them.\n\nA customer's contact person cannot be removed — assign another contact person first.\n",
        "operationId": "removeUserFromCustomer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "query",
            "name": "userId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the user to remove from the customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_hr-employee-98765`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "User removed from customer successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/customers/{customerId}/product-catalog": {
      "get": {
        "summary": "Get customer product catalog",
        "description": "Get the customer's product catalog, this is a combination of the default product catalog configured in the system and\nother product catalogs assigned to the customer.\n",
        "operationId": "getCustomerProductCatalog",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "customerId",
            "required": true,
            "description": "The unique identifier of the customer to fetch the product catalog for. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Customer product catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "The customer's product catalog is a combination of the default product catalog configured in the system and\nother product catalogs assigned to the customer.\n",
                  "additionalProperties": false,
                  "properties": {
                    "productOfferingGroups": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOfferingGroup"
                      },
                      "description": "The product groups in this catalog."
                    },
                    "productOfferings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOffering"
                      },
                      "description": "The product offerings available in this catalog."
                    },
                    "initialProductOfferingIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The initial product offerings. An order can take them on a `SUBSCRIPTION` line item or on an `EXTERNAL_PRODUCT` line item.\nIf no catalog of the customer limits its initial offerings, the list holds each product offering of the catalog.\nA catalog that limits its initial offerings gives only the product offerings of its list.\nAn add-on and an offering change do not use this list.\n"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions": {
      "get": {
        "summary": "List subscriptions",
        "description": "List all subscriptions.\n\nWill return all subscriptions the requester has access to.\n",
        "operationId": "listSubscriptions",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "customerId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SubscriptionStatus"
              }
            },
            "description": "The status of the subscription to filter by."
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SubscriptionType"
              }
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Subscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "subscriptionId": "d8174435-6378-4be5-a9f5-8b4aaadae5d4",
                      "referenceId": "crm-subscription-12345",
                      "status": "ACTIVATED",
                      "type": "CELL",
                      "display": "(555) 123-4567",
                      "msisdn": "+15551234567",
                      "tempNumber": false,
                      "customer": {
                        "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                        "name": "Acme Corp"
                      },
                      "productOffering": {
                        "productOfferingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "name": "Seamless 10GB",
                        "price": {
                          "netPriceMinor": 2999,
                          "currency": "USD",
                          "priceType": "RECURRING",
                          "billingCycle": {
                            "period": "MONTHLY",
                            "interval": 1
                          },
                          "standardDiscount": {
                            "amountMinor": 500
                          },
                          "bindingContract": {
                            "duration": {
                              "unit": "MONTHS",
                              "value": 12
                            },
                            "discount": {
                              "amountMinor": 200
                            }
                          },
                          "customUpfrontPayment": {
                            "billingCycles": 3,
                            "discount": {
                              "amountMinor": 300
                            }
                          },
                          "currencyOptionsMinor": {
                            "USD": 2999,
                            "SEK": 29900
                          }
                        }
                      },
                      "subscriber": {
                        "subscriberId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                        "name": "John Doe",
                        "email": "john.doe@example.com"
                      },
                      "sim": {
                        "esim": true,
                        "iccid": "8901240197155182976"
                      },
                      "activatedAt": "2024-01-15T10:30:00Z",
                      "createdAt": "2024-01-10T08:00:00Z",
                      "updatedAt": "2024-01-15T10:30:00Z",
                      "metadata": {
                        "costCenter": "eng-42"
                      }
                    }
                  ],
                  "pagination": {
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create subscription",
        "description": "Create a new subscription for a customer.\n\n**Activation Modes:**\n\n1. **Immediate Activation**\n   - Provide complete activation data in the request\n   - Omit scheduleActivationAt or set to today's date\n   - Subscription activates immediately (network availability permitting)\n\n2. **Scheduled Activation**\n   - Provide complete activation data in the request\n   - Set scheduleActivationAt to a future date\n   - Subscription activates on or after the specified date\n\n3. **Deferred Activation (Shell Subscription)**\n   - Omit activation data from the request\n   - Subscription created in PENDING state\n   - Use the activate endpoint later when activation details are available\n\n**Common use cases:**\n- Standard activation: Customer has all details ready (number choice, SIM type, porting info)\n- Scheduled activation: Activate on a specific date (e.g., start of billing cycle, go-live date)\n- Shell subscription: Bulk subscription creation, waiting for SIM delivery, phased onboarding\n\nThe product offering must be an initial product offering of the product catalog of the customer.\n`initialProductOfferingIds` of the customer product catalog names these product offerings. If the product offering\nis not one of them, the\nrequest gets status 400 with the `internalCode` `4334`.\n\n**Note**: This endpoint may be disabled when Seamless OS manages billing. In that configuration,\nsubscriptions are created through the orders endpoint instead.\n",
        "operationId": "createSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscription-actions": {
      "get": {
        "summary": "List subscription actions",
        "description": "List the actions of the subscriptions that you can access, newest scheduled first. The list does not include a removed plan that never started.",
        "operationId": "listSubscriptionActions",
        "tags": [
          "Subscription Actions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by customer IDs. When omitted, include all customers visible to the caller."
          },
          {
            "name": "subscriptionId",
            "in": "query",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "Optionally restrict results to one subscription of the selected customers."
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription actions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionAction"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscription-actions/{actionId}": {
      "get": {
        "summary": "Get subscription action",
        "description": "Get the execution state of an action. An action of a subscription that you cannot access and a missing action both return not found.",
        "operationId": "getSubscriptionAction",
        "tags": [
          "Subscription Actions"
        ],
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "Unique identifier of the action."
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription action retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionAction"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}": {
      "get": {
        "summary": "Get subscription",
        "description": "Retrieve detailed information about a specific subscription using its unique identifier.",
        "operationId": "getSubscriptionById",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "A subscription object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "example": {
                  "subscriptionId": "d8174435-6378-4be5-a9f5-8b4aaadae5d4",
                  "referenceId": "crm-subscription-12345",
                  "status": "ACTIVATED",
                  "type": "CELL",
                  "display": "(555) 123-4567",
                  "msisdn": "+15551234567",
                  "tempNumber": false,
                  "customer": {
                    "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                    "name": "Acme Corp"
                  },
                  "productOffering": {
                    "productOfferingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "name": "Seamless 10GB",
                    "price": {
                      "netPriceMinor": 2999,
                      "currency": "USD",
                      "priceType": "RECURRING",
                      "billingCycle": {
                        "period": "MONTHLY",
                        "interval": 1
                      },
                      "standardDiscount": {
                        "amountMinor": 500
                      },
                      "bindingContract": {
                        "duration": {
                          "unit": "MONTHS",
                          "value": 12
                        },
                        "discount": {
                          "amountMinor": 200
                        }
                      },
                      "customUpfrontPayment": {
                        "billingCycles": 3,
                        "discount": {
                          "amountMinor": 300
                        }
                      },
                      "currencyOptionsMinor": {
                        "USD": 2999,
                        "SEK": 29900
                      }
                    }
                  },
                  "subscriber": {
                    "subscriberId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                    "name": "John Doe",
                    "email": "john.doe@example.com"
                  },
                  "serviceAddress": {
                    "address": {
                      "street": "500 S Main St",
                      "street2": "Apt 1",
                      "city": "Natick",
                      "zip": "01701",
                      "state": "MA",
                      "country": "US"
                    },
                    "source": "SUBSCRIPTION"
                  },
                  "sim": {
                    "esim": true,
                    "iccid": "8901240197155182976"
                  },
                  "activatedAt": "2024-01-15T10:30:00Z",
                  "createdAt": "2024-01-10T08:00:00Z",
                  "updatedAt": "2024-01-15T10:30:00Z",
                  "metadata": {
                    "costCenter": "eng-42"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "patch": {
        "summary": "Update subscription",
        "description": "Change the fields of a subscription that a client can write. At this time, only `serviceAddress` is writable. A field that the request leaves out stays as it is. A request with no field changes nothing and returns the subscription.\n\nA new `serviceAddress` follows the rules of `PUT /subscriptions/{subscriptionId}/service-address`.\n",
        "operationId": "updateSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. The value can be an internal UUID or an external reference identifier with the `rid_` prefix.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The subscription. An activated subscription shows a new service address after the network operator accepts it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/action-options": {
      "get": {
        "summary": "List the action options of a subscription",
        "description": "List the actions that the caller can start on one subscription with `startSubscriptionAction`.\nRead it before you show the buttons for these actions.\n\n- An action is absent when the brand or the network operator does not offer it. Do not show it.\n- An action has `available` false when the state of the subscription refuses it now. Then\n  `refusalReason` is the `reason` that `startSubscriptionAction` gives.\n- An available action gives the date that it gets when the request names no date.\n\nThe End-User API applies the rules of the manager portal. The Platform API applies the rules of\nthe admin portal.\n",
        "operationId": "listActionOptionsOfSubscription",
        "tags": [
          "Subscription Actions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "The action options of the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionActionOption"
                      }
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "type": "CANCEL",
                      "available": false,
                      "refusalReason": "subscription_in_binding_period"
                    },
                    {
                      "type": "PAUSE",
                      "available": true,
                      "scheduleMode": "AT_SPECIFIED_DATE",
                      "effectiveDate": "2026-12-01"
                    },
                    {
                      "type": "BLOCK_SIM",
                      "available": true,
                      "scheduleMode": "IMMEDIATE",
                      "effectiveDate": "2026-11-30"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/actions": {
      "get": {
        "summary": "List the actions of a subscription",
        "description": "List the actions of one subscription, with the newest scheduled action first. An action records\na change to the subscription and the progress of that change. The list leaves out a removed action\nthat never started.\n",
        "operationId": "listActionsOfSubscription",
        "tags": [
          "Subscription Actions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "The actions of the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionAction"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Start an action on a subscription",
        "description": "Start an action on one subscription. The `type` of the body selects the action, and each type has\nits own fields.\n\n| `type` | What it does |\n| --- | --- |\n| `PAUSE` | Pauses the subscription. |\n| `RESTORE` | Restores a paused, suspended or blocked subscription. |\n| `CANCEL` | Cancels the subscription. |\n| `BLOCK_SIM` | Blocks the SIM card at once. The action has the type `BAR`. |\n| `RESET_NETWORK` | Resets the network services at the network operator. |\n\nThe response is the action. Read it again with `getActionOfSubscription` to follow its status.\n\nA `RESET_NETWORK` that started or ended in the last 15 minutes is given again, and no second reset\nstarts. If the brand or the network operator does not offer a network reset, the 409 response\ngives the `reason` `subscription_action_not_offered`.\n",
        "operationId": "startSubscriptionAction",
        "tags": [
          "Subscription Actions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSubscriptionActionRequest"
              },
              "example": {
                "type": "PAUSE",
                "scheduledAt": "2026-12-01"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The action started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionAction"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/actions/{actionId}": {
      "get": {
        "summary": "Get an action of a subscription",
        "description": "Get one action of a subscription and its progress. An action of another subscription gets the same\n404 response as a missing action.\n",
        "operationId": "getActionOfSubscription",
        "tags": [
          "Subscription Actions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "path",
            "name": "actionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the action."
          }
        ],
        "responses": {
          "200": {
            "description": "The action.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionAction"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/activate": {
      "post": {
        "summary": "Activate subscription",
        "description": "Activate a pending subscription by providing the necessary network activation details.\n\nUse this endpoint when a subscription was created as a \"shell\" without activation data.\n\nIf the subscription is not pending, an error will be returned.\n",
        "operationId": "activateSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivateSubscriptionRequest"
              },
              "example": {
                "activation": {
                  "msisdn": "+15551234567",
                  "leaseToken": "lease_abc123def456",
                  "sim": {
                    "esim": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription activation scheduled or completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "example": {
                  "subscriptionId": "d8174435-6378-4be5-a9f5-8b4aaadae5d4",
                  "referenceId": "crm-subscription-12345",
                  "status": "ACTIVATED",
                  "type": "CELL",
                  "display": "(555) 123-4567",
                  "msisdn": "+15551234567",
                  "tempNumber": false,
                  "customer": {
                    "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                    "name": "Acme Corp"
                  },
                  "productOffering": {
                    "productOfferingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "name": "Seamless 10GB",
                    "price": {
                      "netPriceMinor": 2999,
                      "currency": "USD",
                      "priceType": "RECURRING",
                      "billingCycle": {
                        "period": "MONTHLY",
                        "interval": 1
                      },
                      "standardDiscount": {
                        "amountMinor": 500
                      },
                      "bindingContract": {
                        "duration": {
                          "unit": "MONTHS",
                          "value": 12
                        },
                        "discount": {
                          "amountMinor": 200
                        }
                      },
                      "customUpfrontPayment": {
                        "billingCycles": 3,
                        "discount": {
                          "amountMinor": 300
                        }
                      },
                      "currencyOptionsMinor": {
                        "USD": 2999,
                        "SEK": 29900
                      }
                    }
                  },
                  "subscriber": {
                    "subscriberId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                    "name": "John Doe",
                    "email": "john.doe@example.com"
                  },
                  "sim": {
                    "esim": true,
                    "iccid": "8901240197155182976"
                  },
                  "activatedAt": "2024-01-15T10:30:00Z",
                  "createdAt": "2024-01-10T08:00:00Z",
                  "updatedAt": "2024-01-15T10:30:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/in-porting": {
      "get": {
        "summary": "Get subscription in-porting",
        "description": "Deprecated. Use `GET /port-ins?subscriptionId={subscriptionId}\u0026latest=true`.\n\nRetrieve the current porting information for a subscription that is in the process of porting in a number.\n",
        "deprecated": true,
        "operationId": "getSubscriptionInPorting",
        "tags": [
          "Subscriptions",
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Porting information retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Porting"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Update subscription porting details",
        "description": "Deprecated. Use `PUT /subscriptions/{subscriptionId}/port-ins/{portInId}/details`.\n\nChange the porting details of the pending port-in attempt of the subscription. The rules of\n`PUT /subscriptions/{subscriptionId}/port-ins/{portInId}/details` apply.\n",
        "deprecated": true,
        "operationId": "updateSubscriptionPorting",
        "tags": [
          "Subscriptions",
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePortingRequest"
              },
              "example": {
                "details": {
                  "identity": "199001011234"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Porting details updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/Subscription"
                    },
                    "portingInfo": {
                      "type": "object",
                      "description": "Updated porting information and status.",
                      "properties": {
                        "portingId": {
                          "type": "string",
                          "description": "The unique identifier for this porting request."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "in_progress",
                            "scheduled",
                            "completed",
                            "failed"
                          ],
                          "description": "Current status of the porting process."
                        },
                        "estimatedCompletion": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Estimated completion time for the port."
                        },
                        "nextSteps": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Next steps required to complete the porting process."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "subscription": {
                    "subscriptionId": "7a1b9c3d-2e4f-4a6b-8c0d-9e8f7a6b5c4d",
                    "status": "ACTIVATED",
                    "type": "CELL",
                    "display": "073-111 00 00",
                    "msisdn": "+46731110000",
                    "tempNumber": false,
                    "customer": {
                      "customerId": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                      "name": "Volt AB"
                    },
                    "productOffering": {
                      "productOfferingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                      "name": "Mobil 10GB",
                      "price": {
                        "netPriceMinor": 24900,
                        "currency": "SEK",
                        "priceType": "RECURRING",
                        "billingCycle": {
                          "period": "MONTHLY",
                          "interval": 1
                        },
                        "standardDiscount": {
                          "amountMinor": 5000
                        },
                        "bindingContract": {
                          "duration": {
                            "unit": "MONTHS",
                            "value": 12
                          },
                          "discount": {
                            "amountMinor": 2000
                          }
                        },
                        "customUpfrontPayment": {
                          "billingCycles": 3,
                          "discount": {
                            "amountMinor": 3000
                          }
                        },
                        "currencyOptionsMinor": {
                          "SEK": 24900,
                          "USD": 2499
                        }
                      }
                    },
                    "subscriber": {
                      "subscriberId": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e",
                      "name": "Anna Andersson",
                      "email": "anna.andersson@example.com"
                    },
                    "sim": {
                      "esim": false,
                      "iccid": "8946071234567890123"
                    },
                    "pendingMsisdn": {
                      "msisdn": "+46701234567",
                      "scheduledAt": "2025-02-01"
                    },
                    "porting": {
                      "msisdn": "+46701234567",
                      "status": "IN_PROGRESS",
                      "direction": "INBOUND",
                      "scheduledAt": "2025-02-01"
                    },
                    "activatedAt": "2025-01-10T09:00:00Z",
                    "createdAt": "2025-01-08T08:00:00Z",
                    "updatedAt": "2025-01-15T10:30:00Z"
                  },
                  "portingInfo": {
                    "portingId": "e5f6a7b8-c9d0-4123-8456-789abcdef012",
                    "status": "in_progress",
                    "estimatedCompletion": "2025-02-01T00:00:00Z",
                    "nextSteps": [
                      "Waiting for the current provider to respond to the porting request",
                      "No action required at this time"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/port-ins": {
      "get": {
        "summary": "List port-in attempts",
        "description": "List the port-in attempts of the subscriptions of the customers that you can access, newest\nfirst. Use the filters to build a work queue, for example `status=FAILED\u0026latest=true` for the\nfailed attempts that nobody tried again.\n",
        "operationId": "listPortIns",
        "tags": [
          "Porting"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "subscriptionId",
            "in": "query",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Only the attempts of these subscriptions."
          },
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Only the attempts of the subscriptions of these customers."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PortInStatus"
              }
            },
            "description": "Only the attempts with one of these statuses."
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PortInType"
              }
            },
            "description": "Only the attempts of these types."
          },
          {
            "name": "latest",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "If true, only the newest attempt of each subscription."
          }
        ],
        "responses": {
          "200": {
            "description": "The port-in attempts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PortIn"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/port-ins": {
      "post": {
        "summary": "Create a port-in attempt",
        "description": "Start a new attempt to port a number into the subscription. Use it to try again after an attempt\nfailed or was canceled, or to port a number into an active subscription.\n\n- For a pending subscription, the attempt activates the subscription with the number. The\n  subscription must have an earlier attempt. The first port-in of a pending subscription comes\n  with `POST /subscriptions/{subscriptionId}/activate`.\n- For an active subscription, the number replaces the number of the subscription.\n\nOnly one attempt of a subscription can be pending or in progress at a time.\n",
        "operationId": "createPortIn",
        "tags": [
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePortInRequest"
              },
              "example": {
                "details": {
                  "us": {
                    "passcode": "654321"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The attempt was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortIn"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/port-ins/{portInId}": {
      "get": {
        "summary": "Get a port-in attempt",
        "description": "Get one port-in attempt of the subscription.",
        "operationId": "getPortIn",
        "tags": [
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "path",
            "name": "portInId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the port-in attempt."
          }
        ],
        "responses": {
          "200": {
            "description": "The port-in attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortIn"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/port-ins/{portInId}/details": {
      "put": {
        "summary": "Change the details of a port-in attempt",
        "description": "Change the porting details of a pending attempt, for example to give the US account number and\nPIN later. A field that you give replaces the stored value. A field that you leave out keeps the\nstored value.\n\nIn Sweden, the owner can change only while the donor operator does not have the request. While\nthe donor operator has it, the API answers `409` with the reason `port_in_change_refused`. To\nchange the owner, cancel the attempt and create a new attempt.\n",
        "operationId": "changePortInDetails",
        "tags": [
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "path",
            "name": "portInId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the port-in attempt."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePortInDetailsRequest"
              },
              "example": {
                "details": {
                  "us": {
                    "accountNumber": "987654321",
                    "passcode": "123456"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The details were changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortIn"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/port-ins/{portInId}/requested-date": {
      "put": {
        "summary": "Change the date of a port-in attempt",
        "description": "Move a pending attempt to another date. In Sweden, you can move the date until 24 hours before\nthe port. After that, the API answers `409` with the reason `port_in_change_refused`.\n",
        "operationId": "changePortInRequestedDate",
        "tags": [
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "path",
            "name": "portInId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the port-in attempt."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePortInRequestedDateRequest"
              },
              "example": {
                "requestedDate": "2026-11-27"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The date was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortIn"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/port-ins/{portInId}/cancel": {
      "post": {
        "summary": "Cancel a port-in attempt",
        "description": "Cancel a pending attempt. If the network operator has the request already, we cancel it there\ntoo. In Sweden, the port cannot be canceled when it occurs in less than 24 hours. Then the API\nanswers `409` with the reason `port_in_cancel_refused`.\n\nIf you cancel the attempt that activates a pending subscription, the subscription stays pending.\nCreate a new attempt, or cancel the subscription.\n",
        "operationId": "cancelPortIn",
        "tags": [
          "Porting"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "path",
            "name": "portInId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the port-in attempt."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The attempt was canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortIn"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/product-offering-change": {
      "put": {
        "summary": "Change subscription product offering",
        "description": "Change the product offering of a subscription (upgrade or downgrade).\n\nTo get a list of to what and when the subscription can be changed,\nget change options for the subscription.\n\nWhen the change takes effect is dictated by what product offering is chosen,\nwhich in its place depends on the network setup, billing cycle.\n\nA product catalog can limit the product offerings that an offering change can move to. If a catalog of the customer does that\nand the list does not hold the product offering, the request gets status 400 with the `internalCode` `4336`.\n",
        "operationId": "changeSubscriptionProductOffering",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeSubscriptionProductOfferingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product offering change scheduled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/product-offering-options": {
      "get": {
        "summary": "Get change options for subscription",
        "description": "Get all available product offerings a subscription can be changed to and\nwhen the change can take effect.\n\nWhen the subscription can be changed typically depends on the network setup,\nbilling cycle, and current product offering. As a rule of thumb (though not always),\nupgrades and lateral moves are immediate, while downgrades take effect at the next\nrenewal date.\n\nA product catalog can limit the product offerings that an offering change can move to. If a catalog of the customer does that,\nthe options hold only product offerings of that list.\n",
        "operationId": "getSubscriptionOfferingOptions",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Available change options.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOfferingOption"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/addon-options": {
      "get": {
        "summary": "Get add-on options for subscription",
        "description": "Get the add-ons that can be added to this subscription now.\n\nAn add-on appears only when its product category matches the subscription's product offering. It must also be part of the customer's product catalog. For example, a travel package will not appear for a cell subscription, because their product categories do not match.\n\nAn order that adds an add-on not in this list will be refused.\n",
        "operationId": "getSubscriptionAddonOptions",
        "tags": [
          "Subscription Addons"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "The add-on options available for this subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOffering"
                      },
                      "description": "The add-on product offerings available for this subscription."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/addons": {
      "get": {
        "summary": "List active add-ons for subscription",
        "description": "Get all active and pending add-ons for a subscription.\n\nThis endpoint returns only add-ons that are currently attached to the subscription,\nincluding their status and scheduling information. Use /addon-options to query available add-ons.\n",
        "operationId": "getSubscriptionAddons",
        "tags": [
          "Subscription Addons"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SubscriptionAddonStatus"
              }
            },
            "description": "Filter add-ons by status."
          }
        ],
        "responses": {
          "200": {
            "description": "Active add-ons for the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionAddon"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Add subscription add-on",
        "description": "Add an add-on to a subscription.\n\nThis endpoint includes adding an add-on to a subscription. The add-on can be scheduled to be\nactivated immediately or at a future date.\n",
        "operationId": "addSubscriptionAddon",
        "tags": [
          "Subscription Addons"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddAddonRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Add-on added successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionAddon"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/cancel": {
      "post": {
        "summary": "Cancel subscription",
        "description": "Cancel a subscription. The operation creates a cancel action, as the cancel in the admin portal\ndoes. On the date of the action, the cancel workflow removes the other scheduled actions,\ncancels the addons, ends the binding period and ends the subscription in the network.\n\n`cancelAt` sets the date of the action:\n- `nextDay`: the next day.\n- `nextMonth`: the first day of the next month.\n- `date`: the date that you give. A date in the past gets a 400 response.\n\nThe 412 response refuses the cancel in these cases:\n- The brand does not let an operator cancel a subscription.\n- The subscription is canceled already.\n- A cancel of the subscription runs.\n\nStandardized churn reasons help with reporting and analysis.\n",
        "operationId": "cancelSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription cancellation scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/suspend": {
      "post": {
        "summary": "Suspend subscription",
        "description": "Temporarily suspend a subscription. The customer continues to pay but service is disabled.\nThis is typically used for payment issues or fraud prevention.\n\nSupports flexible scheduling:\n- Immediate suspension\n- Next day suspension\n- Beginning of next month suspension\n- Specific date suspension\n",
        "operationId": "suspendSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SuspendSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription suspension scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/pause": {
      "post": {
        "summary": "Pause subscription",
        "description": "Pause a subscription. The customer stops paying and service is disabled. The operation creates\na pause action, as the pause in the admin portal does. The action pauses only this subscription.\n\nWithout `scheduledAt`, the pause starts at once. With `scheduledAt`, the pause starts on that\ndate. A date in the past gets a 400 response. `metadata` goes on the pause action.\n\nThe 412 response refuses the pause in these cases:\n- The brand does not let an operator pause a subscription.\n- The subscription is not activated.\n- The subscription forwards a vanity number.\n- A cancel of the subscription runs.\n",
        "operationId": "pauseSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PauseSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pause action is created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/restore": {
      "post": {
        "summary": "Restore subscription",
        "description": "Restore a suspended, paused, or blocked subscription back to active state.\n\nA blocked subscription can have more than one bar. To remove only some of them, name their reasons in `barReasons`.\nThe subscription then stays blocked until the last bar is removed.\n\nSupports flexible scheduling:\n- Immediate restore\n- Next day restoration\n- Beginning of next month restoration\n- Specific date restoration\n",
        "operationId": "restoreSubscription",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription restoration scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/us-port-out-pin": {
      "get": {
        "summary": "Get the US port-out PIN",
        "description": "Get the active port-out PIN of a subscription and whether the subscription can port out. A\nsubscription that cannot port out, for example during a binding period or with a leased custom\nnumber, has `portable` false and no PIN. A new number in its port-out protection period has\n`portOutProtection`, which gives the first day that a new carrier can port out the number.\n\nOnly US brands offer a port-out PIN. On another brand, `portable` is false and the state has no\nPIN.\n",
        "operationId": "getUSPortOutPin",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "The port-out state of the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/USPortOutPinState"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Generate a US port-out PIN",
        "description": "Generate a new PIN that the subscriber gives to a new carrier to move the number away from\nthis subscription. The PIN is valid for 7 days. The previous PIN of the subscription stops\nworking when you generate a new one.\n\nA subscription that cannot port out, for example during a binding period or with a leased\ncustom number, returns `412 Precondition Failed`. Only US brands support this operation. Other\nbrands return `501 Not Implemented`.\n",
        "operationId": "generateUSPortOutPin",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "The new PIN.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/USPortOutPin"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/reset-network-services": {
      "post": {
        "summary": "Reset subscription network services",
        "description": "Start the platform's provider-specific network-services reset for an activated subscription.\nThe operation may briefly interrupt service, so `confirmed` must be true.\n\nA pending or running reset is returned instead of starting another one. A successful or failed\nreset completed during the previous 15 minutes is also returned, so an immediate retry is safe.\nTwo requests that arrive at the same time usually return the same reset. In rare cases, each\nrequest returns a new reset. Then only the first reset changes the network, and the other reset\nfails without a change to the network.\nThe reset does not change Seamless OS barring, add-ons, data buckets, or other commercial\nconfiguration. The provider workflow can suspend, reconnect, or recreate network-side state.\nOn some networks, this can change the network-side data balance or shared data group.\n\nThis operation is disabled by default. A deployment must set\n`FEATURE_END_USER_RESET_NETWORK_SERVICES=true` to make it available. A disabled deployment\nreturns `501 Not Implemented` and starts no reset. Enable the operation only when the customer\naccepts the provider-specific risks.\n",
        "operationId": "resetNetworkServices",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetNetworkServicesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reset started, already running, or recently completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetNetworkServicesResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/block-sim": {
      "post": {
        "summary": "Block SIM",
        "description": "Block the SIM card on a subscription, so it can no longer use the network. Use this when a\nsubscriber reports their SIM lost or stolen.\n\nThe block takes effect immediately and cannot be scheduled. Any changes already scheduled on the\nsubscription are canceled, except an in-progress number port or a scheduled SIM card change,\nwhich both continue — a canceled port would lose the subscriber their number.\n\nBlocking is not reversible through this endpoint: issue a new SIM card to bring the subscription\nback into service.\n",
        "operationId": "blockSim",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "SIM blocked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/change-sim": {
      "post": {
        "summary": "Change subscription SIM card",
        "description": "Change the SIM card (ICC/ICCID) for a subscription. This is used when replacing\na lost, damaged, or upgraded SIM card.\n\nSupports flexible scheduling:\n- Immediate SIM card change\n- Next day SIM card change\n- Beginning of next month SIM card change\n- Specific date SIM card change\n",
        "operationId": "changeSubscriptionSim",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeSubscriptionSimRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SIM card change scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/addons/cancel": {
      "post": {
        "summary": "Cancel subscription add-on",
        "description": "Cancel an add-on on a subscription.\n\nThis endpoint allows canceling active add-ons on a subscription.\nThe add-on will be canceled according to the specified schedule or immediately if no schedule is provided.\n",
        "operationId": "cancelSubscriptionAddon",
        "tags": [
          "Subscription Addons"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelAddonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Add-on cancellation scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionAddon"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/addons/product-offering-change": {
      "put": {
        "summary": "Change subscription add-on product offering",
        "description": "Change an existing add-on to a different product offering (upgrade or downgrade).\n\nThis endpoint allows you to change an existing add-on attached to a subscription to a different\nadd-on product offering. The change can be scheduled for immediate or future execution.\n\nWhen the change takes effect depends on the new product offering chosen, billing cycle,\nand the preferred schedule date provided in the request.\n",
        "operationId": "changeSubscriptionAddonProductOffering",
        "tags": [
          "Subscription Addons"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeAddonRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Add-on change scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionAddon"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/addons/product-offering-options": {
      "get": {
        "summary": "Get change options for subscription add-on",
        "description": "Get all available product offerings an existing add-on can be changed to and\nwhen the change can take effect.\n\nWhen the add-on can be changed typically depends on the network setup,\nbilling cycle, and current add-on product offering. As a rule of thumb (though not always),\nupgrades and lateral moves are immediate, while downgrades take effect at the next\nrenewal date.\n",
        "operationId": "getSubscriptionAddonChangeOptions",
        "tags": [
          "Subscription Addons"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "query",
            "name": "currentProductOfferingId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The current add-on product offering to get change options for."
          }
        ],
        "responses": {
          "200": {
            "description": "Available change options for the add-on.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOfferingOption"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/usage": {
      "get": {
        "summary": "Get subscription usage",
        "description": "Retrieve the current period's usage for a subscription.",
        "operationId": "getSubscriptionUsage",
        "tags": [
          "Subscription Usage"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current usage statistics for the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                },
                "example": {
                  "voice": {
                    "national": [
                      {
                        "name": "Unlimited National",
                        "callSeconds": 3600,
                        "callCount": 15,
                        "callRemainingSeconds": 32400,
                        "callTotalSeconds": 36000,
                        "status": "ACTIVE",
                        "validFrom": "2025-01-01T00:00:00Z",
                        "validTo": "2025-02-01T00:00:00Z"
                      }
                    ],
                    "ild": [
                      {
                        "name": "ILD Top-up",
                        "balanceMinor": 1550,
                        "currency": "USD",
                        "expiryDate": "2025-12-31"
                      }
                    ]
                  },
                  "sms": {
                    "national": [
                      {
                        "name": "500 SMS National",
                        "smsCount": 25,
                        "smsRemaining": 475,
                        "smsTotal": 500,
                        "status": "ACTIVE",
                        "validFrom": "2025-01-01T00:00:00Z",
                        "validTo": "2025-02-01T00:00:00Z"
                      }
                    ]
                  },
                  "data": {
                    "dataBytesUsed": 4294967296,
                    "unlimited": false,
                    "national": [
                      {
                        "name": "10GB National",
                        "dataBytesUsed": 3221225472,
                        "dataBytesRemaining": 7516192768,
                        "dataBytesTotal": 10737418240,
                        "status": "ACTIVE",
                        "validFrom": "2025-01-01T00:00:00Z",
                        "validTo": "2025-02-01T00:00:00Z"
                      }
                    ],
                    "roaming": [
                      {
                        "name": "Asia 5GB Roaming",
                        "subscriptionAddonId": "a47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "dataBytesUsed": 1073741824,
                        "dataBytesRemaining": 4294967296,
                        "dataBytesTotal": 5368709120,
                        "status": "ACTIVE",
                        "validFrom": "2025-01-01T00:00:00Z",
                        "validTo": "2025-02-01T00:00:00Z"
                      }
                    ],
                    "hotspot": [
                      {
                        "name": "Hotspot data",
                        "dataBytesUsed": 1073741824,
                        "dataBytesRemaining": 4294967296,
                        "dataBytesTotal": 5368709120,
                        "status": "ACTIVE"
                      }
                    ]
                  },
                  "updatedAt": "2025-01-15T10:30:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/roaming-cost-control": {
      "get": {
        "summary": "Get roaming cost control",
        "description": "Get the roaming cost-control setting and current cost limit for a subscription. This operation does not return roaming allowances or top-up balances.\n",
        "operationId": "getSubscriptionRoamingCostControl",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "description": "The identifier of the subscription. The value can be an internal UUID or an external reference identifier with the `rid_` prefix.\n",
            "schema": {
              "type": "string",
              "x-pii": "KIND_NONE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The roaming cost-control setting, including an explicit unsupported state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoamingCostControl"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/offering-options": {
      "get": {
        "summary": "List offering options for a subscription",
        "description": "Get the product offerings that an order line item for a subscription can use. Choose the kind of\nline item with `lineItemType`. Each item has the same shape for each type. The client copies the\n`productOfferingId` of an item into the order line item that it sends next.\n\n- `SUBSCRIPTION_CHANGE`: the plans that the subscription can change to.\n- `ADDON`: the add-ons that the subscription can get.\n- `ADDON_CHANGE`: the product offerings that one add-on of the subscription can change to. Set\n  `subscriptionAddonId` for this type.\n\n`schedule` and `effectiveDate` tell when the option takes effect. An add-on option takes effect\nat once (`INSTANT`) on the date of today.\n\nA product catalog can limit the product offerings of a customer. If a catalog of the customer\ndoes that, the options hold only product offerings of that list.\n\nThe 400 response is a validation problem when `subscriptionAddonId` is missing for\n`ADDON_CHANGE`, or when it is set for another type.\n\nThe 404 response gives the cause in `reason`:\n- `subscription_not_found`: the subscription does not exist.\n- `addon_not_found`: the subscription has no add-on with this `subscriptionAddonId`.\n",
        "operationId": "listSubscriptionOfferingOptions",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "description": "The identifier of the subscription. The value can be an internal UUID or an external reference identifier with the `rid_` prefix.\n",
            "schema": {
              "type": "string",
              "x-pii": "KIND_NONE"
            }
          },
          {
            "name": "lineItemType",
            "in": "query",
            "required": true,
            "description": "The type of order line item to get the options for.",
            "schema": {
              "$ref": "#/components/schemas/OfferingOptionLineItemType"
            }
          },
          {
            "name": "subscriptionAddonId",
            "in": "query",
            "required": false,
            "description": "The identifier of the add-on of the subscription. This is the add-on and not its product\noffering, because two add-ons can have one product offering. Required for `ADDON_CHANGE`.\nNot allowed for the other types.\n",
            "schema": {
              "type": "string",
              "x-pii": "KIND_NONE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The offering options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionOfferingOptions"
                },
                "example": {
                  "lineItemType": "ADDON_CHANGE",
                  "items": [
                    {
                      "productOffering": {
                        "productOfferingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "name": "20 GB",
                        "description": "20 GB of extra data for one month.",
                        "price": {
                          "netPriceMinor": 9900,
                          "currency": "SEK",
                          "priceType": "RECURRING"
                        }
                      },
                      "schedule": "NEXT_RENEWAL_DAY",
                      "effectiveDate": "2026-12-01"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/price": {
      "get": {
        "summary": "Get subscription price",
        "description": "Get the price that the customer pays for a subscription today, with the discounts that come off\nthe price and the day that each one ends. Use this operation to show the price of a subscription to\nthe customer. The `price` of `productOffering` is the catalog price and can be different.\n\nThe 404 response gives the cause in `reason`:\n- `subscription_not_found`: the subscription does not exist. The End-User API also gives this\n  reason for a subscription that the user cannot get.\n- `subscription_offering_missing`: the subscription has no product offering yet. A pending\n  subscription has no product offering until its activation.\n- `subscription_canceled`: the subscription is canceled, so the customer pays nothing for it.\n",
        "operationId": "getSubscriptionPrice",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "description": "The identifier of the subscription. The value can be an internal UUID or an external reference identifier with the `rid_` prefix.\n",
            "schema": {
              "type": "string",
              "x-pii": "KIND_NONE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The price that the customer pays for the subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPrice"
                },
                "example": {
                  "subscriptionId": "d8174435-6378-4be5-a9f5-8b4aaadae5d4",
                  "currency": "USD",
                  "priceMinor": 2499,
                  "basePriceMinor": 2999,
                  "includesTax": false,
                  "billingCycle": {
                    "period": "MONTHLY",
                    "interval": 1
                  },
                  "discounts": [
                    {
                      "name": "Summer campaign",
                      "source": "TAG",
                      "amountMinor": 500,
                      "validFrom": "2025-06-01",
                      "validTo": "2025-08-31"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/service-address": {
      "put": {
        "summary": "Change subscription service address",
        "description": "Change the address where a subscription is served. In the US, this is the E911 address that emergency services get for the phone number.\n\nThe subscription holds an address only when it is different from the billing address of the customer. An address that is equal to the billing address removes the address that the subscription holds.\n\nFor an activated subscription, the platform sends the address to the network operator first. `serviceAddress` on the subscription shows the new address after the operator accepts it.\n",
        "operationId": "changeSubscriptionServiceAddress",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. The value can be an internal UUID or an external reference identifier with the `rid_` prefix.\n"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeSubscriptionServiceAddressRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The subscription. An activated subscription shows the new address after the network operator accepts it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/esim/qrcode": {
      "get": {
        "summary": "Get eSIM QR code",
        "description": "Retrieve QR code data and hosted URL for eSIM profile download.\n\nReturns both the raw QR code data (LPA format) and a hosted URL for the QR code image. Only available for eSIM subscriptions (`sim.esim: true`). QR codes expire for security and should be treated as sensitive data.\n\nThe network operator creates the QR code when it provisions the eSIM. This can occur some time after we process the order. Until then, the response is `404` with the reason `esim_qr_code_missing`, and the same request can succeed later. When the network operator does not answer, the response is `503`, and the same request can succeed later.\n",
        "operationId": "getSubscriptionEsimQrCode",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "eSIM QR code data and hosted URL retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EsimQrCode"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/esim/profile": {
      "get": {
        "summary": "Get eSIM profile status",
        "description": "Retrieve the live eSIM profile status for a subscription's SIM, reported by the network\noperator. Only available for eSIM subscriptions (`sim.esim: true`) that already have a SIM\nassigned.\n\nWhen the network operator reports no live status, the response still carries a profile\nobject with `status: UNAVAILABLE` rather than an error, so a caller can tell \"the operator\ngave nothing\" apart from \"there is no eSIM to ask about\". When the network operator does not\nanswer, the response is `503`, and the same request can succeed later.\n",
        "operationId": "getSubscriptionEsimProfile",
        "tags": [
          "Subscriptions"
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The identifier of the subscription. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-subscription-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "eSIM profile status retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionEsimProfile"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/subscriptions/usage": {
      "get": {
        "summary": "Get usage for multiple subscriptions",
        "description": "Retrieve current usage statistics for multiple subscriptions by providing their IDs.",
        "operationId": "getSubscriptionsUsage",
        "tags": [
          "Subscription Usage"
        ],
        "parameters": [
          {
            "name": "subscriptionIds",
            "in": "query",
            "required": true,
            "description": "List of subscription IDs to retrieve usage for.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "maxItems": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Usage statistics for the requested subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "description": "Usage information for each requested subscription.",
                      "items": {
                        "type": "object",
                        "required": [
                          "subscriptionId",
                          "usage"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "subscriptionId": {
                            "type": "string",
                            "description": "The unique identifier for the subscription.",
                            "example": "123e4567-e89b-12d3-a456-426614174000"
                          },
                          "usage": {
                            "$ref": "#/components/schemas/Usage"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/tag-types": {
      "get": {
        "summary": "List the tag types",
        "description": "Get the tag types that the API key can create on a kind of entity, with the shape of the value of each type.\n\nThe roles of the API key decide which types it can create. A type with the value shape `OPTION` also gives its options.\nFor example, the options of `CHURN` are the cancel reasons of the brand.\n",
        "operationId": "listTagTypes",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "target",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/TagTarget"
            },
            "description": "The kind of entity that the tags attach to."
          }
        ],
        "responses": {
          "200": {
            "description": "The tag types that the API key can create on the kind of entity.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CreatableTagType"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/tags": {
      "get": {
        "summary": "List tags",
        "description": "Get the tags of a subscription, a customer or a license: the tags that are valid now, the tags that ended, and the tags that start later.\n\nA deleted tag is not in the list.\n",
        "operationId": "listTags",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "subscriptionId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "Get the tags of this subscription. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          {
            "in": "query",
            "name": "customerId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "Get the tags of this customer. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          {
            "in": "query",
            "name": "licenseId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "Get the tags of this license. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/TagTypeName"
              }
            },
            "description": "Get only the tags of these types."
          }
        ],
        "responses": {
          "200": {
            "description": "The tags of the entity.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create a tag",
        "description": "Create a tag on a subscription, a customer or a license.\n\nThe roles of the API key must let it manage the type, and the environment must not turn the type off.\n`GET /tag-types` gives the types that the API key can create on each kind of entity.\nThe currency of a charge must be the currency of the brand.\n",
        "operationId": "createTag",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTagRequest"
              },
              "example": {
                "type": "MANUAL_CHARGE",
                "subscriptionId": "d8174435-6378-4be5-a9f5-8b4aaadae5d4",
                "manualCharge": {
                  "description": "Installation",
                  "amountMinor": 2900,
                  "currency": "USD"
                },
                "validFrom": "2026-11-01"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The tag was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/tags/{tagId}": {
      "get": {
        "summary": "Get a tag",
        "description": "Get a tag by its identifier.",
        "operationId": "getTag",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tagId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          }
        ],
        "responses": {
          "200": {
            "description": "The tag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "summary": "Delete a tag",
        "description": "Remove a tag. A deleted tag is not in the history of its entity.\n\nAn invoice that already includes a charge of the tag does not change.\nTo stop a charge, end the tag with `POST /tags/{tagId}/end`. An ended tag stays in the history.\n",
        "operationId": "deleteTag",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tagId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "The tag was deleted."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/tags/{tagId}/end": {
      "post": {
        "summary": "End a tag",
        "description": "Set the last date that the tag is valid. The tag stays in the history of its entity.\n\nAn end can only move the last date earlier. If the tag already ends before the requested date, the API answers `409` with the reason `tag_end_after_valid_to`.\n",
        "operationId": "endTag",
        "tags": [
          "Tags"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "tagId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndTagRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The tag was ended.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscribers": {
      "get": {
        "summary": "List subscribers",
        "description": "List all subscribers.\n\nWill return all subscribers the requester has access to.\n",
        "operationId": "listSubscribers",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "customerIds",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "query",
            "name": "subscriptionIds",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "The unique identifier of the subscription to filter by."
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of subscribers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriberListItem"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/subscribers/{subscriberId}": {
      "get": {
        "summary": "Get subscriber",
        "description": "Retrieve detailed information about a specific subscriber using its unique identifier.",
        "operationId": "getSubscriberById",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriberId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the subscriber."
          }
        ],
        "responses": {
          "200": {
            "description": "A subscriber object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscriber"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "summary": "Update subscriber",
        "description": "Update the details of an existing subscriber.",
        "operationId": "updateSubscriber",
        "tags": [
          "Subscribers"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "subscriberId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the subscriber."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscriber updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscriber"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/licenses": {
      "get": {
        "summary": "List licenses",
        "description": "List all licenses.",
        "operationId": "listLicenses",
        "tags": [
          "Licenses"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "customerId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/LicenseType"
              }
            },
            "description": "The type of license to filter by."
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of licenses.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/License"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create license",
        "description": "Create a new license",
        "operationId": "createLicense",
        "tags": [
          "Licenses"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLicenseRequest"
              },
              "examples": {
                "externalProduct": {
                  "summary": "Standalone offering for an external product, which takes no assignment",
                  "value": {
                    "productOfferingId": "a7b8c9d0-e1f2-3456-7890-bcdef0123456",
                    "customerId": "b8c9d0e1-f2a3-4567-8901-cdef01234567"
                  }
                },
                "subscriptionAssignment": {
                  "summary": "Addon offering, which the request must assign to a subscription",
                  "value": {
                    "productOfferingId": "d0e1f2a3-b4c5-6789-0123-ef0123456789",
                    "customerId": "b8c9d0e1-f2a3-4567-8901-cdef01234567",
                    "assignedTo": {
                      "type": "SUBSCRIPTION",
                      "subscriptionId": "c9d0e1f2-a3b4-5678-9012-def012345678"
                    },
                    "scheduleActivationAt": "2024-01-20"
                  }
                },
                "scheduledLicense": {
                  "summary": "Addon offering activated on a future date",
                  "value": {
                    "productOfferingId": "d0e1f2a3-b4c5-6789-0123-ef0123456789",
                    "customerId": "b8c9d0e1-f2a3-4567-8901-cdef01234567",
                    "assignedTo": {
                      "type": "SUBSCRIPTION",
                      "subscriptionId": "c9d0e1f2-a3b4-5678-9012-def012345678"
                    },
                    "scheduleActivationAt": "2024-02-01",
                    "metadata": {
                      "costCenter": "eng-42"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "License created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/License"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/licenses/{licenseId}": {
      "get": {
        "summary": "Get license",
        "description": "Retrieve detailed information about a specific license using its unique identifier.",
        "operationId": "getLicenseById",
        "tags": [
          "Licenses"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "licenseId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the license."
          }
        ],
        "responses": {
          "200": {
            "description": "A license object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/License"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/licenses/{licenseId}/product-offering-change": {
      "put": {
        "summary": "Change license product offering",
        "description": "Change the product offering of a license (upgrade or downgrade).\n\nTo get a list of what product offerings the license can be changed to and when,\nget change options for the license.\n\nWhen the change takes effect is dictated by what product offering is chosen,\nwhich in turn depends on the license terms and billing cycle.\n\nA product catalog can limit the product offerings that an offering change can move to. If a catalog of the customer does that\nand the list does not hold the product offering, the request gets status 400 with the `internalCode` `4336`.\n",
        "operationId": "changeLicenseProductOffering",
        "tags": [
          "Licenses"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "licenseId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the license."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeLicenseProductOfferingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product offering change scheduled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/License"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/licenses/{licenseId}/product-offering-options": {
      "get": {
        "summary": "Get product offering options for license",
        "description": "Get all available product offerings a license can be changed to and\nwhen the change can take effect.\n\nWhen the license can be changed typically depends on the license terms,\nbilling cycle, and current product offering. As a rule of thumb (though not always),\nupgrades and lateral moves are immediate, while downgrades take effect at the next\nrenewal date.\n\nA product catalog can limit the product offerings that an offering change can move to. If a catalog of the customer does that,\nthe options hold only product offerings of that list.\n",
        "operationId": "getLicenseProductOfferingOptions",
        "tags": [
          "Licenses"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "licenseId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the license."
          }
        ],
        "responses": {
          "200": {
            "description": "Available change options.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOfferingOption"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/licenses/{licenseId}/cancel": {
      "post": {
        "summary": "Cancel license",
        "description": "Cancel a license on a date. Only an administrator can cancel a license with this operation.\n\nThe license ends on `scheduledAt`. If the request gives no date, the license ends today. A date\nbefore today gets a 400 response with the reason `cancel_date_in_past`.\n\nIf the license has a scheduled cancel, the request moves it to the new date. A scheduled change\nto another product offering on or after the cancel date does not occur. A canceled license gets\na 409 response with the reason `license_canceled`.\n",
        "operationId": "cancelLicense",
        "tags": [
          "Licenses"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "licenseId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the license."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelLicenseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "License cancellation scheduled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/License"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/product-catalogs": {
      "get": {
        "summary": "List product catalogs",
        "description": "List all product catalogs with optional text search filtering and pagination.\n\nProduct catalogs define curated sets of product offerings for specific contexts such as customer segments, regions, or sales channels.\n",
        "operationId": "listProductCatalogs",
        "tags": [
          "Product Catalogs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "description": "Filter by catalog name or ID prefix."
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of product catalogs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductCatalogListItem"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/storefront": {
      "get": {
        "summary": "Get storefront",
        "description": "Get the product catalogs that a storefront sells from, and the sections that the storefront shows their product offerings in.\n\nThe caller decides the answer:\n\n- A request with `customerType` gets the default catalogs for that customer type. Every visitor who did not choose a customer sees these catalogs.\n- A request with `customerId` gets the catalogs of that customer. The request must carry the bearer token of a signed-in user who can order for the customer.\n\nA customer with no catalog of its own gets the default catalogs. A customer whose catalogs are all for the other customer type gets no catalog. A catalog that extends the default catalog comes after the default catalog.\n\nThe sections are in display order: by catalog, then in the order that each catalog arranges them. A catalog that extends the default catalog puts its own product offerings into sections of the default catalog. An empty list of sections means that nobody arranged these catalogs.\n\nThe sections are only the layout. `initialProductOfferingIds` names the initial product offerings of the catalogs, and a section holds only such product offerings. `productOfferings` gives the details of each product offering that the catalogs sell to the caller.\n\n`simTypes` names the SIM types that the storefront sells. They are the same for every customer.\n",
        "operationId": "getStorefront",
        "tags": [
          "Product Catalogs"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "customerType",
            "schema": {
              "$ref": "#/components/schemas/CustomerType"
            },
            "description": "The kind of customer to get the catalogs for. It is necessary unless you send `customerId`. You cannot send it together with `customerId`, because the customer has a type of its own.\n"
          },
          {
            "in": "query",
            "name": "customerId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The customer to get the catalogs for. The request must carry the bearer token of a signed-in user who can order for this customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "The storefront.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Storefront"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/product-offerings": {
      "get": {
        "summary": "List product offerings",
        "description": "List all product offerings available to the customer.\n\nReturns product offerings based on the customer type and access permissions.\n",
        "operationId": "listProductOfferings",
        "tags": [
          "Product Offerings"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "types",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ProductType"
              }
            },
            "description": "Filter by product offering types."
          },
          {
            "in": "query",
            "name": "categories",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ProductCategory"
              }
            },
            "description": "Filter by product offering categories."
          },
          {
            "in": "query",
            "name": "customerType",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CustomerType"
            },
            "description": "Filter by customer type."
          },
          {
            "in": "query",
            "name": "productCatalogId",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "Filter by product catalog. Returns only product offerings that belong to the specified catalog.\nWhen combined with other filters, all filters are applied together.\n",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          {
            "in": "query",
            "name": "includeArchived",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "If `true`, the list also holds the archived product offerings.\nIf `false`, the list holds no archived product offering.\n"
          },
          {
            "in": "query",
            "name": "countries",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by country coverage using ISO 3166-1 alpha-3 codes.\nReturns offerings that provide coverage in any of the specified countries.\nThis includes offerings that have the country explicitly listed or are part of a region that includes the country.\n",
            "example": [
              "USA",
              "CAN",
              "MEX"
            ]
          },
          {
            "in": "query",
            "name": "regions",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter by region coverage.\nReturns offerings that provide coverage in any of the specified regions.\nRetrieve the available region identifiers from the List Travel eSIM countries endpoint.\n",
            "example": [
              "EUROPE",
              "NORTH_AMERICA"
            ]
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of product offerings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductOffering"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "productOfferingId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                      "status": "AVAILABLE",
                      "versionStatus": "PUBLISHED",
                      "name": "Seamless 10GB",
                      "description": "Mobile plan with 10GB data and unlimited calls and texts",
                      "product": {
                        "productId": "d4e5f6a7-b8c9-0123-4567-890123456789",
                        "internalName": "seamless_cell_10gb_us",
                        "type": "SUBSCRIPTION",
                        "category": "PRODUCT_CATEGORY_SUBSCRIPTION_CELL",
                        "networkProviderId": "tmobile-us",
                        "features": {
                          "dataMb": 10240,
                          "includedCallSeconds": 36000,
                          "includedSms": 500
                        }
                      },
                      "price": {
                        "netPriceMinor": 2999,
                        "currency": "USD",
                        "priceType": "RECURRING",
                        "billingCycle": {
                          "period": "MONTHLY",
                          "interval": 1
                        },
                        "standardDiscount": {
                          "amountMinor": 500
                        },
                        "bindingContract": {
                          "duration": {
                            "unit": "MONTHS",
                            "value": 12
                          },
                          "discount": {
                            "amountMinor": 200
                          }
                        },
                        "customUpfrontPayment": {
                          "billingCycles": 3,
                          "discount": {
                            "amountMinor": 300
                          }
                        },
                        "currencyOptionsMinor": {
                          "USD": 2999,
                          "SEK": 29900
                        }
                      },
                      "group": {
                        "productOfferingGroupId": "mobile-plans",
                        "name": "Mobile Plans",
                        "category": "PRODUCT_CATEGORY_SUBSCRIPTION_CELL"
                      },
                      "customerType": "BUSINESS",
                      "imageUrl": "https://cdn.example.com/images/seamless-10gb.png"
                    }
                  ],
                  "pagination": {
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/product-offerings/{productOfferingId}": {
      "get": {
        "summary": "Get product offering",
        "description": "Get a product offering by ID.",
        "operationId": "getProductOffering",
        "tags": [
          "Product Offerings"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "productOfferingId",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the product offering."
          }
        ],
        "responses": {
          "200": {
            "description": "Product offering details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductOffering"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/product-offerings/countries": {
      "get": {
        "summary": "List Travel eSIM countries",
        "description": "List all countries and regions available across travel eSIM product offerings.\n\nReturns a deduplicated list of countries with their names and ISO codes,\nplus regions that appear on offerings with their constituent country codes.\n",
        "operationId": "listProductOfferingCountries",
        "tags": [
          "Product Offerings"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "customerType",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/CustomerType"
            },
            "description": "Filter by customer type."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of countries and regions available across product offerings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "countries",
                    "regions"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "name"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "ISO 3166-1 alpha-3 country code.",
                            "example": "USA"
                          },
                          "name": {
                            "type": "string",
                            "description": "The English name of the country.",
                            "example": "United States"
                          }
                        }
                      }
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "region",
                          "countries"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "region": {
                            "type": "string",
                            "description": "The region identifier.",
                            "example": "EUROPE"
                          },
                          "countries": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "ISO 3166-1 alpha-3 country codes available within this region.",
                            "example": [
                              "SWE",
                              "DEU",
                              "FRA"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/discounts/promotions/promo-code/{promoCode}": {
      "get": {
        "summary": "Get promotion by code",
        "description": "Look up a promotion by its promotional code to check availability and details.",
        "operationId": "getPromotion",
        "tags": [
          "Product Discounts"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "promoCode",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The promotional code to look up.",
            "example": "SUMMER25"
          }
        ],
        "responses": {
          "200": {
            "description": "Promotion details including associated discount information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Promotion"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Create order",
        "description": "Create a new order with initial configuration. Orders can be created with minimal information and progressively configured.\n\nA `SUBSCRIPTION` line item or an `EXTERNAL_PRODUCT` line item must name an initial product offering of the product\ncatalog of the customer. `initialProductOfferingIds` of the customer product catalog names these product\nofferings. An order with no customer buys from the default product catalog. If the product offering is not one of\nthem, the request gets status 400 with the `internalCode` `4334`. An add-on that the plan does not take gets the\n`internalCode` `4335`.\n",
        "operationId": "createOrder",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              },
              "example": {
                "customerType": "BUSINESS",
                "customer": {
                  "customerId": "a47ac10b-58cc-4372-a567-0e02b2c3d479"
                },
                "billing": {
                  "name": "John Doe",
                  "email": "billing@acme.com",
                  "address": {
                    "street": "123 Main Street",
                    "city": "New York",
                    "zip": "10001",
                    "state": "NY",
                    "country": "US"
                  }
                },
                "lineItems": [
                  {
                    "type": "SUBSCRIPTION",
                    "lineItemId": "line-item-1",
                    "productOfferingId": "mobile-plan-basic",
                    "sim": {
                      "esim": true
                    },
                    "subscriber": {
                      "name": "John Doe",
                      "email": "john.doe@example.com"
                    }
                  }
                ],
                "promoCode": "SUMMER2023",
                "metadata": {
                  "source": "partner-storefront"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Order created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "state": "PENDING",
                  "customer": {
                    "customerId": "a47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "customerType": "BUSINESS",
                    "name": "Acme Corporation",
                    "newCustomer": false
                  },
                  "billing": {
                    "name": "John Doe",
                    "email": "billing@acme.com",
                    "address": {
                      "street": "123 Main Street",
                      "city": "New York",
                      "zip": "10001",
                      "state": "NY",
                      "country": "US"
                    }
                  },
                  "promoCode": "SUMMER2023",
                  "lineItems": [
                    {
                      "type": "SUBSCRIPTION",
                      "lineItemId": "line-item-1",
                      "productOfferingId": "mobile-plan-basic",
                      "sim": {
                        "esim": true
                      },
                      "subscriber": {
                        "name": "John Doe",
                        "email": "john.doe@example.com"
                      },
                      "status": "PENDING"
                    }
                  ],
                  "pricing": {
                    "subtotalMinor": 2999,
                    "taxAmountMinor": 0,
                    "totalMinor": 2999,
                    "taxIncluded": false,
                    "currency": "USD",
                    "calculatedAt": "2024-01-15T10:00:00Z"
                  },
                  "validation": {
                    "isValid": false,
                    "lineItemValidation": [
                      {
                        "lineItemId": "line-item-1",
                        "isValid": false,
                        "missingFields": [
                          "subscriber.address"
                        ]
                      }
                    ]
                  },
                  "requirements": {
                    "requiresPayment": "REQUIRED",
                    "requiresPaymentProfile": "NOT_REQUIRED",
                    "requiresSigning": "NOT_REQUIRED"
                  },
                  "expiresAt": "2024-01-22T10:00:00Z",
                  "createdAt": "2024-01-15T10:00:00Z",
                  "updatedAt": "2024-01-15T10:00:00Z",
                  "metadata": {
                    "source": "partner-storefront"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "List orders",
        "description": "List orders with optional filtering and pagination.",
        "operationId": "listOrders",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "state",
            "in": "query",
            "description": "Filter by order state",
            "schema": {
              "$ref": "#/components/schemas/OrderState"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Filter by user ID",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Filter by customer. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "name": "expiresAfter",
            "in": "query",
            "description": "Filter orders expiring after this date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "expiresBefore",
            "in": "query",
            "description": "Filter orders expiring before this date",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrderListItem"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get order",
        "description": "Retrieve a specific order by ID with all line items and current status.",
        "operationId": "getOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "state": "PENDING",
                  "customer": {
                    "customerId": "a47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "customerType": "BUSINESS",
                    "name": "Acme Corporation",
                    "newCustomer": false
                  },
                  "billing": {
                    "name": "John Doe",
                    "email": "billing@acme.com",
                    "address": {
                      "street": "123 Main Street",
                      "city": "New York",
                      "zip": "10001",
                      "state": "NY",
                      "country": "US"
                    }
                  },
                  "promoCode": "SUMMER2023",
                  "lineItems": [
                    {
                      "type": "SUBSCRIPTION",
                      "lineItemId": "line-item-1",
                      "productOfferingId": "mobile-plan-basic",
                      "sim": {
                        "esim": true
                      },
                      "subscriber": {
                        "name": "John Doe",
                        "email": "john.doe@example.com",
                        "address": {
                          "street": "123 Main Street",
                          "city": "New York",
                          "zip": "10001",
                          "state": "NY",
                          "country": "US"
                        }
                      },
                      "status": "PENDING"
                    }
                  ],
                  "pricing": {
                    "subtotalMinor": 2999,
                    "taxAmountMinor": 240,
                    "totalMinor": 3239,
                    "taxIncluded": false,
                    "currency": "USD",
                    "calculatedAt": "2024-01-15T10:30:00Z"
                  },
                  "validation": {
                    "isValid": true
                  },
                  "requirements": {
                    "requiresPayment": "REQUIRED",
                    "requiresPaymentProfile": "NOT_REQUIRED",
                    "requiresSigning": "NOT_REQUIRED"
                  },
                  "expiresAt": "2024-01-22T10:30:00Z",
                  "createdAt": "2024-01-15T10:00:00Z",
                  "updatedAt": "2024-01-15T10:30:00Z",
                  "metadata": {
                    "source": "partner-storefront"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "put": {
        "tags": [
          "Orders"
        ],
        "summary": "Update order",
        "description": "Update order details (excluding line items). Order must be in PENDING status.",
        "operationId": "updateOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/line-items": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Add line item",
        "description": "Add a new line item to an order. Order must be in PENDING status.\n\nA `SUBSCRIPTION` line item or an `EXTERNAL_PRODUCT` line item must name an initial product offering of the product\ncatalog of the customer. `initialProductOfferingIds` of the customer product catalog names these product\nofferings. An order with no customer buys from the default product catalog. If the product offering is not one of\nthem, the request gets status 400 with the `internalCode` `4334`. An add-on that the plan does not take gets the\n`internalCode` `4335`.\n",
        "operationId": "addOrderLineItem",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddLineItemRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Line item added successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderLineItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/line-items/{lineItemId}": {
      "put": {
        "tags": [
          "Orders"
        ],
        "summary": "Update line item",
        "description": "Update a line item configuration. Order must be in PENDING status.\n\nA `SUBSCRIPTION` line item or an `EXTERNAL_PRODUCT` line item must name an initial product offering of the product\ncatalog of the customer. `initialProductOfferingIds` of the customer product catalog names these product\nofferings. An order with no customer buys from the default product catalog. If the product offering is not one of\nthem, the request gets status 400 with the `internalCode` `4334`. An add-on that the plan does not take gets the\n`internalCode` `4335`.\n",
        "operationId": "updateOrderLineItem",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "name": "lineItemId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the line item",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLineItemRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Line item updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderLineItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "tags": [
          "Orders"
        ],
        "summary": "Remove line item",
        "description": "Remove a line item from an order. Order must be in PENDING status.",
        "operationId": "removeOrderLineItem",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "name": "lineItemId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the line item",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Line item removed successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/submit": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Submit order",
        "description": "Submit an order for fulfillment. Requires payment, signing, or card capture, depending on the setup. Only orders in the PENDING state can be submitted. An order paying through a payment session or payment link is in PENDING_PAYMENT and is submitted automatically once the payment succeeds — poll the order or subscribe to the order.statusChanged webhook instead of calling this endpoint.",
        "operationId": "submitOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitOrderRequest"
              },
              "example": {
                "paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "state": "PROCESSING",
                  "customer": {
                    "customerId": "a47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "customerType": "BUSINESS",
                    "name": "Acme Corporation",
                    "newCustomer": false
                  },
                  "billing": {
                    "name": "John Doe",
                    "email": "billing@acme.com",
                    "address": {
                      "street": "123 Main Street",
                      "city": "New York",
                      "zip": "10001",
                      "state": "NY",
                      "country": "US"
                    }
                  },
                  "promoCode": "SUMMER2023",
                  "paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901",
                  "lineItems": [
                    {
                      "type": "SUBSCRIPTION",
                      "lineItemId": "line-item-1",
                      "productOfferingId": "mobile-plan-basic",
                      "sim": {
                        "esim": true
                      },
                      "subscriber": {
                        "name": "John Doe",
                        "email": "john.doe@example.com",
                        "address": {
                          "street": "123 Main Street",
                          "city": "New York",
                          "zip": "10001",
                          "state": "NY",
                          "country": "US"
                        }
                      },
                      "status": "RUNNING"
                    }
                  ],
                  "pricing": {
                    "subtotalMinor": 2999,
                    "taxAmountMinor": 240,
                    "totalMinor": 3239,
                    "taxIncluded": false,
                    "currency": "USD",
                    "calculatedAt": "2024-01-15T10:30:00Z"
                  },
                  "validation": {
                    "isValid": true
                  },
                  "requirements": {
                    "requiresPayment": "REQUIRED",
                    "requiresPaymentProfile": "NOT_REQUIRED",
                    "requiresSigning": "NOT_REQUIRED"
                  },
                  "expiresAt": "2024-01-22T10:30:00Z",
                  "submittedAt": "2024-01-15T14:30:00Z",
                  "createdAt": "2024-01-15T10:00:00Z",
                  "updatedAt": "2024-01-15T14:30:00Z",
                  "metadata": {
                    "source": "partner-storefront"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/cancel": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Cancel order",
        "description": "Cancel an order before it has been submitted. Only orders in PENDING status can be canceled.\nThis prevents the order from being submitted and cleans up any reserved resources.\n",
        "operationId": "cancelOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "metadata": {
                    "$ref": "#/components/schemas/Metadata"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order canceled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/orders/{orderId}/approve": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Approve order",
        "description": "Approve an order that requires admin or manager approval. Only orders in PENDING_APPROVAL\nstatus can be approved. The approving user must have the appropriate role for the approval\ntype required by the order.\n",
        "operationId": "approveOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order approved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/handoff-token": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Create order handoff token",
        "description": "Create a token that gives this order to a checkout. The checkout prices the\norder again, collects the payment, and submits the order.\n\nThe order must be PENDING or PENDING_PAYMENT. The token is valid for 1 hour.\nIt stops when the order is no longer PENDING or PENDING_PAYMENT. Each request\ncreates a new token, and the earlier tokens stay valid until they expire.\n\nA person with the token can see, change, and pay for the order. Give the token\nonly to the user that the order is for.\n",
        "operationId": "createOrderHandoffToken",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "Handoff token created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderHandoffToken"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/email-verification/start": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Start order email verification",
        "description": "Send a verification code to the contact email of the new customer of the order. The code\nproves that the person at the checkout holds this email.\n\nThe order must be PENDING and must have a customer to create with a contact email. If the\ncontact email changes after you send the code, the code is not valid for the new email.\n\nThe code is valid for 10 minutes. Use the nonce in the response to verify the code.\n",
        "operationId": "startOrderEmailVerification",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "redirectPath": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "A path on the portal of the brand, for example `/storefront/checkout`. If the brand sends a\nlink in the message, the link opens this path and gives the code to the page. The path must\nstart with one slash. Without a path, the message carries no link.\n",
                    "example": "/storefront/checkout"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The code was sent to the contact email of the new customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEmailVerification"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{orderId}/email-verification/verify": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Verify order email",
        "description": "Verify the code that the customer got at the contact email of the new customer of the order.\nOnly the last code sent to that email is valid.\n\nOn success, the customer of the order shows `emailVerified` as true. If the contact email\nchanges later, `emailVerified` is false again.\n\nThe order must be PENDING.\n",
        "operationId": "verifyOrderEmail",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the order",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$",
                    "description": "The 6-digit code that was sent to the contact email.",
                    "example": "123456"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The code is valid. Returns the order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/claim-handoff": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Claim order handoff",
        "description": "Get the order of a handoff token. A checkout calls this operation when the\nuser opens a checkout link. Then the checkout uses the order as the cart of\nthe user.\n\nA claim does not consume the token. The operation returns 404 when the token\nis unknown or expired. It returns 412 when the order is not PENDING or\nPENDING_PAYMENT.\n",
        "operationId": "claimOrderHandoff",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "handoffToken"
                ],
                "additionalProperties": false,
                "properties": {
                  "handoffToken": {
                    "type": "string",
                    "description": "The handoff token from the checkout link.",
                    "example": "oht_f47ac10b58cc4372a5670e02b2c3d479"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The order of the token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderHandoffClaim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "summary": "List invoices",
        "description": "Retrieve the final invoices of the customers that the caller can see. The newest month comes\nfirst. In one month, the highest invoice number comes first.\n",
        "operationId": "listInvoices",
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Include only the invoices of these customers. When omitted, the list includes all customers that the caller can see.",
            "example": [
              "a9b0c1d2-e3f4-5678-9012-789012345678"
            ]
          },
          {
            "name": "invoiceNumber",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{1,9}$"
              }
            },
            "description": "Include only the invoices with these numbers.",
            "example": [
              "261100042"
            ]
          },
          {
            "name": "fromMonth",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            },
            "description": "Include only the invoices of this month and later months, in the format `YYYY-MM`.",
            "example": "2026-01"
          },
          {
            "name": "toMonth",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
            },
            "description": "Include only the invoices of this month and earlier months, in the format `YYYY-MM`.",
            "example": "2026-12"
          }
        ],
        "responses": {
          "200": {
            "description": "Invoices retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Invoice"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "invoiceNumber": "261100042",
                      "customerId": "456789ab-cdef-0123-4567-89abcdef0123",
                      "month": "2026-11",
                      "periodFrom": "2026-11-01",
                      "periodUntil": "2026-11-30",
                      "subtotalMinor": 39900,
                      "taxAmountMinor": 9975,
                      "totalMinor": 49875,
                      "currency": "SEK",
                      "payment": {
                        "provider": "BILLOGRAM",
                        "status": "ISSUED",
                        "reference": "2611000420",
                        "dueDate": "2026-12-31",
                        "issuedAt": "2026-12-01T08:00:00Z",
                        "amountDueMinor": 49875,
                        "amountPaidMinor": 0,
                        "amountRemainingMinor": 49875,
                        "currency": "SEK",
                        "hostedUrl": "https://example.com/invoices/261100042",
                        "invoiceNumbers": [
                          "261100042"
                        ]
                      },
                      "createdAt": "2026-12-01T03:00:00Z"
                    }
                  ],
                  "pagination": {
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/invoices/{invoiceNumber}": {
      "get": {
        "summary": "Get invoice",
        "description": "Retrieve one final invoice, with its totals and its payment.",
        "operationId": "getInvoice",
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,9}$"
            },
            "description": "The number of the invoice.",
            "example": "261100042"
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/invoices/{invoiceNumber}/charges": {
      "get": {
        "summary": "List invoice charges",
        "description": "Retrieve the charges of one final invoice, in the order of the invoice.",
        "operationId": "listInvoiceCharges",
        "tags": [
          "Invoices"
        ],
        "parameters": [
          {
            "name": "invoiceNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,9}$"
            },
            "description": "The number of the invoice.",
            "example": "261100042"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Charges retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceCharge"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "chargeId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
                      "type": "SUBSCRIPTION",
                      "description": "Mobile 20 GB",
                      "subscriptionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "productOfferingId": "d4e5f6a7-b8c9-0123-def4-567890123456",
                      "startDate": "2026-11-01",
                      "endDate": "2026-11-30",
                      "oneTime": false,
                      "amountMinor": 39900,
                      "taxRate": 25,
                      "taxAmountMinor": 9975
                    }
                  ],
                  "pagination": {
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-links": {
      "get": {
        "summary": "List payment links",
        "description": "Get a list of payment links.",
        "operationId": "listPaymentLinks",
        "tags": [
          "Payment Links"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Filter by payment link status.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PaymentLinkStatus"
              }
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Filter by customer ID.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "Filter by order ID.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "List of payment links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentLink"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create payment link",
        "description": "Create a new payment link that can be shared with customers to collect payments.\n\nPayment links provide a hosted checkout experience without requiring integration\nwith payment widgets or handling sensitive payment data directly.\n\nThe order must be complete and ready for submission — an order that would fail\nsubmission validation is rejected before any payment is collected. Once the\npayment succeeds, the order is submitted automatically.\n",
        "operationId": "createPaymentLink",
        "tags": [
          "Payment Links"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentLinkRequest"
              },
              "example": {
                "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                "description": "Pay for your mobile subscription order",
                "savePaymentProfile": true,
                "returnUrl": "https://example.com/order/confirmation",
                "cancelUrl": "https://example.com/order/checkout"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Payment link created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                },
                "example": {
                  "paymentLinkId": "j47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "customerId": "a47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "paymentProvider": "STRIPE",
                  "hostedUrl": "https://checkout.example.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "status": "ACTIVE",
                  "description": "Pay for your mobile subscription order",
                  "createdAt": "2024-01-15T10:00:00Z",
                  "updatedAt": "2024-01-15T10:00:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-links/{paymentLinkId}": {
      "get": {
        "summary": "Get payment link",
        "description": "Retrieve details of a specific payment link.",
        "operationId": "getPaymentLink",
        "tags": [
          "Payment Links"
        ],
        "parameters": [
          {
            "name": "paymentLinkId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the payment link.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment link details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-links/{paymentLinkId}/cancel": {
      "post": {
        "summary": "Cancel payment link",
        "description": "Cancel an active payment link, preventing further payment attempts through the link.",
        "operationId": "cancelPaymentLink",
        "tags": [
          "Payment Links"
        ],
        "parameters": [
          {
            "name": "paymentLinkId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the payment link.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment link details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-intents": {
      "get": {
        "summary": "List payment intents",
        "description": "Retrieve a paginated list of payment intents with optional filtering by status, customer, or date range.",
        "operationId": "listPaymentIntents",
        "tags": [
          "Payment Intents"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "customerId",
            "in": "query",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Filter payment intents by customer IDs",
            "example": [
              "e7f8a9b0-c1d2-3456-7890-567890123456",
              "f8a9b0c1-d2e3-4567-8901-678901234567"
            ]
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PaymentIntentStatus"
              }
            },
            "description": "Filter payment intents by status"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment intents retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentIntentListItem"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-intents/{paymentIntentId}": {
      "get": {
        "summary": "Get payment intent",
        "description": "Get a payment intent by ID, including its charge attempts, refunds, and line items.",
        "operationId": "getPaymentIntent",
        "tags": [
          "Payment Intents"
        ],
        "parameters": [
          {
            "name": "paymentIntentId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment intent to retrieve.",
            "example": "64870b5c-fb61-4c9a-955a-e148e0826c20"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment intent retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentIntent"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-sessions": {
      "post": {
        "summary": "Create payment session",
        "description": "Create a new payment session to collect payment information for an order. For orders with a\npositive total, this initiates payment collection. For zero-total orders, consider creating a\npayment profile session instead. The order must be complete and ready for submission — an order\nthat would fail submission validation is rejected before any payment is collected. Once the\npayment succeeds, the order is submitted automatically.\n\nSet hosted to false to collect the payment inside your own checkout page. The response then\ncarries providerContext instead of hostedUrl. Only this call returns providerContext, because\nit contains a credential that is not stored. To show the form again, create a new session.\n",
        "operationId": "createPaymentSession",
        "tags": [
          "Payment Sessions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentSessionRequest"
              },
              "example": {
                "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                "paymentProvider": "STRIPE",
                "savePaymentProfile": true,
                "returnUrl": "https://example.com/order/confirmation",
                "cancelUrl": "https://example.com/order/checkout",
                "metadata": {
                  "source": "web-checkout"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Payment session created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSession"
                },
                "example": {
                  "paymentSessionId": "d2e3f4a5-b6c7-8901-2345-012345678901",
                  "orderId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                  "paymentProvider": "STRIPE",
                  "savePaymentProfile": true,
                  "hostedUrl": "https://payments.example.com/checkout/d2e3f4a5-b6c7-8901-2345-012345678901",
                  "returnUrl": "https://example.com/order/confirmation",
                  "cancelUrl": "https://example.com/order/checkout",
                  "status": "PENDING",
                  "metadata": {
                    "source": "web-checkout"
                  },
                  "createdAt": "2024-01-15T10:30:00Z",
                  "updatedAt": "2024-01-15T10:30:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-sessions/{paymentSessionId}": {
      "get": {
        "summary": "Get payment session",
        "description": "Retrieve details of a specific payment session by its identifier.",
        "operationId": "getPaymentSession",
        "tags": [
          "Payment Sessions"
        ],
        "parameters": [
          {
            "name": "paymentSessionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment session to retrieve.",
            "example": "f2a3b4c5-d6e7-8901-2345-012345678901"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment session retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-sessions/{paymentSessionId}/cancel": {
      "post": {
        "summary": "Cancel payment session",
        "description": "Cancel an active payment session, preventing further payment attempts.",
        "operationId": "cancelPaymentSession",
        "tags": [
          "Payment Sessions"
        ],
        "parameters": [
          {
            "name": "paymentSessionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment session to cancel.",
            "example": "a3b4c5d6-e7f8-9012-3456-123456789012"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelPaymentSessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payment session canceled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-profiles": {
      "get": {
        "summary": "List payment profiles for customer",
        "description": "List saved payment profiles for the customer.",
        "operationId": "listPaymentProfiles",
        "tags": [
          "Payment Profiles"
        ],
        "parameters": [
          {
            "name": "customerId",
            "in": "query",
            "required": true,
            "description": "Filter profiles for a specific customer.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "example": "d0e1f2a3-b4c5-6789-0123-ef0123456789"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment profiles retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "description": "List of saved payment profiles.",
                      "items": {
                        "$ref": "#/components/schemas/EmbeddedPaymentProfile"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-profiles/{paymentProfileId}": {
      "get": {
        "summary": "Get payment profile",
        "description": "Retrieve details of a specific saved payment method by its identifier.",
        "operationId": "getPaymentProfile",
        "tags": [
          "Payment Profiles"
        ],
        "parameters": [
          {
            "name": "paymentProfileId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment profile to retrieve.",
            "example": "e1f2a3b4-c5d6-7890-1234-f01234567890"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment profile retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentProfile"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "summary": "Delete payment profile",
        "description": "Remove a saved payment method permanently. This action cannot be undone and will prevent future use of this payment profile.\n\nIf a payment profile is set as default for a customer, it must first be changed before deletion.\n",
        "operationId": "deletePaymentProfile",
        "tags": [
          "Payment Profiles"
        ],
        "parameters": [
          {
            "name": "paymentProfileId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment profile to delete.",
            "example": "e1f2a3b4-c5d6-7890-1234-f01234567890"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Payment profile deleted successfully"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-profiles/sessions": {
      "post": {
        "summary": "Create payment profile session",
        "description": "Create a new payment profile session to set up and save a payment method for future use.\n\nUsed for zero-cost orders where payment collection isn't needed but payment method setup is required.\n",
        "operationId": "createPaymentProfileSession",
        "tags": [
          "Payment Profile Sessions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentProfileSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Payment profile session created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentProfileSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-profiles/sessions/{paymentProfileSessionId}": {
      "get": {
        "summary": "Get payment profile session",
        "description": "Retrieve details of a specific payment profile session by its identifier.",
        "operationId": "getPaymentProfileSession",
        "tags": [
          "Payment Profile Sessions"
        ],
        "parameters": [
          {
            "name": "paymentProfileSessionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment profile session to retrieve.",
            "example": "b4c5d6e7-f8a9-0123-4567-234567890123"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment profile session retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentProfileSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/payment-profiles/sessions/{paymentProfileSessionId}/cancel": {
      "post": {
        "summary": "Cancel payment profile session",
        "description": "Cancel an active payment profile session, preventing further setup attempts.",
        "operationId": "cancelPaymentProfileSession",
        "tags": [
          "Payment Profile Sessions"
        ],
        "parameters": [
          {
            "name": "paymentProfileSessionId",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The unique identifier of the payment profile session to cancel.",
            "example": "c5d6e7f8-a9b0-1234-5678-345678901234"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelPaymentProfileSessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payment profile session canceled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentProfileSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/signing": {
      "get": {
        "summary": "List signing sessions",
        "description": "Retrieve a list of signing sessions with optional filtering by order or status.",
        "operationId": "listSigningSessions",
        "x-internal": true,
        "tags": [
          "Signing sessions"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "description": "Filter by order ID.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by signing status.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SigningStatus"
              }
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "List of signing sessions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SigningSession"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "summary": "Create signing session",
        "description": "Create a new contract signing session for an order that requires legal signature.\n\nThis endpoint initiates the signing process by:\n- Creating a signing session with the specified provider\n- Generating a redirect URL for the user to complete signing\n- Setting up callbacks for completion/failure handling\n\nThe response includes a redirect URL that the user should be sent to complete the signing process.\n",
        "operationId": "createSigningSession",
        "x-internal": true,
        "tags": [
          "Signing sessions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSigningSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Signing session created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/signing/providers": {
      "get": {
        "summary": "List signing providers",
        "description": "Retrieve available signing providers and their requirements for signer details.\n\nThis endpoint helps you understand:\n- Which signing providers are available in your configuration\n- What information is required from signers for each provider\n- Which countries and languages are supported by each provider\n- Additional capabilities of each provider\n\nUse this information to build appropriate forms and validation for the signing process.\n",
        "operationId": "listSigningProviders",
        "x-internal": true,
        "tags": [
          "Signing sessions"
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "description": "Filter providers by supported country code.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string",
              "example": "SE"
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "Filter providers by supported language code.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string",
              "example": "sv"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of available signing providers.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "type": "array",
                      "description": "Available signing providers and their requirements.",
                      "items": {
                        "$ref": "#/components/schemas/SigningProvider"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/signing/{signingSessionId}": {
      "get": {
        "summary": "Get signing session",
        "description": "Retrieve the details and current status of a specific signing session.",
        "operationId": "getSigningSession",
        "x-internal": true,
        "tags": [
          "Signing sessions"
        ],
        "parameters": [
          {
            "name": "signingSessionId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the signing session.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Signing session details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "delete": {
        "summary": "Cancel signing session",
        "description": "Cancel an active signing session.\n\nThis can be used to cancel a signing session that is no longer needed or if the order has been canceled.\nOnce canceled, the signing session cannot be resumed.\n",
        "operationId": "cancelSigningSession",
        "x-internal": true,
        "tags": [
          "Signing sessions"
        ],
        "parameters": [
          {
            "name": "signingSessionId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the signing session.",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Signing session canceled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningSession"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/tools/validate-address": {
      "post": {
        "summary": "Validate address",
        "description": "Validate an address and get suggestions for corrections if the address is invalid.\n\nThis is particularly important for US addresses where precise addressing is required\nfor service delivery and regulatory compliance.\n\nDepending on setup, address validation is either shape based (e.g. this looks like an address),\nor verified against an address registry.\n",
        "operationId": "validateAddress",
        "tags": [
          "Tools"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateAddressRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Address validation completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressValidationResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/tools/check-porting-eligibility": {
      "post": {
        "summary": "Check number porting eligibility",
        "description": "Check if a phone number is eligible for porting to this network.\n\nThis helps validate numbers before creating subscription line items with porting details.\nReturns information about the current carrier and porting requirements.\n",
        "operationId": "checkPortingEligibility",
        "tags": [
          "Tools"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckPortingEligibilityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Porting eligibility check completed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortingEligibilityResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/tools/get-device-info": {
      "post": {
        "summary": "Get device information by IMEI",
        "description": "Get detailed information about a device using its IMEI number.\n\nThis helps validate device compatibility and capabilities before creating\nsubscription line items. Particularly useful for eSIM activation requirements.\n",
        "operationId": "getDeviceInfo",
        "tags": [
          "Tools"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetDeviceInfoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Device information retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceInfo"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/tools/search-devices": {
      "post": {
        "summary": "Find devices by name",
        "description": "Find devices whose name matches a query, with the capabilities of each one.\n\nUse this when the customer knows their device by its everyday name and not by its IMEI. It\nanswers whether each match supports eSIM, so the customer can pick the right SIM type before\nthey order.\n",
        "operationId": "searchDevices",
        "tags": [
          "Tools"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchDevicesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The matching devices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceSearchResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/tools/check-network-coverage": {
      "post": {
        "summary": "Check network coverage",
        "description": "Check whether the network serves a location, and how well.\n\nA shopper can read the verdict before they place an order.\n\nNetworks differ in what they can answer. Some place the exact address and grade the signal\nthere. Others read the zip code alone and only qualify the postal area for activation. Read\n`scope` on the response to know which answer you got.\n",
        "operationId": "checkNetworkCoverage",
        "tags": [
          "Tools"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckNetworkCoverageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Network coverage information retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NetworkCoverage"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "501": {
            "$ref": "#/components/responses/NotImplemented"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/inventory/lease-numbers": {
      "post": {
        "summary": "Lease phone numbers",
        "description": "Hold random available numbers of the brand's own number pool, so that a customer can choose one\nof them before you submit the order. The numbers are of the standard grade.\n\n**Usage Flow**:\n1. Lease numbers to get a lease token.\n2. Put the chosen `msisdn` and the `leaseToken` on a subscription line item.\n3. Submit the order before the lease expires. The fulfillment of the order reserves the chosen\n   number.\n\nA lease expires after 30 minutes, and then the pool gets back each leased number that no\nfulfillment reserved. The result can hold fewer numbers than `count` when the pool has fewer\navailable numbers.\n",
        "operationId": "leaseNumbers",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeaseNumbersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Numbers leased successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NumberLeaseResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The number pool has no available standard number of the requested types (`number_pool_exhausted`).",
            "$ref": "#/components/responses/Conflict"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/inventory/sims/{iccid}": {
      "get": {
        "summary": "Get SIM details",
        "description": "Retrieve details of a SIM card from inventory by its ICCID.\n\nFor eSIM cards linked to a subscription, the response includes live installation status\nfrom the network operator, showing whether the profile has been downloaded, installed,\nor enabled on a device.\n",
        "operationId": "getInventorySim",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "iccid",
            "in": "path",
            "required": true,
            "schema": {
              "x-pii": "KIND_SIM_ID",
              "type": "string"
            },
            "description": "The ICCID of the SIM card to retrieve.",
            "example": "8946200508271016579"
          }
        ],
        "responses": {
          "200": {
            "description": "SIM details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventorySim"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/workflows/webhook/{path...}": {
      "post": {
        "summary": "Trigger workflow via webhook",
        "description": "Trigger a registered workflow via webhook. The wildcard path is matched against registered workflow webhook paths.\n\nIf no workflows match the provided path, the endpoint answers 400 Bad Request.\n\nA workflow station can declare an authentication method. A station accepts the request when it declares no method, or when the request satisfies every method it declares.\n\nOne path can hold several stations, and each station applies its own methods. A 200 response means that at least one matching station accepted the request and received the body. Only a station that accepts does work.\n\nIf every matching station rejects the request, the endpoint answers 401 Unauthorized and starts no workflow.\n",
        "operationId": "triggerWorkflowWebhook",
        "security": [],
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "name": "path...",
            "in": "path",
            "required": true,
            "description": "The wildcard webhook path to match against registered workflows. Leading slashes in the workflow registration are ignored, so `support/intents/reward/topup` and `/support/intents/reward/topup` are equivalent.\n\nThis is a greedy path parameter, meaning it captures the entire remainder of the URL path.\n",
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "example": "support/intents/reward/topup"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The webhook payload. Can be any valid JSON object. The payload data is passed to the matching workflow(s) which can access and use any properties from it.\n\nThe body must be 1 MiB or smaller. A larger body is answered with 413 Payload Too Large. The whole body is held in memory, because an authentication method verifies a signature over the exact bytes.\n",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "At least one matching station accepted the request and received the body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workflowTasks"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "workflowTasks": {
                      "type": "array",
                      "description": "List of workflow tasks that were triggered by this webhook.",
                      "items": {
                        "$ref": "#/components/schemas/EmbeddedWorkflowTask"
                      }
                    }
                  },
                  "example": {
                    "workflowTasks": [
                      {
                        "workflowTaskId": "f47ac10b-58cc-4372-a567-0e2b2c3d479",
                        "name": "Reward customer with data top-up",
                        "description": "Rewards a customer's subscription with the specified data top-up product offering.",
                        "createdAt": "2024-01-15T10:35:00Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/reports": {
      "get": {
        "summary": "List reports",
        "description": "List platform-generated report runs for a given report key, newest first.\n\nOnly report runs created within the last 30 days are returned.\n",
        "operationId": "listReportRuns",
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "reportKey",
            "required": true,
            "schema": {
              "x-pii": "KIND_NONE",
              "type": "string"
            },
            "description": "The key identifying the report to list runs for."
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of report runs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReportRun"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "reportRunId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                      "reportKey": "subscriber_base_and_revenue",
                      "status": "SUCCEEDED",
                      "downloadUrl": "https://example-bucket.s3.amazonaws.com/reports/f47ac10b.csv?X-Amz-Signature=...",
                      "createdAt": "2024-01-10T08:00:00Z",
                      "completedAt": "2024-01-10T08:02:31Z"
                    }
                  ],
                  "pagination": {
                    "nextCursor": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/reports/{reportRunId}": {
      "get": {
        "summary": "Get report",
        "description": "Retrieve a generated report by its identifier. Once the report has finished generating, the response includes a time-limited link to download the file directly.",
        "operationId": "getReportRun",
        "tags": [
          "Reports"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "reportRunId",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The identifier of the report run."
          }
        ],
        "responses": {
          "200": {
            "description": "A report run object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportRun"
                },
                "example": {
                  "reportRunId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "reportKey": "subscriber_base_and_revenue",
                  "status": "SUCCEEDED",
                  "downloadUrl": "https://example-bucket.s3.amazonaws.com/reports/f47ac10b.csv?X-Amz-Signature=...",
                  "createdAt": "2024-01-10T08:00:00Z",
                  "completedAt": "2024-01-10T08:02:31Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "webhooks": {
    "subscription.created": {
      "post": {
        "operationId": "onSubscriptionCreated",
        "summary": "Subscription created",
        "description": "Sent when a new subscription has been successfully created.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.created",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook acknowledged - no further retries will be attempted."
          },
          "4XX": {
            "description": "Temporary failure - delivery will be retried with backoff."
          },
          "5XX": {
            "description": "Temporary failure - delivery will be retried with backoff."
          }
        }
      }
    },
    "subscription.updated": {
      "post": {
        "operationId": "onSubscriptionUpdated",
        "summary": "Subscription updated",
        "description": "Sent when mutable fields on an existing subscription are changed (e.g. status transition, product offering change, MSISDN assignment, metadata updates).\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.updated",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook acknowledged - no further retries will be attempted."
          },
          "4XX": {
            "description": "Temporary failure - delivery will be retried with backoff."
          },
          "5XX": {
            "description": "Temporary failure - delivery will be retried with backoff."
          }
        }
      }
    },
    "subscription.cancelled": {
      "post": {
        "operationId": "onSubscriptionCancelled",
        "summary": "Subscription canceled",
        "description": "Sent when a subscription cancellation is confirmed (end-of-term or immediate as applicable).\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.cancelled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.activated": {
      "post": {
        "operationId": "onSubscriptionActivated",
        "summary": "Subscription activated",
        "description": "Sent when a subscription enters ACTIVE state.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.activated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Current subscription in ACTIVE state."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.first_activated": {
      "post": {
        "operationId": "onSubscriptionFirstActivated",
        "summary": "Subscription first activated",
        "description": "Sent the first time a subscription enters ACTIVE state. A later activation sends\n`subscription.activated` instead, so this event marks the start of the subscription\nand arrives one time only.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.first_activated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription in ACTIVE state, at its first activation."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.suspended": {
      "post": {
        "operationId": "onSubscriptionSuspended",
        "summary": "Subscription suspended",
        "description": "Sent when a subscription is suspended. A suspended subscription keeps its number and\nits plan, and the network refuses its traffic until a restore.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.suspended"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription after the suspension."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.paused": {
      "post": {
        "operationId": "onSubscriptionPaused",
        "summary": "Subscription paused",
        "description": "Sent when a subscription is paused. A paused subscription keeps its number and its\nplan, and it does not renew until a restore.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.paused"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription after the pause."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.restored": {
      "post": {
        "operationId": "onSubscriptionRestored",
        "summary": "Subscription restored",
        "description": "Sent when a subscription returns to service after a pause or a suspension.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.restored"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription after the restore."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.renewed": {
      "post": {
        "operationId": "onSubscriptionRenewed",
        "summary": "Subscription renewed",
        "description": "Sent when a subscription successfully renews into a new billing period/term.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.renewed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at start of new term/period."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.ended": {
      "post": {
        "operationId": "onSubscriptionEnded",
        "summary": "Subscription ended",
        "description": "Sent when a subscription reaches its final end (no longer billable / usable).\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.ended"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Final subscription state."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.portIn.created": {
      "post": {
        "operationId": "onSubscriptionPortInCreated",
        "summary": "Subscription port-in initiated",
        "description": "Deprecated. We never send this event. Use `portIn.created`.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "deprecated": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.portIn.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot including porting embed."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.portIn.updated": {
      "post": {
        "operationId": "onSubscriptionPortInUpdated",
        "summary": "Subscription port-in updated",
        "description": "Deprecated. We never send this event. Use `portIn.updated`.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "deprecated": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.portIn.updated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Updated subscription snapshot (porting section changed)."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.portIn.completed": {
      "post": {
        "operationId": "onSubscriptionPortInCompleted",
        "summary": "Subscription port-in completed",
        "description": "Deprecated. We never send this event. Use `portIn.completed`.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "deprecated": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.portIn.completed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.portIn.failed": {
      "post": {
        "operationId": "onSubscriptionPortInFailed",
        "summary": "Subscription port-in failed",
        "description": "Deprecated. Use `portIn.failed`, which carries the port-in attempt and fires only when the attempt ends.\n\nSent when a number port-in attempt fails irrecoverably or requires manual intervention.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "deprecated": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.portIn.failed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot including failed porting state."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "portIn.created": {
      "post": {
        "operationId": "onPortInCreated",
        "summary": "Port-in created",
        "description": "A port-in attempt was created, from the API, the portal, an order or an activation.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "portIn.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/PortIn",
                        "description": "The port-in attempt after the change."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "portIn.updated": {
      "post": {
        "operationId": "onPortInUpdated",
        "summary": "Port-in updated",
        "description": "A port-in attempt changed: its details or its date changed, it started, or the network operator confirmed or moved the date of the port.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "portIn.updated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/PortIn",
                        "description": "The port-in attempt after the change."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "portIn.completed": {
      "post": {
        "operationId": "onPortInCompleted",
        "summary": "Port-in completed",
        "description": "The number of a port-in attempt is ported. The subscription uses it.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "portIn.completed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/PortIn",
                        "description": "The port-in attempt after the change."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "portIn.failed": {
      "post": {
        "operationId": "onPortInFailed",
        "summary": "Port-in failed",
        "description": "A port-in attempt failed. `failure` tells you why. To try again, create a new attempt.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "portIn.failed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/PortIn",
                        "description": "The port-in attempt after the change."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "portIn.canceled": {
      "post": {
        "operationId": "onPortInCanceled",
        "summary": "Port-in canceled",
        "description": "A port-in attempt was canceled before it started.\n",
        "tags": [
          "Subscription Port-In"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "portIn.canceled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/PortIn",
                        "description": "The port-in attempt after the change."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.quotaNotification": {
      "post": {
        "operationId": "onSubscriptionQuotaNotification",
        "summary": "Subscription quota threshold exceeded",
        "description": "Sent when a subscription quota threshold is exceeded (e.g. 80%, 100% of data, SMS, or voice allowance).\n",
        "tags": [
          "Subscription Usage"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.quotaNotification"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "subscription.subscriber_set": {
      "post": {
        "operationId": "onSubscriptionSubscriberSet",
        "summary": "Subscription subscriber set",
        "description": "Sent when a subscriber is assigned to a subscription.\n",
        "tags": [
          "Subscriptions"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.subscriber_set"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Subscription",
                        "description": "Subscription snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "license.created": {
      "post": {
        "operationId": "onLicenseCreated",
        "summary": "License created",
        "description": "Sent when a license is created.\n",
        "tags": [
          "Licenses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "license.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/License",
                        "description": "License snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "license.updated": {
      "post": {
        "operationId": "onLicenseUpdated",
        "summary": "License updated",
        "description": "Sent when a license changes.\n",
        "tags": [
          "Licenses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "license.updated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/License",
                        "description": "Updated license snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "license.cancelled": {
      "post": {
        "operationId": "onLicenseCancelled",
        "summary": "License canceled",
        "description": "Sent when a license cancellation is confirmed.\n",
        "tags": [
          "Licenses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "license.cancelled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/License",
                        "description": "License snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "license.activated": {
      "post": {
        "operationId": "onLicenseActivated",
        "summary": "License activated",
        "description": "Sent when a license becomes ACTIVE.\n",
        "tags": [
          "Licenses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "license.activated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/License",
                        "description": "Active license snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "license.renewed": {
      "post": {
        "operationId": "onLicenseRenewed",
        "summary": "License renewed",
        "description": "Sent when a license renews into a new term/period.\n",
        "tags": [
          "Licenses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "license.renewed"
                      },
                      "data": {
                        "$ref": "#/components/schemas/License",
                        "description": "License snapshot at renewal."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "license.ended": {
      "post": {
        "operationId": "onLicenseEnded",
        "summary": "License ended",
        "description": "Sent when a license reaches final end state.\n",
        "tags": [
          "Licenses"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "license.ended"
                      },
                      "data": {
                        "$ref": "#/components/schemas/License",
                        "description": "Final license snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.created": {
      "post": {
        "operationId": "onOrderCreated",
        "summary": "Order created",
        "description": "Sent when an order is created.\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.created"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order",
                        "description": "Order snapshot at creation."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.updated": {
      "post": {
        "operationId": "onOrderUpdated",
        "summary": "Order updated",
        "description": "This event fires when a subscription or an add-on that the order created activates.\n\nAn order can be `COMPLETED` before the network provisions its subscriptions and add-ons. Then the\n`order.statusChanged` event for `COMPLETED` can show them as `PENDING`. This event sends the order\nagain when a subscription activates, or when an add-on activates and gets its `referenceId` and `addedAt`.\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.updated"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order",
                        "description": "Updated order snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.cancelled": {
      "post": {
        "operationId": "onOrderCancelled",
        "summary": "Order canceled",
        "description": "Sent when an order is canceled.\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.cancelled"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order",
                        "description": "Canceled order snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.statusChanged": {
      "post": {
        "operationId": "onOrderStatusChanged",
        "summary": "Order status changed",
        "description": "Sent when an order status transitions (e.g. PENDING -\u003e SUBMITTED, PROCESSING -\u003e COMPLETED, etc.).\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.statusChanged"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order",
                        "description": "Order snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.submitted": {
      "post": {
        "operationId": "onOrderSubmitted",
        "summary": "Order submitted",
        "description": "Sent when an order is formally submitted for processing/fulfillment.\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.submitted"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order",
                        "description": "Order snapshot at submission."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.expired": {
      "post": {
        "operationId": "onOrderExpired",
        "summary": "Order expired",
        "description": "Sent when an order expires before completion.\n",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.expired"
                      },
                      "data": {
                        "$ref": "#/components/schemas/Order",
                        "description": "Expired order snapshot."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "order.lineItemStatusChanged": {
      "post": {
        "operationId": "onOrderLineItemStatusChanged",
        "summary": "Order line item status changed",
        "description": "Deprecated. Use `order.statusChanged`.\n\nAn order fulfills all its line items or none of them, so every event of\none order carries the same status. This event fires when a change\nof the order `state` changes that status, one event for each line item.\n",
        "deprecated": true,
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "order.lineItemStatusChanged"
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "order",
                          "lineItemId",
                          "status"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "order": {
                            "$ref": "#/components/schemas/Order",
                            "description": "Order snapshot at the time of this event."
                          },
                          "lineItemId": {
                            "type": "string",
                            "description": "The line item within the order whose status changed.",
                            "example": "line-item-1"
                          },
                          "status": {
                            "$ref": "#/components/schemas/OrderLineItemStatus"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "customer.created": {
      "post": {
        "operationId": "onCustomerCreated",
        "summary": "Customer created",
        "description": "Sent when a new customer is created in the system.\n",
        "tags": [
          "Customers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "customer.created",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "$ref": "#/components/schemas/Customer",
                        "description": "Customer snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "customer.updated": {
      "post": {
        "operationId": "onCustomerUpdated",
        "summary": "Customer updated",
        "description": "Sent when customer information is modified, including profile changes, billing updates, or status changes.\n",
        "tags": [
          "Customers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "customer.updated",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "$ref": "#/components/schemas/Customer",
                        "description": "Customer snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "customer.deleted": {
      "post": {
        "operationId": "onCustomerDeleted",
        "summary": "Customer deleted",
        "description": "Sent when a customer account is permanently deleted from the system.\n",
        "tags": [
          "Customers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "customer.deleted",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "$ref": "#/components/schemas/Customer",
                        "description": "Customer snapshot at the time of this event."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    },
    "report.ready": {
      "post": {
        "operationId": "onReportReady",
        "summary": "Report ready",
        "description": "Sent when a report has finished generating and its file is ready to download. Fetch the report by its identifier to obtain a time-limited download link.\n",
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "report.ready",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "$ref": "#/components/schemas/ReportRun",
                        "description": "The report that just became ready, including a time-limited download link."
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook acknowledged - no further retries will be attempted."
          },
          "4XX": {
            "description": "Temporary failure - delivery will be retried with backoff."
          },
          "5XX": {
            "description": "Temporary failure - delivery will be retried with backoff."
          }
        }
      }
    },
    "custom.workflow_triggered": {
      "post": {
        "operationId": "onCustomWorkflowTriggered",
        "summary": "Custom workflow triggered",
        "description": "Sent from within a workflow and content is defined by the workflow configuration.\n",
        "tags": [
          "Custom"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/EventEnvelope"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "data"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "custom.workflow_triggered",
                        "description": "The event type identifier."
                      },
                      "data": {
                        "type": "array",
                        "description": "A list of key value pairs defined by the workflow configuration. Always includes a \"customType\" entry with the custom event type (e.g. \"telna.esim_status_change\").",
                        "items": {
                          "type": "object",
                          "required": [
                            "key",
                            "value"
                          ],
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "The key of the data item."
                            },
                            "value": {
                              "type": "string",
                              "description": "The value of the data item."
                            }
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged"
          },
          "4XX": {
            "description": "Temporary failure - will retry"
          },
          "5XX": {
            "description": "Temporary failure - will retry"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A user token. The Platform API does not accept it. It refuses a full-access key with a user token with `401`, and an impersonation key with `403`.\n\nAn application that acts for a signed-in user must use the End-User API at `/api/v2/end-user`.\n"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "An API key that grants access to the API. You can create and manage API keys in the portal.\n"
      }
    },
    "schemas": {
      "StartEmailLoginRequest": {
        "type": "object",
        "description": "Request to initiate an email-based login flow. A verification code will be sent to the provided email address.",
        "required": [
          "email"
        ],
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address to send the verification code to.",
            "example": "john.doe@example.com"
          },
          "redirectPath": {
            "type": "string",
            "maxLength": 1000,
            "description": "A path on the portal of the brand, for example `/storefront/checkout`. If the brand sends a\nsign-in link in the message, the link signs the user in to the portal and then opens this\npath. The path must start with one slash. Without a path, the link opens the start page of\nthe portal.\n",
            "example": "/storefront/checkout"
          }
        }
      },
      "StartEmailLoginResponse": {
        "type": "object",
        "description": "Response from initiating an email login. Contains the nonce needed for verification and timing information.",
        "required": [
          "nonce",
          "expiresIn",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "nonce": {
            "type": "string",
            "description": "Token to reference this authentication request during verification.",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Number of seconds until the verification code expires.",
            "example": 300
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the authentication request was created.",
            "example": "2024-01-15T10:30:00Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the verification code will expire.",
            "example": "2024-01-15T10:35:00Z"
          },
          "resendAt": {
            "type": "string",
            "format": "date-time",
            "description": "When you can ask for the next code to the same email. A request before this time gets a\n429. The field is absent when we cannot tell.\n",
            "example": "2024-01-15T10:30:30Z"
          }
        }
      },
      "Any": {
        "description": "A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.",
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "object",
            "additionalProperties": true
          },
          {
            "type": "array"
          }
        ]
      },
      "Error": {
        "type": "object",
        "description": "The error body returned by every endpoint when a request fails. Branch on `reason`, show `message`\nto a human, and check `details` for field-level problems when the request was invalid.\n",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing more details about the error.",
            "example": "The requested customer could not be found."
          },
          "code": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated. Use `reason`.\n\nThis field mixes three unrelated codes and does not say which one you have: a code that we\npublish, an operator's own code when the failure came from an operator, or the request status\nwhen there is neither. Do not branch on it.\n",
            "example": "not_found"
          },
          "reason": {
            "type": "string",
            "description": "Names the condition that failed, in lower snake_case. It is independent of which system\nreported the failure, and it is stable across releases. Branch on this field. We add new\nreasons without notice, so your client must accept a reason that it does not know.\n\nIf the request has problems with different reasons, the reason is `validation_failed`. Then\neach item of `details` names its own problem.\n",
            "example": "address_not_taxable"
          },
          "domain": {
            "type": "string",
            "description": "The business area of the reason, for example `customer` or `porting`. It is for information\nonly. Do not branch on it.\n",
            "example": "address"
          },
          "retryable": {
            "type": "boolean",
            "description": "True when the same request can pass later with no change. A `429` and a `503` are always\nretryable.\n",
            "example": false
          },
          "externalCode": {
            "type": "string",
            "description": "The code that a third party, for example a network operator, sent for the failure. It is\nexactly as the third party sent it.\n",
            "example": "3077"
          },
          "externalSource": {
            "type": "string",
            "description": "The third party that reported the failure.",
            "example": "Tele2"
          },
          "internalCode": {
            "type": "string",
            "description": "The number of the condition that failed. It is stable across releases. A condition that we\nadded after `reason` has no number, so branch on `reason` instead.\n",
            "example": "4009"
          },
          "details": {
            "type": "array",
            "description": "Additional details about the error, typically one entry per invalid field on validation failures.",
            "items": {
              "type": "object",
              "required": [
                "message",
                "code"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "A human-readable message providing more details about the error.",
                  "example": "Email format is invalid."
                },
                "code": {
                  "type": "string",
                  "deprecated": true,
                  "description": "Deprecated. Use `reason`. It is the status of the whole error, the same for each item.",
                  "example": "invalid_argument"
                },
                "reason": {
                  "type": "string",
                  "description": "Names the problem with the property. `property_required` is a missing value,\n`property_invalid` is a value with the wrong format, and `property_conflict` is two values\nthat cannot occur together. Other reasons name a business condition. Your client must\naccept a reason that it does not know.\n",
                  "example": "property_invalid"
                },
                "property": {
                  "type": "string",
                  "description": "The property or field related to the error. May be nested using dot notation (e.g., \"billing.email\").",
                  "example": "contact.email"
                },
                "suggestion": {
                  "$ref": "#/components/schemas/Any",
                  "description": "A suggested value for the particular property.\n\nFor example, this may be set when validating an address with an alias, suggesting the expected value by the operator.\n"
                }
              }
            }
          },
          "hint": {
            "type": "string",
            "description": "A hint to help resolve the error.",
            "example": "Verify the customerId and try again."
          },
          "traceId": {
            "type": "string",
            "description": "Identifies the trace this request produced. Quote it when reporting a failure — it is what\nlets us find the request among everything else the platform served.\n",
            "example": "cc4a73acca1bb07e0e54bd41f5ce1e7e"
          },
          "spanId": {
            "type": "string",
            "description": "The span within the trace that failed.",
            "example": "37cec694d3b99f0f"
          }
        }
      },
      "VerifyEmailLoginRequest": {
        "type": "object",
        "description": "Request to verify an email login by providing the verification code sent to the email address.",
        "required": [
          "email",
          "nonce",
          "code"
        ],
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address used to initiate the login.",
            "example": "john.doe@example.com"
          },
          "nonce": {
            "type": "string",
            "description": "The nonce returned from the start login request.",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          },
          "code": {
            "type": "string",
            "pattern": "^[0-9]{6}$",
            "description": "The 6-digit verification code sent to the email address.",
            "example": "123456"
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "description": "OAuth2-compatible token response containing the access token for authenticating API requests.",
        "required": [
          "accessToken",
          "tokenType",
          "expiresIn"
        ],
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "JWT access token for authenticating API requests. Include in the Authorization header as \"Bearer {accessToken}\".",
            "example": "\u003caccess-token\u003e"
          },
          "tokenType": {
            "type": "string",
            "enum": [
              "Bearer"
            ],
            "description": "The type of token issued. Always \"Bearer\" for JWT tokens.",
            "example": "Bearer"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Number of seconds until the access token expires.",
            "example": 604800
          },
          "userId": {
            "type": "string",
            "description": "The unique identifier of the authenticated user. Absent when a subscriber or a PBX user who is not a user signs in.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          }
        }
      },
      "StartSmsLoginRequest": {
        "type": "object",
        "description": "Request to start a login by SMS. The verification code goes to the phone number.",
        "required": [
          "msisdn"
        ],
        "additionalProperties": false,
        "properties": {
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The phone number of the user, in E.164 format.",
            "example": "+15551234567"
          },
          "redirectPath": {
            "type": "string",
            "maxLength": 1000,
            "description": "A path on the portal of the brand, for example `/storefront/checkout`. If the brand sends a\nsign-in link in the message, the link signs the user in to the portal and then opens this\npath. The path must start with one slash. Without a path, the link opens the start page of\nthe portal.\n",
            "example": "/storefront/checkout"
          }
        }
      },
      "StartSmsLoginResponse": {
        "type": "object",
        "description": "Response from the start of a login by SMS. It contains the nonce for the verification and the validity of the code.",
        "required": [
          "nonce",
          "expiresIn",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "nonce": {
            "type": "string",
            "description": "Token to reference this authentication request during verification.",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Number of seconds until the verification code expires.",
            "example": 300
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the login started.",
            "example": "2024-01-15T10:30:00Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the verification code expires.",
            "example": "2024-01-15T10:35:00Z"
          },
          "resendAt": {
            "type": "string",
            "format": "date-time",
            "description": "When you can ask for the next code to the same phone number. A request before this time gets a\n429. The field is absent when we cannot tell.\n",
            "example": "2024-01-15T10:30:30Z"
          }
        }
      },
      "VerifySmsLoginRequest": {
        "type": "object",
        "description": "Request to complete a login by SMS with the verification code that the phone number received.",
        "required": [
          "msisdn",
          "nonce",
          "code"
        ],
        "additionalProperties": false,
        "properties": {
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The phone number that started the login.",
            "example": "+15551234567"
          },
          "nonce": {
            "type": "string",
            "description": "The nonce from the response that started the login.",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          },
          "code": {
            "type": "string",
            "pattern": "^[0-9]{6}$",
            "description": "The 6-digit verification code that the phone number received.",
            "example": "123456"
          }
        }
      },
      "Identity": {
        "x-pii": "KIND_NATIONAL_ID_NUMBER",
        "type": "string",
        "description": "A government or company registration identifier for the entity, such as a personal identification number\nfor consumers or an organization number for businesses. The expected format depends on the country and\ncustomer type; for example, Swedish customers use a 12-digit personal number or a 10-digit organization number.\n",
        "example": "12-3456789"
      },
      "EmbeddedCustomer": {
        "type": "object",
        "description": "Customer information embedded in responses. Sensitive details require separate API calls with appropriate authorization.",
        "required": [
          "customerId",
          "name"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "The unique identifier for the customer. Use it with the customer endpoints to fetch full details.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "name": {
            "type": "string",
            "description": "The customer's display name — the company name for business customers or the person's full name for consumers.",
            "example": "John Doe"
          }
        }
      },
      "Metadata": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "A set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format.\nProvided by API clients and returned as-is; the platform does not interpret the values.\n"
      },
      "User": {
        "type": "object",
        "description": "A person who can sign in and manage one or more customers' accounts.\n\nUsers are distinct from subscribers: a user administers customers and their services, while a subscriber is the end user of a subscription.\n",
        "required": [
          "userId",
          "name"
        ],
        "properties": {
          "userId": {
            "type": "string",
            "description": "Unique identifier for the user.",
            "example": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
          },
          "name": {
            "type": "string",
            "description": "The user's full name, shown in account management and used when the user is listed as a customer's contact person.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The user's email address. This is their sign-in identity — login verification codes are sent to it — and it is used to reach them when they are a customer's contact person.",
            "example": "john.doe@example.com"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The user's mobile phone number in E.164 format, used to reach them when they are a customer's contact person.",
            "example": "+15551234567"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "referenceId": {
            "type": "string",
            "description": "A reference identifier provided by API clients to identify this user in their\nown systems. Must be unique per tenant. Use this field to look up users or\nto create/retrieve users during order creation.\n",
            "example": "hr-employee-98765",
            "maxLength": 255
          },
          "customers": {
            "type": "array",
            "description": "The customers this user is associated with. The user can sign in and act on behalf of each of these customers.",
            "items": {
              "$ref": "#/components/schemas/EmbeddedCustomer"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the user was created.",
            "example": "2024-01-15T10:30:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the user was last updated.",
            "example": "2024-01-20T14:45:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "Pagination": {
        "type": "object",
        "description": "Cursor-based pagination information returned by list endpoints.\nPass `nextCursor` as the `cursor` query parameter of the next request to fetch the following page.\n",
        "required": [
          "nextCursor"
        ],
        "properties": {
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque token for fetching the next page. Null when no more results.",
            "example": "eyJvZmZzZXQiOjEwMH0"
          }
        }
      },
      "CreateUserRequest": {
        "type": "object",
        "description": "The details needed to create a user and associate them with a customer they can manage.\n",
        "required": [
          "name",
          "email",
          "customerId"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The user's full name, shown in account management and used when the user is listed as a customer's contact person.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The user's email address. This becomes their sign-in identity — login verification codes are sent to it.",
            "example": "john.doe@example.com"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The user's mobile phone number in E.164 format, used to reach them when they are a customer's contact person.",
            "example": "+15551234567"
          },
          "role": {
            "type": "string",
            "enum": [
              "MEMBER",
              "MANAGER",
              "ADMIN"
            ],
            "default": "MEMBER",
            "description": "The role of the user when assigned to a customer. Defaults to 'MEMBER' if not specified."
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier for the customer to whom the user will belong. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_crm-customer-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "referenceId": {
            "type": "string",
            "description": "A reference identifier provided by API clients to identify this user in their\nown systems. Must be unique per tenant. Use this field to look up users by\nyour external identifier.\n",
            "example": "hr-employee-98765",
            "maxLength": 255
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UpdateUserRequest": {
        "type": "object",
        "description": "The user fields to change. Only provided fields are updated; omitted fields keep their current values.\n",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The user's full name, shown in account management and used when the user is listed as a customer's contact person.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The user's email address. This is their sign-in identity — changing it changes where login verification codes are sent.",
            "example": "john.doe@example.com"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The user's mobile phone number in E.164 format, used to reach them when they are a customer's contact person.",
            "example": "+15551234567"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CustomerType": {
        "type": "string",
        "description": "Whether the customer is a private individual (CONSUMER) or a company (BUSINESS).\nDetermines the expected identity format and which billing rules apply.\n",
        "enum": [
          "CONSUMER",
          "BUSINESS"
        ]
      },
      "CustomerBillingMethod": {
        "type": "string",
        "enum": [
          "E_INVOICE",
          "EMAIL_INVOICE",
          "PAPER_INVOICE"
        ],
        "description": "How invoices are delivered to the customer: electronically (E_INVOICE), by email (EMAIL_INVOICE), or by postal mail (PAPER_INVOICE).\nEMAIL_INVOICE requires a billing email and PAPER_INVOICE requires a billing address.\n"
      },
      "Address": {
        "type": "object",
        "description": "A postal address. Used wherever the API needs a physical location, such as billing addresses, shipping destinations, and coverage checks.\n",
        "required": [
          "street1",
          "city",
          "zip",
          "country"
        ],
        "properties": {
          "street": {
            "x-pii": "KIND_STREET_ADDRESS",
            "type": "string",
            "description": "The first line of the address, typically street and house number.",
            "example": "500 S Main St"
          },
          "street1": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated. Use `street` instead.\n\nThe first line of the address, typically street and house number.\n",
            "x-pii": "KIND_STREET_ADDRESS"
          },
          "street2": {
            "x-pii": "KIND_STREET_ADDRESS",
            "type": "string",
            "description": "The second line of the address, typically apartment, suite, unit, building, floor, etc.",
            "example": "Apt 1"
          },
          "city": {
            "type": "string",
            "description": "The city or municipality of the address.",
            "example": "Natick"
          },
          "zip": {
            "x-pii": "KIND_STREET_ADDRESS",
            "type": "string",
            "description": "The zip code of the address.\n\nDepending on the country, this may be referred to as a postal code or postcode.\n\nA US ZIP code must hold five digits. The four-digit extension (ZIP+4) is refused.\n",
            "example": "01701"
          },
          "country": {
            "type": "string",
            "description": "The two-letter country abbreviation (e.g., 'US' for United States, 'SE' for Sweden).",
            "pattern": "^[A-Z]{2}$",
            "example": "US"
          },
          "state": {
            "type": "string",
            "description": "For countries that use states or regions, the state or administrative area code (e.g., 'CA' for California in the United States).",
            "example": "CA"
          },
          "region": {
            "type": "string",
            "description": "A province, region, or territory name, applicable in certain countries (e.g., 'Ontario' in Canada, 'Sindh' in Pakistan).",
            "example": "Ontario"
          },
          "attention": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "An optional line for specifying a person, department, or attention to a specific entity within an address.",
            "example": "John Doe"
          }
        }
      },
      "Currency": {
        "type": "string",
        "description": "The three-letter ISO 4217 code of the currency used for prices, billing, and payments.",
        "example": "USD"
      },
      "UserRole": {
        "type": "string",
        "description": "The user's level of access when managing the customer's account.\nADMIN grants full administrative control, MANAGER grants day-to-day management access, and MEMBER grants limited access.\n",
        "enum": [
          "MEMBER",
          "MANAGER",
          "ADMIN"
        ]
      },
      "EmbeddedCustomerUser": {
        "type": "object",
        "description": "A user associated with a customer, including the role that governs what they can manage on the customer's account.\nContains essential details only — use the user endpoints for the full profile.\n",
        "required": [
          "userId",
          "name"
        ],
        "properties": {
          "userId": {
            "type": "string",
            "description": "Unique identifier for the user. Use it with the user endpoints to fetch full details.",
            "example": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
          },
          "name": {
            "type": "string",
            "description": "The user's full name.",
            "example": "John Doe"
          },
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        }
      },
      "Customer": {
        "type": "object",
        "description": "A customer is a billable entity, the person or organization responsible for paying for services.\n\nThe customer is the owner of subscribers and subscriptions. Users are associated with a customer, but are not owned by the customer.\n",
        "required": [
          "customerId",
          "customerType",
          "name",
          "contact"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "Unique identifier for the customer.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "customerType": {
            "$ref": "#/components/schemas/CustomerType"
          },
          "name": {
            "type": "string",
            "description": "The customer's display name — the company name for business customers or the person's full name for consumers. Shown on invoices and throughout the API.",
            "example": "John Doe"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "preferredLocale": {
            "type": "string",
            "description": "The preferred locale for the customer, in IETF BCP 47 format (e.g., \"en-US\", \"sv-SE\").",
            "example": "en-US",
            "default": "en-US"
          },
          "humanReadableId": {
            "type": "string",
            "description": "A human-readable identifier for the customer that customers can state in support requests.\nThis identifier is not a port-out account number. A new carrier cannot use it to move a number.\n",
            "example": "29A-BY3Z-X78"
          },
          "referenceId": {
            "type": "string",
            "description": "A reference identifier provided by API clients to identify this customer in their\nown systems. Must be unique per tenant. Use this field to look up customers or\nto create/retrieve customers during order creation.\n",
            "example": "crm-customer-12345",
            "maxLength": 255
          },
          "contact": {
            "type": "object",
            "description": "Contact details for the customer.",
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "description": "The primary contact email for the customer.",
                "example": "john.doe@example.com"
              },
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "The primary contact phone number for the customer.",
                "example": "+15551234567"
              }
            }
          },
          "billing": {
            "type": "object",
            "description": "Billing configuration and payment preferences for the customer.",
            "required": [
              "method",
              "currency"
            ],
            "additionalProperties": false,
            "properties": {
              "method": {
                "$ref": "#/components/schemas/CustomerBillingMethod",
                "description": "How invoices should be delivered to the customer."
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email address to send invoices to.\nRequired if billing method is EMAIL_INVOICE.\n",
                "example": "billing@company.com"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The billing address of the customer. A paper invoice goes to this address, and it decides the tax of each charge.\n\nA subscription with no service address of its own is served at this address. A delivery goes to this address when the customer holds no shipping address.\n"
              },
              "currency": {
                "$ref": "#/components/schemas/Currency",
                "description": "The currency for customer billing and payments."
              },
              "defaultPaymentProfileId": {
                "type": "string",
                "description": "Default payment profile to use for automatic payments and new orders.\nIf specified, enables automatic payment collection for invoices and bills.\n",
                "example": "c1d2e3f4-a5b6-7890-1234-901234567890"
              },
              "autoPay": {
                "type": "boolean",
                "description": "Whether the customer authorized automatic charges to their default payment profile.\nAn automatic charge also needs an active default payment profile that works off-session.\n",
                "example": true,
                "default": false
              }
            }
          },
          "users": {
            "type": "array",
            "description": "The users associated with this customer, each with the role that governs what they can manage on the customer's account.",
            "items": {
              "$ref": "#/components/schemas/EmbeddedCustomerUser"
            }
          },
          "contactPerson": {
            "$ref": "#/components/schemas/EmbeddedCustomerUser",
            "description": "The primary contact person for the customer."
          },
          "shipping": {
            "$ref": "#/components/schemas/Shipping",
            "deprecated": true,
            "description": "Deprecated. Use `shippingAddress` instead.\n\nThe shipping address for the customer. Only `address` holds a value.\n"
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address where the customer gets physical goods, such as SIM cards or devices.\n\nAbsent when the customer gave no shipping address. A delivery then goes to the billing address.\n"
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address that a delivery to this customer uses. It is `shippingAddress` when the customer holds one, and `billing.address` when the customer holds none.\n\nThe platform resolves this field. To change it, change one of the two addresses.\n"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CreateCustomerRequest": {
        "type": "object",
        "description": "The details needed to create a customer: who they are, how to reach them, how they should be billed, and which users can manage the account.\n",
        "required": [
          "customerType",
          "name",
          "contact",
          "billing",
          "contactPersonUserId",
          "userIds"
        ],
        "additionalProperties": false,
        "properties": {
          "customerType": {
            "$ref": "#/components/schemas/CustomerType"
          },
          "name": {
            "type": "string",
            "description": "The customer's display name — the company name for business customers or the person's full name for consumers. Shown on invoices and throughout the API.",
            "example": "John Doe"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "referenceId": {
            "type": "string",
            "description": "Optional reference ID to assign to the customer.\nMust be unique per tenant.\n",
            "example": "crm-customer-12345",
            "maxLength": 255
          },
          "preferredLocale": {
            "type": "string",
            "description": "The preferred locale for the customer, in IETF BCP 47 format (e.g., \"en-US\", \"sv-SE\").",
            "example": "en-US",
            "default": "en-US"
          },
          "contact": {
            "type": "object",
            "description": "Contact details for the customer.",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "description": "The primary contact email for the customer.",
                "example": "john.doe@example.com"
              },
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "The primary contact phone number for the customer.",
                "example": "+15551234567"
              }
            }
          },
          "billing": {
            "type": "object",
            "description": "Billing configuration and payment preferences for the customer.",
            "required": [
              "method",
              "currency"
            ],
            "additionalProperties": false,
            "properties": {
              "method": {
                "$ref": "#/components/schemas/CustomerBillingMethod",
                "description": "How invoices should be delivered to the customer."
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email address to send invoices to.\nRequired if billing method is EMAIL_INVOICE.\n",
                "example": "billing@company.com"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The billing address of the customer. A paper invoice goes to this address, and it decides the tax of each charge.\n\nA subscription with no service address of its own is served at this address. A delivery goes to this address when the customer holds no shipping address.\n"
              },
              "currency": {
                "$ref": "#/components/schemas/Currency",
                "description": "The currency for customer billing and payments."
              },
              "defaultPaymentProfileId": {
                "type": "string",
                "description": "Default payment profile to use for automatic payments and new orders.\nMust be a payment profile that will be accessible to this customer.\n",
                "example": "l47ac10b-58cc-4372-a567-0e02b2c3d479"
              },
              "autoPay": {
                "type": "boolean",
                "description": "Whether to automatically charge the default payment profile for invoices and bills.\nRequires defaultPaymentProfileId to be set.\n",
                "example": true,
                "default": false
              }
            }
          },
          "userIds": {
            "type": "array",
            "description": "List of user IDs to associate with this customer.\n\nDepending on the user's role they will either be a member of the customer or given access to manage it.\n",
            "items": {
              "type": "string"
            }
          },
          "contactPersonUserId": {
            "type": "string",
            "description": "The user ID of the contact person for this customer.\n\nThis user will be set as the primary contact for the customer and will receive important notifications.\n",
            "example": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
          },
          "shipping": {
            "$ref": "#/components/schemas/ShippingInput",
            "deprecated": true,
            "description": "Deprecated. Use `shippingAddress` instead.\n\nThe shipping address for the customer. The platform stores only `address`.\n"
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address where the customer gets physical goods, such as SIM cards or devices.\n\nGive it only when it is different from the billing address. A customer with no shipping address gets a delivery at the billing address.\n"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UpdateCustomerRequest": {
        "type": "object",
        "description": "The customer fields to change. Only provided fields are updated; omitted fields keep their current values.\n",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The customer's display name — the company name for business customers or the person's full name for consumers. Shown on invoices and throughout the API.",
            "example": "John Doe"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "preferredLocale": {
            "type": "string",
            "description": "The preferred locale for the customer, in IETF BCP 47 format (e.g., \"en-US\", \"sv-SE\").",
            "example": "en-US"
          },
          "contact": {
            "type": "object",
            "description": "Contact details for the customer.",
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "description": "The primary contact email for the customer.",
                "example": "john.doe@example.com"
              },
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "The primary contact phone number for the customer.",
                "example": "+15551234567"
              }
            }
          },
          "billing": {
            "type": "object",
            "description": "Billing details for the customer.",
            "properties": {
              "method": {
                "$ref": "#/components/schemas/CustomerBillingMethod"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email address to send invoices to.\n\nRequired if billing method is EMAIL_INVOICE.\n",
                "example": "billing@example.com"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The billing address of the customer. A paper invoice goes to this address, and it decides the tax of each charge.\n\nA subscription with no service address of its own is served at this address. A delivery goes to this address when the customer holds no shipping address.\n"
              },
              "currency": {
                "$ref": "#/components/schemas/Currency",
                "description": "The currency for the customer billing."
              },
              "defaultPaymentProfileId": {
                "type": "string",
                "description": "Default payment profile to use for automatic payments and new orders.\nMust be a valid payment profile owned by this customer.\nSet to null to disable automatic payments.\n",
                "example": "m47ac10b-58cc-4372-a567-0e02b2c3d479"
              },
              "autoPay": {
                "type": "boolean",
                "description": "Whether to automatically pay invoices for this customer if a valid payment method is available.",
                "example": false
              }
            }
          },
          "userIds": {
            "type": "array",
            "description": "User IDs to associate with this customer, in addition to those already associated.\n\nDepending on the user's role they will either be a member of the customer or given access to manage it.\nTo remove a user, use the remove-user endpoint instead.\n",
            "items": {
              "type": "string"
            }
          },
          "shippingAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address where the customer gets physical goods, such as SIM cards or devices.\n\nGive it only when it is different from the billing address. A customer with no shipping address gets a delivery at the billing address.\n"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "ProductCategory": {
        "type": "string",
        "x-extensible-enum": true,
        "description": "A product category is a sub-type for grouping offerings of the same type.\n\nTypically, product offerings of the same type with the same category allow\nfor switching between them. For upgrading and downgrading subscriptions and\nlicenses, we recommend using their corresponding endpoints though.\n\nCategories are grouped by their product type:\n\n**SUBSCRIPTION categories:**\n- `PRODUCT_CATEGORY_SUBSCRIPTION_CELL` - Mobile cellular subscription\n- `PRODUCT_CATEGORY_SUBSCRIPTION_CELL_FIXED` - Cellular subscription at a fixed location\n- `PRODUCT_CATEGORY_SUBSCRIPTION_DATA_SIM` - Data-only SIM subscription\n- `PRODUCT_CATEGORY_SUBSCRIPTION_BROADBAND` - Broadband internet subscription\n- `PRODUCT_CATEGORY_SUBSCRIPTION_M2M` - Machine-to-machine IoT subscription\n- `PRODUCT_CATEGORY_TRAVEL_ESIM` - Travel eSIM subscription for international roaming\n- `PRODUCT_CATEGORY_VANITY_NUMBER_FORWARD` - Vanity number that forwards calls\n- `PRODUCT_CATEGORY_VANITY_NUMBER_CELL` - Vanity number on a cellular subscription\n\n**SUBSCRIPTION_ADDON categories:**\n- `PRODUCT_CATEGORY_EXTRA_DATA` - Additional data package addon\n- `PRODUCT_CATEGORY_TRAVEL_ESIM_PACKAGE` - Travel eSIM data package with country/region coverage\n- `PRODUCT_CATEGORY_ABROAD` - International roaming addon\n- `PRODUCT_CATEGORY_ABROAD_EXTRA_DATA` - Additional data package for roaming\n- `PRODUCT_CATEGORY_DATA_PACKAGE_OUTSIDE_EU` - Data package for use outside the EU\n- `PRODUCT_CATEGORY_NETWORK_EXTENSIONS` - Network feature addon\n- `PRODUCT_CATEGORY_VANITY_NUMBER` - Vanity number addon\n\n**EXTERNAL_PRODUCT categories:**\n- `PRODUCT_CATEGORY_EXTERNAL_PRODUCT` - External purchasable product\n- `PRODUCT_CATEGORY_EXTERNAL_PRODUCT_ADDON` - Addon for external product\n\n**SIM_CARD categories:**\n- `PRODUCT_CATEGORY_SIM_CARD` - Physical SIM or eSIM replacement for an existing subscription\n\n**LICENSE categories (PBX):**\n- `PRODUCT_CATEGORY_PBX_USER_LEVEL` - Level of a PBX user license\n- `PRODUCT_CATEGORY_PBX_NUMBER` - PBX phone number\n- `PRODUCT_CATEGORY_PBX_MOBILE_NUMBER` - PBX mobile number\n- `PRODUCT_CATEGORY_PBX_LANDLINE_FORWARD` - Forward from a landline number\n- `PRODUCT_CATEGORY_PBX_SOFTPHONE` - Softphone\n- `PRODUCT_CATEGORY_PBX_STATISTICS` - Call statistics\n- `PRODUCT_CATEGORY_PBX_CALL_RECORDING` - Call recording\n- `PRODUCT_CATEGORY_PBX_VOICEMAIL` - Voicemail\n- `PRODUCT_CATEGORY_PBX_QUEUE_MAX_WAITING_CALLERS` - Queue capacity\n- `PRODUCT_CATEGORY_PBX_ROUTE_IVR`, `PRODUCT_CATEGORY_PBX_ROUTE_GROUP`, `PRODUCT_CATEGORY_PBX_ROUTE_QUEUE` - Call routes\n- `PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_IVR`, `PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_GROUP`, `PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_QUEUE`, `PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_VOICEMAIL` - Call route features\n\n**Other categories:**\n- `PRODUCT_CATEGORY_SUBSCRIPTION_MEX_PARTNER`, `PRODUCT_CATEGORY_INTERNATIONAL_NUMBER`\n\nA caller must tolerate new values.\n",
        "enum": [
          "PRODUCT_CATEGORY_SUBSCRIPTION_CELL",
          "PRODUCT_CATEGORY_SUBSCRIPTION_DATA_SIM",
          "PRODUCT_CATEGORY_SUBSCRIPTION_BROADBAND",
          "PRODUCT_CATEGORY_SUBSCRIPTION_M2M",
          "PRODUCT_CATEGORY_TRAVEL_ESIM",
          "PRODUCT_CATEGORY_SUBSCRIPTION_CELL_FIXED",
          "PRODUCT_CATEGORY_VANITY_NUMBER_FORWARD",
          "PRODUCT_CATEGORY_VANITY_NUMBER_CELL",
          "PRODUCT_CATEGORY_EXTRA_DATA",
          "PRODUCT_CATEGORY_TRAVEL_ESIM_PACKAGE",
          "PRODUCT_CATEGORY_ABROAD",
          "PRODUCT_CATEGORY_ABROAD_EXTRA_DATA",
          "PRODUCT_CATEGORY_DATA_PACKAGE_OUTSIDE_EU",
          "PRODUCT_CATEGORY_NETWORK_EXTENSIONS",
          "PRODUCT_CATEGORY_VANITY_NUMBER",
          "PRODUCT_CATEGORY_EXTERNAL_PRODUCT",
          "PRODUCT_CATEGORY_EXTERNAL_PRODUCT_ADDON",
          "PRODUCT_CATEGORY_SIM_CARD",
          "PRODUCT_CATEGORY_PBX_USER_LEVEL",
          "PRODUCT_CATEGORY_PBX_NUMBER",
          "PRODUCT_CATEGORY_PBX_MOBILE_NUMBER",
          "PRODUCT_CATEGORY_PBX_LANDLINE_FORWARD",
          "PRODUCT_CATEGORY_PBX_SOFTPHONE",
          "PRODUCT_CATEGORY_PBX_STATISTICS",
          "PRODUCT_CATEGORY_PBX_CALL_RECORDING",
          "PRODUCT_CATEGORY_PBX_VOICEMAIL",
          "PRODUCT_CATEGORY_PBX_QUEUE_MAX_WAITING_CALLERS",
          "PRODUCT_CATEGORY_PBX_ROUTE_IVR",
          "PRODUCT_CATEGORY_PBX_ROUTE_GROUP",
          "PRODUCT_CATEGORY_PBX_ROUTE_QUEUE",
          "PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_IVR",
          "PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_GROUP",
          "PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_QUEUE",
          "PRODUCT_CATEGORY_PBX_ROUTE_FEATURE_VOICEMAIL",
          "PRODUCT_CATEGORY_SUBSCRIPTION_MEX_PARTNER",
          "PRODUCT_CATEGORY_INTERNATIONAL_NUMBER"
        ],
        "example": "PRODUCT_CATEGORY_SUBSCRIPTION_CELL"
      },
      "ProductOfferingGroup": {
        "type": "object",
        "description": "A product group organizes related product offerings.",
        "required": [
          "productOfferingGroupId",
          "name",
          "category"
        ],
        "properties": {
          "productOfferingGroupId": {
            "type": "string",
            "description": "Unique identifier for the product group.",
            "example": "mobile-plans"
          },
          "name": {
            "type": "string",
            "description": "Name of the product group in the requested locale.",
            "example": "Mobile Plans"
          },
          "description": {
            "type": "string",
            "description": "Description of the product group in the requested locale.",
            "example": "Bundled cell subscriptions with unlimited calls and SMS with ILD enabled."
          },
          "category": {
            "$ref": "#/components/schemas/ProductCategory"
          },
          "internalDescription": {
            "type": "string",
            "description": "Internal description of the product group for operational use only.",
            "example": "Core mobile offerings targeting consumer and business segments"
          }
        }
      },
      "ProductOfferingVersionStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "TESTING",
          "PUBLISHED",
          "UNPUBLISHED",
          "ARCHIVED"
        ],
        "description": "The stage of this version of the product offering.\n\n- `DRAFT`: The brand edits the version. Nobody can order it.\n- `TESTING`: The brand tests the version. Nobody can order it.\n- `PUBLISHED`: A customer can order the version from each product catalog that holds it.\n- `UNPUBLISHED`: A newer version replaced this version in each product catalog. Only a customer with an assigned product catalog that holds the version can order it. A catalog holds it again only when the brand adds it. Existing subscriptions keep it.\n- `ARCHIVED`: Nobody can order the version. The brand can archive a version only when no active subscription, license or add-on uses it. A version that the brand archived before this rule can still have active subscriptions.\n",
        "example": "PUBLISHED"
      },
      "ProductType": {
        "type": "string",
        "x-extensible-enum": true,
        "description": "The type of product offering determines how it can be used and what kind of resource it creates.\n\n**SUBSCRIPTION**\nCreates a standalone subscription resource (e.g., mobile plan, broadband, travel eSIM).\n- Includes categories like `SUBSCRIPTION_CELL`, `TRAVEL_ESIM`\n- Can be created via order or directly depending on configuration\n- Has its own lifecycle (activation, suspension, termination)\n\n**SUBSCRIPTION_ADDON**\nAdds features or resources to an existing subscription.\n- Includes categories like `TRAVEL_ESIM_PACKAGE`\n- Must be attached to a parent subscription\n\n**LICENSE**\nCreates a license for business/PBX features.\n- Typically used for enterprise telephony features\n\n**EXTERNAL_PRODUCT**\nRepresents purchasable items outside the core telecom platform.\n- Can only be ordered via orders, not created directly\n\n**SIM_CARD**\nReplaces the SIM card for an existing subscription through a subscription change order.\n",
        "enum": [
          "SUBSCRIPTION",
          "SUBSCRIPTION_ADDON",
          "LICENSE",
          "EXTERNAL_PRODUCT",
          "SIM_CARD"
        ],
        "example": "SUBSCRIPTION"
      },
      "EmbeddedProduct": {
        "type": "object",
        "description": "Embedded representation of a product.",
        "required": [
          "productId",
          "internalName",
          "type",
          "category"
        ],
        "properties": {
          "productId": {
            "type": "string",
            "description": "The unique identifier for the product.",
            "example": "d4e5f6a7-b8c9-0123-4567-890123456789"
          },
          "internalName": {
            "type": "string",
            "description": "The name used to identify the product internally in the catalog. Not intended for customer display — use the product offering name instead.",
            "example": "us-mobile-unlimited-5gb"
          },
          "type": {
            "$ref": "#/components/schemas/ProductType"
          },
          "category": {
            "$ref": "#/components/schemas/ProductCategory"
          },
          "networkProviderId": {
            "type": "string",
            "description": "The unique identifier for the network provider.",
            "example": "tmobile-us"
          },
          "features": {
            "type": "object",
            "description": "The features included with the product, if any. Typically used for telecom products.",
            "properties": {
              "dataMb": {
                "type": "number",
                "description": "Megabytes of data included with the product.\nPresent for cellular, data, and travel eSIM products.\n",
                "example": 2048
              },
              "unlimitedData": {
                "type": "boolean",
                "description": "True when the product puts no cap on data. `dataMb` is then not a limit to count down,\nso show the data used on its own instead of a share of the limit.\n",
                "example": false
              },
              "includedCallSeconds": {
                "type": "integer",
                "description": "Outbound call seconds included with the product.\nPresent for cellular subscription categories.\n",
                "example": 1000
              },
              "includedSms": {
                "type": "integer",
                "description": "Number of SMS messages included with the product.\nPresent for cellular subscription categories.\n",
                "example": 500
              },
              "validityDays": {
                "type": "integer",
                "description": "Number of days the product is valid for.\nPresent for travel eSIM packages (`TRAVEL_ESIM_PACKAGE`).\n",
                "example": 30
              },
              "countries": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "ISO 3166-1 alpha-3 country codes where the product provides coverage.\nPresent for travel eSIM packages (`TRAVEL_ESIM_PACKAGE`).\nUse the `countries` query parameter on list endpoints to filter by coverage.\n",
                "example": [
                  "USA",
                  "CAN",
                  "MEX"
                ]
              },
              "regions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Named regions covered by the product.\nPresent for travel eSIM packages (`TRAVEL_ESIM_PACKAGE`).\nUse the `regions` query parameter on list endpoints to filter by coverage.\n",
                "example": [
                  "NORTH_AMERICA"
                ]
              },
              "activationType": {
                "type": "string",
                "description": "How the travel eSIM package activates.\nPresent for travel eSIM packages (`TRAVEL_ESIM_PACKAGE`).\n",
                "enum": [
                  "INSTANT",
                  "FIRST_USE"
                ],
                "example": "INSTANT"
              },
              "simCardType": {
                "type": "string",
                "description": "The SIM format for a SIM card product.",
                "enum": [
                  "PSIM",
                  "ESIM"
                ],
                "example": "PSIM"
              }
            }
          }
        }
      },
      "PriceType": {
        "type": "string",
        "description": "How the price is charged.\n\n- ONE_TIME: Charged once (e.g., a setup fee or hardware purchase).\n- RECURRING: Charged every billing cycle (e.g., a monthly subscription fee).\n",
        "enum": [
          "ONE_TIME",
          "RECURRING"
        ]
      },
      "Duration": {
        "type": "object",
        "description": "A length of time, expressed as a count of some unit.",
        "required": [
          "unit",
          "value"
        ],
        "properties": {
          "unit": {
            "type": "string",
            "description": "The unit of time being counted. Currently only months are supported.",
            "enum": [
              "MONTHS"
            ]
          },
          "value": {
            "type": "integer",
            "description": "How many of the unit the duration lasts.",
            "example": 3
          }
        }
      },
      "PriceDiscount": {
        "type": "object",
        "description": "A recurring amount that comes off the price when you price the order. The amount applies to one\nbilling period, the same as the price, and it is not a total. For example, a discount of 500 for\n3 periods takes 500 off each of the first three periods, and 1500 in all.\n",
        "required": [
          "amountMinor"
        ],
        "properties": {
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount that comes off each billing period, in minor currency units.",
            "example": 500
          },
          "duration": {
            "$ref": "#/components/schemas/Duration",
            "description": "How long the discount lasts. An `UPFRONT_PAYMENT` discount always gives a duration, and it\ncovers the billing cycles that the customer pays for in advance. The other two sources omit\nthe duration when the discount never stops. The discount then comes off every charge for as\nlong as the price is in effect. For a one-time price that is the single charge.\n"
          },
          "source": {
            "type": "string",
            "description": "What the customer must do to get the discount:\n\n- `STANDARD` is given to every customer who orders the offering.\n- `BINDING_CONTRACT` needs the customer to commit for the contract's length.\n- `UPFRONT_PAYMENT` needs the customer to pay for several billing periods at once.\n",
            "enum": [
              "STANDARD",
              "BINDING_CONTRACT",
              "UPFRONT_PAYMENT"
            ],
            "example": "STANDARD"
          },
          "invoicingDescription": {
            "type": "string",
            "description": "What the brand calls this discount on an invoice. Omitted when the brand gave the discount\nno name of its own.\n",
            "example": "Campaign discount"
          }
        }
      },
      "BindingContract": {
        "type": "object",
        "description": "A commitment to keep the subscription for a fixed term, usually in exchange\nfor a discount that runs for the length of the commitment.\n",
        "required": [
          "duration"
        ],
        "properties": {
          "duration": {
            "$ref": "#/components/schemas/Duration"
          },
          "discount": {
            "$ref": "#/components/schemas/PriceDiscount"
          }
        }
      },
      "UpfrontPayment": {
        "type": "object",
        "description": "Billing cycles the customer pays for in advance when ordering, usually at a discount.\nBilling returns to the normal cycle once the prepaid cycles run out.\n",
        "required": [
          "billingCycles"
        ],
        "properties": {
          "billingCycles": {
            "type": "integer",
            "description": "How many billing cycles are paid for upfront. This counts cycles, not months: three\ncycles of a price that bills quarterly covers nine months.\n",
            "example": 3
          },
          "discount": {
            "$ref": "#/components/schemas/PriceDiscount"
          }
        }
      },
      "BillingCycle": {
        "type": "object",
        "description": "How often a recurring price is charged.",
        "required": [
          "period",
          "interval"
        ],
        "properties": {
          "period": {
            "type": "string",
            "description": "The unit of time between charges. Currently only monthly billing is supported.",
            "enum": [
              "MONTHLY"
            ]
          },
          "interval": {
            "type": "integer",
            "description": "The quantity of periods between charges. For example, a MONTHLY period with an interval of\n1 bills each month, and an interval of 3 bills each three months.\n",
            "example": 1
          }
        }
      },
      "Price": {
        "type": "object",
        "description": "The cost of a product offering, as configured in the catalog. A price is either one-time or\nrecurring, and the priceType field tells you which. Amounts are integers in the minor units of\nthe currency. For example, 2999 is $29.99 when the currency is USD.\n",
        "required": [
          "currency",
          "priceType"
        ],
        "properties": {
          "netPriceMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The configured price of the offering, in minor currency units. When `includesTax` is\ntrue, this amount is the total the customer pays, and the tax is a part of it.\n",
            "example": 2999
          },
          "includesTax": {
            "type": "boolean",
            "description": "True when the configured price includes its tax. The tax is then a part of\n`netPriceMinor` rather than an amount on top of it.\n",
            "example": false
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code the price is expressed in (e.g., \"USD\").",
            "example": "USD"
          },
          "priceType": {
            "$ref": "#/components/schemas/PriceType"
          },
          "bindingContract": {
            "$ref": "#/components/schemas/BindingContract"
          },
          "standardDiscount": {
            "$ref": "#/components/schemas/PriceDiscount"
          },
          "customUpfrontPayment": {
            "$ref": "#/components/schemas/UpfrontPayment"
          },
          "billingCycle": {
            "$ref": "#/components/schemas/BillingCycle"
          },
          "currencyOptionsMinor": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Per-currency price overrides keyed by three-letter ISO currency code (e.g. \"USD\", \"SEK\"). Each value is the cost in that currency, in minor currency units."
          }
        }
      },
      "BroadbandFactsFee": {
        "type": "object",
        "description": "One fee on the FCC Broadband Facts label.",
        "required": [
          "name",
          "amountMinor"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "What the label calls the fee.",
            "example": "Federal Universal Service Fund"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount of the fee, in minor currency units.",
            "example": 21
          }
        }
      },
      "BroadbandFacts": {
        "type": "object",
        "description": "The values of the FCC Broadband Facts label that differ for each plan. A US storefront shows the\nlabel next to each plan it sells. Only an offering that the brand gave these values has them.\nThe label shows the amounts in the currency of the price.\n",
        "required": [
          "planCode",
          "monthlyProviderFees",
          "singlePurchaseFees",
          "earlyTerminationFeeMinor",
          "overUsageDataPriceMinor",
          "additionalDataIncrementGb",
          "unlimitedData"
        ],
        "properties": {
          "planCode": {
            "type": "string",
            "description": "15 characters of A-Z and 0-9, unique among the offerings of the brand. The unique plan\nidentifier on the label is `M`, then the FCC Registration Number of the brand, then this code.\n",
            "example": "FLEXSTANDARD001"
          },
          "monthlyProviderFees": {
            "type": "array",
            "description": "The fees that the provider adds to the monthly price.",
            "items": {
              "$ref": "#/components/schemas/BroadbandFactsFee"
            }
          },
          "singlePurchaseFees": {
            "type": "array",
            "description": "The fees that the customer pays one time, when they buy the plan.",
            "items": {
              "$ref": "#/components/schemas/BroadbandFactsFee"
            }
          },
          "earlyTerminationFeeMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The fee to end the plan early, in minor currency units. Always 0, because the platform charges no such fee.",
            "example": 0
          },
          "overUsageDataPriceMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The price of more data after the allowance, in minor currency units. Always 0, because the platform charges no such price.",
            "example": 0
          },
          "additionalDataIncrementGb": {
            "type": "number",
            "description": "The amount of data, in GB, that `overUsageDataPriceMinor` buys. Always 0, because the platform sells no data after the allowance.",
            "example": 0
          },
          "unlimitedData": {
            "type": "boolean",
            "description": "True when the plan has no data limit. The label then shows \"Unlimited\" as the data that the\nmonthly price includes, and not the data allowance of the product.\n",
            "example": false
          }
        }
      },
      "ProductOffering": {
        "type": "object",
        "description": "A product offering is a product combined with a price that is offered to customers.\n\nThe offering's `type` and `category` are available via the nested `product` object.\nSee ProductType and ProductCategory schemas for available values and their meanings.\n",
        "required": [
          "productOfferingId",
          "status",
          "versionStatus",
          "name",
          "price",
          "customerType",
          "product"
        ],
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "Unique identifier for the product offering.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "status": {
            "type": "string",
            "deprecated": true,
            "enum": [
              "AVAILABLE",
              "ARCHIVED"
            ],
            "description": "Deprecated. Use `versionStatus` instead.\n\nThe status of the product offering.\n\nArchived offerings are not allowed to be created/ordered by customers, but can still be used for existing subscriptions.\n",
            "example": "AVAILABLE"
          },
          "versionStatus": {
            "$ref": "#/components/schemas/ProductOfferingVersionStatus"
          },
          "versionNumber": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "description": "The number of this version among the versions of the offering. The first version has the number 1. Each new version gets the next number.\n",
            "example": 2
          },
          "name": {
            "type": "string",
            "description": "Name of the product offering.",
            "example": "Seamless 10GB"
          },
          "description": {
            "type": "string",
            "description": "Description of the product offering.",
            "example": "Basic mobile plan with 5GB data and unlimited calls"
          },
          "richContent": {
            "type": "string",
            "description": "Rich HTML content with detailed information about the product offering.",
            "example": "\u003ch3\u003eFeatures\u003c/h3\u003e\u003cul\u003e\u003cli\u003e5GB monthly data\u003c/li\u003e\u003cli\u003eUnlimited calls \u0026 texts\u003c/li\u003e\u003cli\u003eNo setup fees\u003c/li\u003e\u003c/ul\u003e"
          },
          "uspList": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Short plain-text selling points, in the order the brand put them. A storefront shows them as a checklist.\n",
            "example": [
              "5GB of data every month",
              "Unlimited calls and texts",
              "No setup fee"
            ]
          },
          "product": {
            "$ref": "#/components/schemas/EmbeddedProduct"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "group": {
            "$ref": "#/components/schemas/ProductOfferingGroup"
          },
          "variantSetId": {
            "type": "string",
            "description": "The variant set that the product offering belongs to. A variant set holds the product offerings that are price variants of one plan, for example one plan with 0, 12 and 24 months of binding. Absent when the product offering is not in a variant set.\n",
            "example": "8c2d4e6f-1a3b-4c5d-9e7f-0a1b2c3d4e5f"
          },
          "customerType": {
            "$ref": "#/components/schemas/CustomerType"
          },
          "addonCategories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductCategory"
            },
            "description": "List of product categories this addon is applicable for.\nOnly populated when type is `SUBSCRIPTION_ADDON`.\nFor example, a `TRAVEL_ESIM_PACKAGE` addon might be applicable to `TRAVEL_ESIM` subscriptions.\n"
          },
          "internalDescription": {
            "type": "string",
            "description": "Internal description of the product offering for operational use only.",
            "example": "seamless_cell_10gb_us"
          },
          "imageUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL to the image representing the product offering.",
            "example": "https://cdn.example.com/images/mobile-basic.png"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "broadbandFacts": {
            "$ref": "#/components/schemas/BroadbandFacts"
          }
        }
      },
      "SubscriptionStatus": {
        "type": "string",
        "description": "Current stage of the subscription lifecycle.\n\n- PENDING: Created but not yet activated in the network\n- ACTIVATED: Active and billable; service is available\n- BLOCKED: Service disabled by the operator, typically for fraud prevention or policy violations\n- CANCELLED: Permanently terminated\n- PAUSED: Temporarily stopped at the customer's request; billing stops and service is disabled\n- SUSPENDED: Temporarily disabled, typically for payment issues; billing continues but service is disabled\n",
        "enum": [
          "PENDING",
          "ACTIVATED",
          "BLOCKED",
          "CANCELLED",
          "PAUSED",
          "SUSPENDED"
        ]
      },
      "SubscriptionType": {
        "type": "string",
        "description": "The kind of telecommunications service the subscription provides.\n\nCommon values include `CELL` (mobile voice/SMS/data), `DATA` (data-only SIM), `MBB` (mobile broadband),\n`M2M` (machine-to-machine/IoT), and `TRAVEL_ESIM` (travel eSIM for international roaming).\nDetermined by the product offering the subscription was created with.\n",
        "example": "CELL"
      },
      "EmbeddedProductOffering": {
        "type": "object",
        "description": "Essential information about a product offering — what is being sold and at what price — without the full catalog details.",
        "required": [
          "productOfferingId",
          "name",
          "price"
        ],
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier for the product offering. Use it with the product offering endpoints to fetch full details.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "The customer-facing name of the product offering, suitable for display in checkout and account views.",
            "example": "Mobile Unlimited"
          },
          "description": {
            "type": "string",
            "description": "The customer-facing description of the product offering, suitable for display next to its name.",
            "example": "Unlimited calls and 20 GB of data each month."
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "group": {
            "$ref": "#/components/schemas/ProductOfferingGroup"
          },
          "imageUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL to the image representing the product offering.",
            "example": "https://cdn.example.com/images/mobile-basic.png"
          }
        }
      },
      "EmbeddedSubscriber": {
        "type": "object",
        "description": "The person who uses the service on a subscription, as distinct from the customer who pays for it.",
        "required": [
          "subscriberId",
          "name"
        ],
        "properties": {
          "subscriberId": {
            "type": "string",
            "description": "The unique identifier of the subscriber. Use it with the subscriber endpoints to fetch full details.",
            "example": "d0e1f2a3-b4c5-6789-0123-456789012345"
          },
          "name": {
            "type": "string",
            "description": "The subscriber's full name.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The subscriber's email address, if one has been provided.",
            "example": "john.doe@example.com"
          },
          "address": {
            "deprecated": true,
            "description": "Deprecated. Use `serviceAddress` on the subscription instead.\n\nThe service address of the subscription that embeds this subscriber.\n",
            "$ref": "#/components/schemas/Address"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the subscriber was created.",
            "example": "2024-01-15T10:30:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the subscriber was last updated.",
            "example": "2024-01-20T14:45:00Z"
          }
        }
      },
      "SubscriptionServiceAddress": {
        "type": "object",
        "description": "The address where a subscription is served, and the record that holds it.\n\nIn the US, this is the E911 address that emergency services get for the phone number.\n",
        "required": [
          "address",
          "source"
        ],
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "source": {
            "type": "string",
            "description": "The record that holds the address.\n\n- `SUBSCRIPTION`: The subscription holds an address of its own.\n- `CUSTOMER_BILLING`: The subscription holds no address of its own, so the billing address of the customer applies.\n",
            "enum": [
              "SUBSCRIPTION",
              "CUSTOMER_BILLING"
            ],
            "example": "SUBSCRIPTION"
          }
        }
      },
      "BarReason": {
        "type": "string",
        "description": "Why a subscription is barred. The reason tells what removes the bar.\n\n- UNKNOWN: The bar has no recorded reason.\n- NEW_SIM_CARD: The SIM card is blocked, for example after a lost or stolen phone. A new SIM card removes the bar.\n- MISSING_PAYMENT: A payment is missing. The payment removes the bar.\n- FRAUD: The fraud check barred the subscription.\n- CUSTOMER_BLOCKED: The customer of the subscription is blocked. An unblock of the customer removes the bar.\n- MANUAL: An operator barred the subscription by hand.\n",
        "enum": [
          "UNKNOWN",
          "NEW_SIM_CARD",
          "MISSING_PAYMENT",
          "FRAUD",
          "CUSTOMER_BLOCKED",
          "MANUAL"
        ],
        "example": "MISSING_PAYMENT"
      },
      "PortingStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "IN_PROGRESS",
          "SCHEDULED",
          "COMPLETED",
          "FAILED"
        ],
        "description": "Current status of the porting process.\n\n- PENDING: Porting request created but not yet submitted to the carriers\n- IN_PROGRESS: Request submitted and awaiting a response from the losing carrier\n- SCHEDULED: Accepted by the losing carrier; the transfer will execute on the scheduled date\n- COMPLETED: The number has been transferred and is active\n- FAILED: The request was rejected, canceled, or could not be completed\n"
      },
      "PortingDirection": {
        "type": "string",
        "enum": [
          "INBOUND",
          "OUTBOUND"
        ],
        "description": "The direction of the number transfer. INBOUND means the number is being ported into this platform from another carrier; OUTBOUND means the number is leaving this platform for another carrier."
      },
      "EmbeddedPorting": {
        "type": "object",
        "description": "Number porting information for subscriptions, indicating scheduled number transfers.\n\nTo get the detailed porting information, use the porting endpoint.\n",
        "required": [
          "msisdn",
          "status",
          "direction",
          "scheduledAt"
        ],
        "properties": {
          "msisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "string",
            "description": "The pending phone number that the subscription will be ported in with. This will always be a non-active number.",
            "example": "+15551234567"
          },
          "status": {
            "$ref": "#/components/schemas/PortingStatus"
          },
          "direction": {
            "$ref": "#/components/schemas/PortingDirection"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the number porting is scheduled to occur.",
            "example": "2024-02-01"
          }
        }
      },
      "Subscription": {
        "type": "object",
        "description": "A subscription represents a telecommunications service provisioned for a customer with embedded product and pricing details.",
        "required": [
          "subscriptionId",
          "status",
          "type",
          "display",
          "msisdn",
          "tempNumber",
          "sim",
          "customer",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier for the subscription.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "referenceId": {
            "type": "string",
            "description": "A reference identifier provided by API clients to identify this subscription in their\nown systems. Must be unique per tenant. Use this field to look up subscriptions by your\nexternal identifier or to create/retrieve subscriptions during order creation.\n",
            "example": "crm-subscription-12345",
            "maxLength": 255
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          },
          "type": {
            "$ref": "#/components/schemas/SubscriptionType"
          },
          "display": {
            "type": "string",
            "description": "Human-friendly name for the subscription, suitable for showing in UIs. Auto-generated as a pretty-printed version of the phone number unless a custom display name was set at creation.",
            "example": "(555) 123-4567"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The phone number currently active on this subscription, in E.164 format. MSISDN (Mobile Station International Subscriber Directory Number) is the telecom term for a subscriber's full international phone number.",
            "example": "+15551234567"
          },
          "customer": {
            "$ref": "#/components/schemas/EmbeddedCustomer"
          },
          "productOffering": {
            "$ref": "#/components/schemas/EmbeddedProductOffering"
          },
          "subscriber": {
            "$ref": "#/components/schemas/EmbeddedSubscriber"
          },
          "serviceAddress": {
            "$ref": "#/components/schemas/SubscriptionServiceAddress",
            "description": "The address where this subscription is served. It is the address that the subscription holds, or the billing address of the customer when the subscription holds none.\n\nAbsent when no record holds an address.\n"
          },
          "extensions": {
            "type": "object",
            "description": "Additional subscription extensions fields provided for custom subscription types.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "sim": {
            "type": "object",
            "description": "SIM card information for the subscription. Sensitive details like PUK require separate API calls.\n\nUse dedicated SIM API endpoints with proper authorization to access sensitive information such as PUK.\n",
            "required": [
              "esim"
            ],
            "properties": {
              "esim": {
                "type": "boolean",
                "description": "Whether the subscription uses eSIM (embedded SIM) technology, a digital SIM profile downloaded to the device, instead of a physical SIM card.",
                "example": true
              },
              "imei": {
                "x-pii": "KIND_IMEI_HARDWARE_ID",
                "type": "string",
                "description": "International Mobile Equipment Identity (IMEI), the 15-digit number that uniquely identifies the mobile device hardware.\n\nOnly applicable for eSIM.\n",
                "example": "356938035643809"
              },
              "iccid": {
                "x-pii": "KIND_SIM_ID",
                "type": "string",
                "description": "Integrated Circuit Card Identifier (ICCID), the 19-20 digit serial number that uniquely identifies the SIM card (or eSIM profile) in use.",
                "example": "8901240197155182976"
              }
            }
          },
          "pendingMsisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "object",
            "required": [
              "msisdn"
            ],
            "description": "A phone number change that has been requested but not yet applied. Present only while a number change is scheduled; the current number remains in `msisdn` until the change takes effect.",
            "properties": {
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "The phone number the subscription will switch to when the scheduled change takes effect, in E.164 format.",
                "example": "+15559876543"
              },
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending number change is scheduled to occur.",
                "example": "2024-02-01"
              }
            }
          },
          "tempNumber": {
            "type": "boolean",
            "description": "True when the subscription uses a temporary number until its port-in completes. The `msisdn` is then the temporary number, and `porting` gives the number that ports in.\n",
            "example": false
          },
          "forwardToMsisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "string",
            "format": "phone",
            "description": "The phone number that a vanity-number forward subscription forwards its calls to, in E.164 format.\n\nPresent only when the `type` is `VANITY_NUMBER_FORWARD` and the forward number is in E.164 format.\n",
            "example": "+15559876543"
          },
          "barReasons": {
            "type": "array",
            "uniqueItems": true,
            "description": "The reasons of the bars that keep a `BLOCKED` subscription blocked. A subscription can have more than one bar, and it stays\nblocked until every bar is removed. Present only while the status is `BLOCKED`.\n",
            "items": {
              "$ref": "#/components/schemas/BarReason"
            }
          },
          "pendingStatus": {
            "type": "object",
            "required": [
              "status"
            ],
            "description": "A status change that has been requested but not yet applied, for example a scheduled cancellation or pause. Present only while a status change is scheduled.",
            "properties": {
              "status": {
                "$ref": "#/components/schemas/SubscriptionStatus"
              },
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending status change is scheduled to occur.",
                "example": "2024-02-01"
              }
            }
          },
          "pendingProductOffering": {
            "type": "object",
            "description": "A product offering change (upgrade or downgrade) that has been requested but not yet applied. Present only while a change is scheduled; the current offering remains in `productOffering` until the scheduled date.",
            "required": [
              "scheduledAt",
              "product"
            ],
            "properties": {
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending product offering change is scheduled to occur.",
                "example": "2024-02-01"
              },
              "product": {
                "$ref": "#/components/schemas/EmbeddedProductOffering"
              }
            }
          },
          "porting": {
            "$ref": "#/components/schemas/EmbeddedPorting"
          },
          "activatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was activated. Absent until the subscription has been activated.",
            "example": "2024-01-15T10:30:00Z"
          },
          "renewsAt": {
            "type": "string",
            "format": "date",
            "description": "The next date on which the subscription renews. A new billing period starts on this date.\n\nAbsent when the status is not `ACTIVATED`, or when the subscription has no renewal day.\n",
            "example": "2024-02-15"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was canceled (if applicable).",
            "example": "2024-06-30T00:00:00Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was created.",
            "example": "2024-01-10T08:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was last updated.",
            "example": "2024-01-15T10:30:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "PortingDetailsUS": {
        "title": "USPortingDetails",
        "type": "object",
        "description": "Information required to port a US phone number. Provide firstName, lastName, and address in the\ninitial request; accountNumber and passcode (often called a Number Transfer PIN) may be omitted at\nfirst but must be supplied before the port can be activated. US carriers validate a transfer\nagainst the losing carrier's account records, and mismatches are the most common cause of rejected\nports, so these values must match the losing carrier's records exactly.\n",
        "required": [
          "firstName",
          "lastName",
          "address"
        ],
        "properties": {
          "accountNumber": {
            "type": "string",
            "description": "The account number with the current provider.\n\nIf not provided here, must be provided in the future for activation on-demand.\n",
            "example": "987654321"
          },
          "passcode": {
            "type": "string",
            "description": "The passcode or PIN associated with the account at the current provider, often called a\nNumber Transfer PIN or port-out PIN. Most US carriers require the account holder to generate\nthis in their account settings before the number can be released.\n\nIf not provided here, must be provided in the future for activation on-demand.\n",
            "example": "123456"
          },
          "firstName": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "The first name of the account holder at the current provider.",
            "example": "John"
          },
          "lastName": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "The last name of the account holder at the current provider.",
            "example": "Doe"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address that the current provider holds for the account holder. The provider compares it with its own record before it releases the number."
          }
        }
      },
      "PortingDetailsSweden": {
        "title": "SwedishPortingDetails",
        "type": "object",
        "description": "Information required to port a Swedish phone number. Swedish carriers approve a transfer based on\nthe national identity number of the number's current owner, so no account number or PIN is needed.\n",
        "required": [
          "identity"
        ],
        "properties": {
          "identity": {
            "x-pii": "KIND_NATIONAL_ID_NUMBER",
            "type": "string",
            "description": "The identity of the number's current owner as registered with the losing carrier: a Swedish\npersonal identity number (personnummer) for individuals, or a company registration number\n(organisationsnummer) for businesses. The transfer is rejected if this does not match the\nlosing carrier's records.\n",
            "example": "199001011234"
          }
        }
      },
      "PortingDetails": {
        "description": "Ownership and account information the carriers need to approve a number transfer. The required\ninformation varies by country: provide US details for US numbers and Swedish details for Swedish numbers.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PortingDetailsUS"
          },
          {
            "$ref": "#/components/schemas/PortingDetailsSweden"
          }
        ]
      },
      "SubscriptionActivation": {
        "type": "object",
        "description": "Configuration and details required to activate a subscription in the telecommunications network.\n\nThis includes the phone number (MSISDN), SIM card details, and optional number porting information.\nAll subscriptions require this activation data before they can be used for telecommunications services.\n",
        "additionalProperties": false,
        "required": [
          "sim"
        ],
        "properties": {
          "msisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "string",
            "description": "The phone number for this subscription.\n\n- Leave empty to have a number automatically assigned from the available pool\n- Provide a specific number when using a leased number from the number pool\n- Provide the number to be ported when transferring from another carrier\n",
            "example": "+15551234567"
          },
          "leaseToken": {
            "type": "string",
            "description": "Token received when leasing a number from the available number pool.\n\nRequired only when providing a specific msisdn that was leased from the number pool.\nNot needed for auto-assigned numbers or ported numbers.\n",
            "example": "lease_abc123def456"
          },
          "porting": {
            "type": "object",
            "description": "Details required to port (transfer) an existing phone number from another carrier.\n\nProvide this when the subscriber wants to keep their existing phone number.\nThe porting process may take several days depending on the carrier and regulatory requirements.\n",
            "required": [
              "details"
            ],
            "properties": {
              "details": {
                "$ref": "#/components/schemas/PortingDetails"
              }
            }
          },
          "sim": {
            "type": "object",
            "description": "SIM card technology and configuration for this subscription.",
            "required": [
              "esim"
            ],
            "additionalProperties": false,
            "properties": {
              "esim": {
                "type": "boolean",
                "description": "Whether this subscription uses eSIM (embedded SIM) technology.\n\n- true: Digital eSIM profile will be provisioned to the device\n- false: Physical SIM card will be used\n",
                "example": true
              },
              "iccid": {
                "x-pii": "KIND_SIM_ID",
                "type": "string",
                "description": "Integrated Circuit Card Identifier (ICCID) of an existing SIM card.\n\nProvide this when activating a subscription with a pre-existing physical SIM card.\nOnly applicable to certain networks that support BYO (Bring Your Own) SIM.\n",
                "example": "8931440400000000000"
              }
            }
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address a physical SIM card is posted to.\n\nAn eSIM subscription needs no delivery address. The address the\nsubscription is served at is separate, and a delivery address does not\nchange it.\n"
          }
        }
      },
      "CreateSubscriptionRequest": {
        "type": "object",
        "description": "Create a new subscription for a customer.\n\n**Activation Options:**\n1. **Immediate activation**: Provide activation data without scheduleActivationAt\n2. **Scheduled activation**: Provide activation data with scheduleActivationAt for future activation\n3. **Shell subscription**: Omit activation data to create a subscription that will be activated later\n\n**When to use shell subscriptions:**\n- When activation details are not yet available (e.g., waiting for SIM card delivery)\n- When activation requires additional approval or processing\n- When bulk-creating subscriptions for later activation\n\nNote: This endpoint is disabled when Seamless OS manages billing. In that case, subscriptions are created through orders.\n",
        "required": [
          "productOfferingId",
          "customerId",
          "subscriber"
        ],
        "additionalProperties": false,
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier for the product offering to subscribe to.\n\nThis controls what type of subscription is being created.\n",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "customerId": {
            "type": "string",
            "description": "The identifier of the existing customer who will own this subscription. Accepts\neither an internal UUID or an external referenceId previously assigned to the\ncustomer.\n",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "referenceId": {
            "type": "string",
            "description": "Optional reference ID to assign to the subscription. Must be unique per tenant.\nOnce set, this value can be used in place of the subscriptionId in path parameters\nand request bodies across the API.\n",
            "example": "crm-subscription-12345",
            "maxLength": 255
          },
          "activation": {
            "description": "Everything needed to bring the subscription online in the mobile network: the phone number\n(a specific number, a leased number, or empty for automatic assignment), the SIM configuration\n(eSIM or physical SIM), and optional porting details when the subscriber keeps their existing\nnumber from another carrier.\n\n**When to provide:**\n- Provide activation details to have the subscription provisioned in the network — immediately,\n  or on the date given in `scheduleActivationAt`\n- Omit to create a \"shell\" subscription that stays in PENDING status until you activate it later\n  via POST /subscriptions/{subscriptionId}/activate, for example when SIM or porting details are\n  not yet known\n",
            "allOf": [
              {
                "$ref": "#/components/schemas/SubscriptionActivation"
              },
              {
                "type": "object",
                "description": "Activation configuration for this subscription.\n\n**When to provide:**\n- Provide activation details to create an active subscription immediately or scheduled for the future\n- Omit to create a \"shell\" subscription that must be activated later via the activate endpoint\n\n**Use cases:**\n- **Immediate activation**: Provide activation data without scheduleActivationAt\n- **Scheduled activation**: Provide activation data with scheduleActivationAt set to a future date\n- **Deferred activation**: Omit activation data entirely - use the activate endpoint later when ready\n"
              }
            ]
          },
          "scheduleActivationAt": {
            "type": "string",
            "format": "date",
            "description": "Date when the subscription should be activated in the network.\n\nOnly applicable when activation data is provided. If omitted, activation will be immediate or as soon as network resources are available.\n\n**Note**: Network availability and porting timelines may affect the exact activation time. This date is a preference, not a guarantee.\n",
            "example": "2024-01-15"
          },
          "extensions": {
            "type": "object",
            "description": "Additional subscription extensions fields for custom subscription types.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "display": {
            "type": "string",
            "description": "Custom display name for the subscription. If not provided, will be auto-generated from msisdn.",
            "example": "John's work phone"
          },
          "subscriber": {
            "type": "object",
            "description": "Subscriber details for this subscription.",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The full name of the subscriber.",
                "example": "John Doe"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email address of the subscriber.",
                "example": "john.doe@example.com"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The address where the subscriber uses this subscription. In the US, this is the E911 address.\n\nGive it only when it is different from the billing address of the customer. The subscription then holds it as its service address. A subscription with no address of its own is served at the billing address.\n"
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              }
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "SubscriptionActionType": {
        "type": "string",
        "x-extensible-enum": true,
        "description": "The kind of recorded subscription action.\nThe list includes legacy values that can occur in historical records.\nA caller must tolerate new values.\n",
        "enum": [
          "UNKNOWN",
          "CREATE",
          "CREATE_WITH_PORT_IN",
          "CHANGE_PRODUCT",
          "CHANGE_SIM_CARD",
          "CHANGE_VANITY_NUMBER_FORWARD",
          "CHANGE_MSISDN",
          "CHANGE_MSISDN_WITH_PORT_IN",
          "GET_NEW_MSISDN",
          "CHANGE_RATE_PLAN",
          "PAUSE",
          "SUSPEND",
          "BAR",
          "RESTORE",
          "CANCEL",
          "RESET_NETWORK",
          "ENABLE_ADDON",
          "CANCEL_ADDON",
          "CHANGE_ADDON_PRODUCT",
          "EXPIRE_ADDON",
          "MOVED_FROM_ANOTHER_CUSTOMER",
          "CANCEL_DEVICE_LOCATION",
          "RESET_VOICEMAIL_PASSWORD",
          "UPDATE_ROAMING_LIMIT",
          "ENABLE_VOWIFI",
          "RESEND_ESIM_QR_CODE",
          "RECONNECT",
          "PORT_BACK",
          "PORT_OUT",
          "CHANGE_E911_ADDRESS",
          "TOPUP",
          "MOVE_TO_ANOTHER_CUSTOMER",
          "OPEN_FOR_OUTPORTING",
          "ADD_CONTRACT_PERIOD",
          "LEGACY_UPDATE"
        ],
        "example": "ENABLE_VOWIFI"
      },
      "SubscriptionActionStatus": {
        "type": "string",
        "x-extensible-enum": true,
        "description": "The recorded execution state of an action.\nUNKNOWN means that the state is not known.\nPENDING waits for execution. RUNNING is in progress.\nSUCCESS and FAILURE describe the result of execution.\nA caller must tolerate new values.\n",
        "enum": [
          "UNKNOWN",
          "PENDING",
          "RUNNING",
          "SUCCESS",
          "FAILURE"
        ],
        "example": "PENDING"
      },
      "SubscriptionActionScheduleMode": {
        "type": "string",
        "x-extensible-enum": true,
        "description": "How the action is scheduled.\nUNKNOWN means that the schedule mode is not known.\nIMMEDIATE starts execution at once.\nAT_SPECIFIED_DATE and AT_SPECIFIED_DATE_TIME target a specified date or time.\nON_DEMAND starts execution on demand.\nA caller must tolerate new values.\n",
        "enum": [
          "UNKNOWN",
          "IMMEDIATE",
          "AT_SPECIFIED_DATE",
          "AT_SPECIFIED_DATE_TIME",
          "ON_DEMAND"
        ],
        "example": "ON_DEMAND"
      },
      "SubscriptionAction": {
        "type": "object",
        "description": "A subscription operation and its execution state. Action payloads and internal task details are not exposed.",
        "required": [
          "actionId",
          "subscriptionId",
          "customerId",
          "type",
          "status",
          "scheduleMode",
          "applyAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "actionId": {
            "type": "string",
            "description": "Unique identifier for this action."
          },
          "subscriptionId": {
            "type": "string",
            "description": "Subscription affected by this action."
          },
          "customerId": {
            "type": "string",
            "description": "Customer that owns the subscription."
          },
          "type": {
            "$ref": "#/components/schemas/SubscriptionActionType"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionActionStatus"
          },
          "scheduleMode": {
            "$ref": "#/components/schemas/SubscriptionActionScheduleMode"
          },
          "applyAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the operation is scheduled to take effect."
          },
          "executionStartedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When execution began, if it has started."
          },
          "executionFinishedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When execution ended, if it has finished."
          },
          "failureReason": {
            "type": "string",
            "description": "Names the condition that failed the action, in lower snake_case. The values are the same as\nthe `reason` of an error response. For example, `invalid_e911_address` means that the network\noperator refused the service address as an E911 address. Only an action with the status\n`FAILURE` has this field, and such an action can also fail without a reason. Your client must\naccept a reason that it does not know.\n",
            "example": "invalid_e911_address"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the action was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the action was most recently updated."
          }
        }
      },
      "UpdateSubscriptionRequest": {
        "type": "object",
        "description": "The fields of a subscription to change. A field that the request leaves out stays as it is. A request with no field changes nothing.\n",
        "additionalProperties": false,
        "properties": {
          "serviceAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "The address where the subscriber uses this subscription. In the US, this is the E911 address that emergency services get for the phone number.\n\nAn address that is equal to the billing address of the customer removes the address that the subscription holds. The subscription then takes the billing address.\n\nFor an activated subscription, the platform sends the address to the network operator first. `serviceAddress` on the subscription shows the new address after the operator accepts it.\n"
          }
        }
      },
      "SubscriptionActionOption": {
        "type": "object",
        "description": "An action that the caller can start on the subscription with `startSubscriptionAction`, and the\nanswer that the action gets now.\n",
        "required": [
          "type",
          "available"
        ],
        "properties": {
          "type": {
            "type": "string",
            "x-extensible-enum": true,
            "description": "The `type` to send to `startSubscriptionAction`. A caller must tolerate new values.\n",
            "enum": [
              "PAUSE",
              "RESTORE",
              "CANCEL",
              "BLOCK_SIM",
              "RESET_NETWORK",
              "ACTIVATE"
            ],
            "example": "PAUSE"
          },
          "available": {
            "type": "boolean",
            "description": "True when `startSubscriptionAction` accepts the action now. False when the state of the\nsubscription refuses it now. Then `refusalReason` gives the cause.\n",
            "example": true
          },
          "refusalReason": {
            "type": "string",
            "description": "The `reason` of the error that `startSubscriptionAction` gives for the action now. It is\npresent only when `available` is false.\n",
            "example": "subscription_in_binding_period"
          },
          "scheduleMode": {
            "$ref": "#/components/schemas/SubscriptionActionScheduleMode"
          },
          "effectiveDate": {
            "type": "string",
            "format": "date",
            "description": "The date that the action gets when the request names no date. It is absent when the action is\nrefused, or when the request must name the date.\n",
            "example": "2026-12-01"
          }
        }
      },
      "PauseActionRequest": {
        "type": "object",
        "title": "PauseAction",
        "description": "Pause the subscription. The customer stops paying and the service stops.",
        "required": [
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The action to start.",
            "enum": [
              "PAUSE"
            ]
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The first date of the pause. If it is absent, the pause starts at once.",
            "example": "2026-12-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "RestoreActionRequest": {
        "type": "object",
        "title": "RestoreAction",
        "description": "Restore a paused, suspended or blocked subscription to the activated status.",
        "required": [
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The action to start.",
            "enum": [
              "RESTORE"
            ]
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The date of the restore. If it is absent, the restore occurs today.",
            "example": "2026-12-01"
          },
          "allowedCurrentStatuses": {
            "type": "array",
            "uniqueItems": true,
            "description": "The statuses that the restore can start from. If it is absent, the restore can start from each\nstatus that a restore supports.\n",
            "items": {
              "$ref": "#/components/schemas/SubscriptionStatus"
            }
          },
          "barReasons": {
            "type": "array",
            "uniqueItems": true,
            "minItems": 1,
            "description": "The reasons of the bars to remove from a `BLOCKED` subscription. If it is absent, the restore\nremoves each bar. The subscription is activated only when no bar stays.\n",
            "items": {
              "$ref": "#/components/schemas/BarReason"
            }
          }
        }
      },
      "CancelActionRequest": {
        "type": "object",
        "title": "CancelAction",
        "description": "Cancel the subscription on a date.",
        "required": [
          "type",
          "cancelAt"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The action to start.",
            "enum": [
              "CANCEL"
            ]
          },
          "cancelAt": {
            "description": "The date of the cancel.",
            "oneOf": [
              {
                "type": "object",
                "title": "CancelActionAtNextDay",
                "required": [
                  "nextDay"
                ],
                "additionalProperties": false,
                "properties": {
                  "nextDay": {
                    "type": "boolean",
                    "description": "Cancel the subscription on the next day.",
                    "example": true
                  }
                }
              },
              {
                "type": "object",
                "title": "CancelActionAtNextMonth",
                "required": [
                  "nextMonth"
                ],
                "additionalProperties": false,
                "properties": {
                  "nextMonth": {
                    "type": "boolean",
                    "description": "Cancel the subscription on the first day of the next month.",
                    "example": true
                  }
                }
              },
              {
                "type": "object",
                "title": "CancelActionAtDate",
                "required": [
                  "date"
                ],
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Cancel the subscription on this date.",
                    "example": "2026-12-01"
                  }
                }
              }
            ]
          },
          "churn": {
            "type": "string",
            "description": "The reason for the cancel. We use it for reports and analysis.\n\nIf you give `OTHER`, you must also give a comment.\n",
            "enum": [
              "BETTER_DEAL_PRICE",
              "NOT_HAPPY_MISSING_FUNCTIONS",
              "NOT_HAPPY_COVERAGE_SLA",
              "NOT_HAPPY_COMPLEX_ADMIN",
              "NOT_HAPPY_SUPPORT_ENGAGEMENT",
              "FRAUD",
              "FRAUD_ATTEMPT",
              "TEST_OR_MARKETING",
              "NO_NEED",
              "WRONG_ORDER",
              "OTHER"
            ]
          },
          "comment": {
            "type": "string",
            "description": "A comment about the cancel. It is necessary when `churn` is `OTHER`.",
            "example": "Moving abroad"
          }
        }
      },
      "BlockSimActionRequest": {
        "type": "object",
        "title": "BlockSimAction",
        "description": "Block the SIM card at once, so it can no longer use the network. Use it when the SIM card is lost or\nstolen. Only a new SIM card brings the subscription back into service.\n",
        "required": [
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The action to start.",
            "enum": [
              "BLOCK_SIM"
            ]
          }
        }
      },
      "ResetNetworkActionRequest": {
        "type": "object",
        "title": "ResetNetworkAction",
        "description": "Reset the network services of an activated subscription at the network operator. The service can\nstop for a short time.\n",
        "required": [
          "type",
          "confirmed"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The action to start.",
            "enum": [
              "RESET_NETWORK"
            ]
          },
          "confirmed": {
            "type": "boolean",
            "description": "Must be true. It records that the user accepts a short stop of the service.",
            "example": true
          }
        }
      },
      "StartSubscriptionActionRequest": {
        "description": "The action to start on the subscription. The `type` decides the other fields.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PauseActionRequest"
          },
          {
            "$ref": "#/components/schemas/RestoreActionRequest"
          },
          {
            "$ref": "#/components/schemas/CancelActionRequest"
          },
          {
            "$ref": "#/components/schemas/BlockSimActionRequest"
          },
          {
            "$ref": "#/components/schemas/ResetNetworkActionRequest"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "PAUSE": "#/components/schemas/PauseActionRequest",
            "RESTORE": "#/components/schemas/RestoreActionRequest",
            "CANCEL": "#/components/schemas/CancelActionRequest",
            "BLOCK_SIM": "#/components/schemas/BlockSimActionRequest",
            "RESET_NETWORK": "#/components/schemas/ResetNetworkActionRequest"
          }
        }
      },
      "ActivateSubscriptionRequest": {
        "type": "object",
        "description": "Request to activate a pending subscription in the telecommunications network.\n\nUse this endpoint to activate subscriptions that were created as \"shells\" without initial activation data,\nor to activate subscriptions that are in a state where network activation is needed.\n\n**Activation timing:**\n- Omit scheduleActivationAt for immediate activation (or as soon as network resources are available)\n- Provide scheduleActivationAt to schedule activation for a future date\n",
        "additionalProperties": false,
        "required": [
          "activation"
        ],
        "properties": {
          "activation": {
            "$ref": "#/components/schemas/SubscriptionActivation",
            "description": "Complete activation configuration required to bring the subscription online in the network.\n\nThis includes the phone number assignment, SIM card details, and any number porting information.\n"
          },
          "scheduleActivationAt": {
            "type": "string",
            "format": "date",
            "description": "Date when the subscription should be scheduled for activation.\n\nIf not provided, activation will be immediate or as soon as possible based on network availability.\n\n**Note**: Network availability and porting timelines may affect exact timing. This date is considered\na preference, not a guarantee. The actual activation may occur on or after this date.\n",
            "example": "2025-01-01"
          }
        }
      },
      "PortInFailureCode": {
        "type": "string",
        "description": "The kind of failure. We add values when a network operator gives a more exact signal, so your\nclient must accept a value that it does not know.\n\n- `CORRECTION_REQUIRED`: the losing operator asks for corrected details, for example the account\n  number or the PIN. Correct the details, then create a new attempt. In the US the losing\n  operator keeps the request open, and the new attempt updates that request.\n- `REJECTED`: the losing operator refused the request.\n- `CANCELED`: the network operator or we canceled the request.\n- `TIMED_OUT`: the network operator did not answer in time.\n- `OTHER`: every other failure.\n",
        "enum": [
          "CORRECTION_REQUIRED",
          "REJECTED",
          "CANCELED",
          "TIMED_OUT",
          "OTHER"
        ],
        "example": "CORRECTION_REQUIRED"
      },
      "PortInFailure": {
        "type": "object",
        "description": "Why the port-in attempt failed. Present only when `status` is `FAILED`.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "$ref": "#/components/schemas/PortInFailureCode"
          },
          "message": {
            "type": "string",
            "description": "The reason that the network operator or our system gave, as text for a person.",
            "example": "The PIN does not match the records of the losing carrier."
          },
          "carrierCode": {
            "type": "string",
            "description": "The code that the network operator sent for the failure, exactly as it sent it.",
            "example": "PORTIN-8D"
          }
        }
      },
      "Porting": {
        "type": "object",
        "description": "A request to transfer (port) a phone number between carriers, either into this platform from the subscriber's previous carrier or out to another carrier. Tracks the number, the transfer's progress, and the ownership details required by the carriers involved.",
        "required": [
          "msisdn",
          "status",
          "direction",
          "details",
          "createdAt"
        ],
        "properties": {
          "msisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "string",
            "description": "The phone number to be ported, in E.164 format.",
            "example": "+15551234567"
          },
          "status": {
            "$ref": "#/components/schemas/PortingStatus"
          },
          "direction": {
            "$ref": "#/components/schemas/PortingDirection"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the porting is scheduled to occur.",
            "example": "2024-02-01"
          },
          "details": {
            "$ref": "#/components/schemas/PortingDetails"
          },
          "portInId": {
            "type": "string",
            "description": "The latest port-in attempt of the subscription. Read it with `GET /subscriptions/{subscriptionId}/port-ins/{portInId}`.",
            "example": "3f9a6c1e-2b7d-4c8e-9a1f-5d2e8b7c4a10"
          },
          "failure": {
            "$ref": "#/components/schemas/PortInFailure"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp of the last update to the porting request.",
            "example": "2024-01-20T09:00:00Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the porting request was created.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "UpdatePortingRequest": {
        "description": "Request to correct or complete the porting details of a subscription's in-progress port-in,\nfor example after the losing carrier rejected the transfer because the owner details did not match.\n",
        "type": "object",
        "required": [
          "details"
        ],
        "properties": {
          "details": {
            "$ref": "#/components/schemas/PortingDetails"
          }
        }
      },
      "PortInStatus": {
        "type": "string",
        "description": "What you can do with a port-in attempt. We can add values, so your client must accept a value\nthat it does not know.\n\n- `PENDING`: the attempt did not start. You can change or cancel it until `changeableUntil`.\n- `IN_PROGRESS`: the attempt runs. You cannot change or cancel it.\n- `COMPLETED`: the number is ported. The subscription uses it.\n- `FAILED`: the port did not occur. `failure` tells you why. To try again, create a new attempt.\n- `CANCELED`: the attempt was canceled. To try again, create a new attempt.\n",
        "enum": [
          "PENDING",
          "IN_PROGRESS",
          "COMPLETED",
          "FAILED",
          "CANCELED"
        ],
        "example": "PENDING"
      },
      "PortInType": {
        "type": "string",
        "description": "What the port does to the subscription. We can add values, so your client must accept a value\nthat it does not know.\n\n- `ACTIVATION`: the port activates a pending subscription with the number.\n- `NUMBER_CHANGE`: the number replaces the number of an active subscription.\n",
        "enum": [
          "ACTIVATION",
          "NUMBER_CHANGE"
        ],
        "example": "NUMBER_CHANGE"
      },
      "PortingCountry": {
        "type": "string",
        "description": "The country of the number, as an ISO 3166-1 alpha-2 code. The country names the block of\n`details` and `progress` that is present. We add countries, so your client must accept a value\nthat it does not know. For an unknown country, use only the fields that are the same for every\ncountry.\n",
        "enum": [
          "SE",
          "US"
        ],
        "example": "US"
      },
      "PortInDetailsUS": {
        "type": "object",
        "description": "The account holder at the losing carrier. The API never returns the account number or the PIN.\n`accountNumberProvided` and `passcodeProvided` tell you if we have them.\n",
        "required": [
          "firstName",
          "lastName",
          "accountNumberProvided",
          "passcodeProvided"
        ],
        "properties": {
          "firstName": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "The first name of the account holder at the losing carrier.",
            "example": "John"
          },
          "lastName": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "The last name of the account holder at the losing carrier.",
            "example": "Doe"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address that the losing carrier holds for the account holder."
          },
          "accountNumberProvided": {
            "type": "boolean",
            "description": "True when we have the account number at the losing carrier.",
            "example": true
          },
          "passcodeProvided": {
            "type": "boolean",
            "description": "True when we have the PIN of the account at the losing carrier.",
            "example": false
          }
        }
      },
      "PortInDetails": {
        "type": "object",
        "description": "The data that the network operators need to approve the port. Only the block of the country in\n`country` is present.\n",
        "properties": {
          "se": {
            "$ref": "#/components/schemas/PortingDetailsSweden"
          },
          "us": {
            "$ref": "#/components/schemas/PortInDetailsUS"
          }
        }
      },
      "SwedishPortInStage": {
        "type": "string",
        "description": "The stage of a Swedish port. We can add values, so your client must accept a value that it does\nnot know.\n\n- `NOT_SENT`: we did not send the request to the donor operator yet.\n- `AWAITING_DONOR`: the donor operator did not answer yet. It answers in at most 2 working days.\n- `ACCEPTED`: the donor operator accepted the request. The port occurs at `portingAt`.\n- `PORTING`: the port occurs now. You cannot change it.\n- `PORTED`: the number is ported.\n- `ENDED`: the attempt failed or was canceled. `failure` tells you why.\n",
        "enum": [
          "NOT_SENT",
          "AWAITING_DONOR",
          "ACCEPTED",
          "PORTING",
          "PORTED",
          "ENDED"
        ],
        "example": "ACCEPTED"
      },
      "SwedishPortInProgress": {
        "type": "object",
        "description": "The progress of a Swedish port. We send the request before the port date. The donor operator then\naccepts or rejects it, and the port occurs between 03:00 and 04:00 on the agreed day.\n",
        "required": [
          "stage"
        ],
        "properties": {
          "stage": {
            "$ref": "#/components/schemas/SwedishPortInStage"
          },
          "donorOperator": {
            "type": "string",
            "description": "The name of the operator that has the number now.",
            "example": "Telia"
          },
          "portingAt": {
            "type": "string",
            "format": "date-time",
            "description": "The moment of the port that the donor operator agreed to.",
            "example": "2026-11-20T03:00:00+01:00"
          }
        }
      },
      "USPortInStage": {
        "type": "string",
        "description": "The stage of a US port. We can add values, so your client must accept a value that it does not\nknow.\n\n- `NOT_SENT`: we did not send the request to the carrier yet.\n- `SUBMITTED`: the carrier has the request.\n- `PORTED`: the number is ported.\n- `ENDED`: the attempt failed or was canceled. `failure` tells you why.\n",
        "enum": [
          "NOT_SENT",
          "SUBMITTED",
          "PORTED",
          "ENDED"
        ],
        "example": "SUBMITTED"
      },
      "USPortInProgress": {
        "type": "object",
        "description": "The progress of a US port. We send the request when the attempt starts. The carrier then ports the\nnumber in minutes to days. If the carrier asks for a correction, the attempt fails, and you create\na new attempt with the corrected details.\n",
        "required": [
          "stage"
        ],
        "properties": {
          "stage": {
            "$ref": "#/components/schemas/USPortInStage"
          },
          "portOrderNumber": {
            "type": "string",
            "description": "The port order number (PON) that the carrier gave the request. The attempts that correct one\nrequest share it. Not every carrier gives one.\n",
            "example": "PON-7731042"
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "description": "The date when the carrier expects to complete the port.",
            "example": "2026-11-06"
          },
          "losingCarrier": {
            "type": "string",
            "description": "The name of the carrier that has the number now.",
            "example": "Verizon"
          }
        }
      },
      "PortInProgress": {
        "type": "object",
        "description": "Where the request is at the network operator. Each country has its own stages. Only the block of\nthe country in `country` is present.\n",
        "properties": {
          "se": {
            "$ref": "#/components/schemas/SwedishPortInProgress"
          },
          "us": {
            "$ref": "#/components/schemas/USPortInProgress"
          }
        }
      },
      "PortIn": {
        "type": "object",
        "description": "One attempt to port a number into a subscription. A new attempt replaces an attempt that failed or\nthat you canceled. `status` tells you what you can do with the attempt. `progress` tells you where\nthe request is at the network operator, with the stages of the country in `country`.\n",
        "required": [
          "portInId",
          "subscriptionId",
          "customerId",
          "type",
          "country",
          "msisdn",
          "status",
          "details",
          "progress",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "portInId": {
            "type": "string",
            "description": "The identifier of the attempt.",
            "example": "3f9a6c1e-2b7d-4c8e-9a1f-5d2e8b7c4a10"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription that gets the number.",
            "example": "9b1e4f2a-6c3d-4e8b-a7f9-2d5c1b8e3a64"
          },
          "customerId": {
            "type": "string",
            "description": "The customer that owns the subscription.",
            "example": "51c2a8e4-7f3b-4d9a-8e6c-1b2f4a7d9e05"
          },
          "type": {
            "$ref": "#/components/schemas/PortInType"
          },
          "country": {
            "$ref": "#/components/schemas/PortingCountry"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The number to port in, in E.164 format.",
            "example": "+12125550123"
          },
          "status": {
            "$ref": "#/components/schemas/PortInStatus"
          },
          "requestedDate": {
            "type": "string",
            "format": "date",
            "description": "The date that you asked for. In Sweden it is the date of the port. In the US it is the date\nwhen we send the request to the network operator. Absent when the attempt waits for an\nactivation on demand.\n",
            "example": "2026-11-20"
          },
          "scheduledDate": {
            "type": "string",
            "format": "date",
            "description": "The date of the port that the network operator confirmed. Absent until the operator confirms a date.",
            "example": "2026-11-20"
          },
          "details": {
            "$ref": "#/components/schemas/PortInDetails"
          },
          "progress": {
            "$ref": "#/components/schemas/PortInProgress"
          },
          "changeableUntil": {
            "type": "string",
            "format": "date-time",
            "description": "The last moment when you can change or cancel the attempt. Present only when `status` is\n`PENDING`, and absent when the attempt waits for an activation on demand.\n",
            "example": "2026-11-19T03:00:00+01:00"
          },
          "failure": {
            "$ref": "#/components/schemas/PortInFailure"
          },
          "previousPortInId": {
            "type": "string",
            "description": "The attempt of the same subscription that came directly before this attempt.",
            "example": "77e14b2c-9d3a-4f6e-8b1c-3a5d7e9f2c48"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt became `COMPLETED`, `FAILED` or `CANCELED`.",
            "example": "2026-11-05T14:02:11Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt was created.",
            "example": "2026-11-03T09:12:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt changed for the last time.",
            "example": "2026-11-03T09:12:00Z"
          }
        }
      },
      "SwedishPortInDetailsChange": {
        "type": "object",
        "description": "The owner of a Swedish number.",
        "additionalProperties": false,
        "properties": {
          "identity": {
            "x-pii": "KIND_NATIONAL_ID_NUMBER",
            "type": "string",
            "description": "The identity of the owner of the number at the donor operator: a personal identity number\n(personnummer) for a person, or a company registration number (organisationsnummer) for a\ncompany. The donor operator rejects the request if the identity does not match its records.\n",
            "example": "199001011234"
          }
        }
      },
      "USPortInDetailsChange": {
        "type": "object",
        "description": "The account holder at the losing carrier. The values must match the records of the losing carrier\nexactly. A mismatch is the most frequent cause of a rejected port. You can give the account number\nand the PIN later, but they must be present before the attempt starts.\n",
        "additionalProperties": false,
        "properties": {
          "firstName": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "The first name of the account holder at the losing carrier.",
            "example": "John"
          },
          "lastName": {
            "x-pii": "KIND_PERSON_NAME",
            "type": "string",
            "description": "The last name of the account holder at the losing carrier.",
            "example": "Doe"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address that the losing carrier holds for the account holder."
          },
          "accountNumber": {
            "x-pii": "KIND_AUTH_TOKEN",
            "type": "string",
            "description": "The account number at the losing carrier.",
            "example": "987654321"
          },
          "passcode": {
            "x-pii": "KIND_AUTH_TOKEN",
            "type": "string",
            "description": "The PIN of the account at the losing carrier, often called a Number Transfer PIN.",
            "example": "123456"
          }
        }
      },
      "PortInDetailsChange": {
        "type": "object",
        "description": "The porting details to set. Give the block of the country of the number. A field that you give\nreplaces the stored value. A field that you leave out keeps the stored value.\n",
        "additionalProperties": false,
        "properties": {
          "se": {
            "$ref": "#/components/schemas/SwedishPortInDetailsChange"
          },
          "us": {
            "$ref": "#/components/schemas/USPortInDetailsChange"
          }
        }
      },
      "CreatePortInRequest": {
        "type": "object",
        "description": "A new port-in attempt. The API copies the number and the details of the latest attempt of the\nsubscription. A field that you give replaces the copied value. If the subscription has no earlier\nattempt, `msisdn` and every required field of `details` are necessary.\n",
        "additionalProperties": false,
        "properties": {
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The number to port in, in E.164 format.",
            "example": "+12125550123"
          },
          "details": {
            "$ref": "#/components/schemas/PortInDetailsChange"
          },
          "requestedDate": {
            "type": "string",
            "format": "date",
            "description": "In Sweden, the date of the port. In the US, the date when we send the request to the carrier.\nIf you leave it out, the date is today. It must not be in the past.\n",
            "example": "2026-11-20"
          }
        }
      },
      "ChangePortInDetailsRequest": {
        "type": "object",
        "description": "New porting details for a pending port-in attempt.",
        "additionalProperties": false,
        "required": [
          "details"
        ],
        "properties": {
          "details": {
            "$ref": "#/components/schemas/PortInDetailsChange"
          }
        }
      },
      "ChangePortInRequestedDateRequest": {
        "type": "object",
        "description": "A new date for a pending port-in attempt.",
        "additionalProperties": false,
        "required": [
          "requestedDate"
        ],
        "properties": {
          "requestedDate": {
            "type": "string",
            "format": "date",
            "description": "In Sweden, the date of the port. In the US, the date when we send the request to the carrier.\nIt must not be in the past.\n",
            "example": "2026-11-27"
          }
        }
      },
      "ChangeSubscriptionProductOfferingRequest": {
        "type": "object",
        "description": "Request to change the product offering of a subscription.",
        "required": [
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier of the new product offering. Use the product-offering-options endpoint to discover which offerings the subscription can be changed to.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Earliest date to perform the change on. If the change schedule doesn't fit this date, the earliest date after this will be chosen.",
            "example": "2024-02-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "ProductOfferingChangeSchedule": {
        "type": "string",
        "description": "The schedule type for when a product offering change can take effect.\n\n- INSTANT: The change takes effect at once\n- FIRST_OF_NEXT_MONTH: The change takes effect on the first day of the next calendar month\n- NEXT_RENEWAL_DAY: The change takes effect on the next renewal date\n- NEXT_PAYMENT_DAY: The change takes effect on the next payment day, when the days already paid for run out\n- END_OF_PAID_PERIOD: The change takes effect the day after the current paid period ends\n- END_OF_BINDING_PERIOD: The change takes effect the day after the binding period ends\n",
        "enum": [
          "INSTANT",
          "FIRST_OF_NEXT_MONTH",
          "NEXT_RENEWAL_DAY",
          "NEXT_PAYMENT_DAY",
          "END_OF_PAID_PERIOD",
          "END_OF_BINDING_PERIOD"
        ]
      },
      "ProductOfferingOption": {
        "type": "object",
        "description": "A product offering option available for subscription changes with scheduling information.",
        "required": [
          "productOffering",
          "changeSchedule",
          "changeScheduleDate"
        ],
        "properties": {
          "productOffering": {
            "$ref": "#/components/schemas/EmbeddedProductOffering"
          },
          "changeSchedule": {
            "$ref": "#/components/schemas/ProductOfferingChangeSchedule"
          },
          "changeScheduleDate": {
            "type": "string",
            "format": "date",
            "description": "The date when the product offering change can take effect.",
            "example": "2024-02-01"
          }
        }
      },
      "SubscriptionAddonStatus": {
        "type": "string",
        "description": "The status of an add-on on a subscription.\n\n- PENDING: Add-on is scheduled but not yet active\n- ACTIVE: Add-on is currently active and billable\n- CANCELLED: Add-on has been canceled and is no longer active\n- EXPIRED: Add-on has expired and is no longer active\n",
        "enum": [
          "PENDING",
          "ACTIVE",
          "CANCELLED",
          "EXPIRED"
        ]
      },
      "LicenseStatus": {
        "type": "string",
        "description": "Current stage of the license lifecycle.\n\n- PENDING: Created but not yet activated\n- ACTIVE: Active and billable; the licensed feature is available\n- PAUSED: Temporarily stopped; the licensed feature is disabled\n- CANCELLED: Permanently terminated\n- BLOCKED: Disabled by the operator, typically for policy or payment reasons\n",
        "enum": [
          "PENDING",
          "ACTIVE",
          "PAUSED",
          "CANCELLED",
          "BLOCKED"
        ]
      },
      "LicenseType": {
        "type": "string",
        "description": "The kind of feature the license unlocks. Most types cover business telephony (PBX) features,\nsuch as `PBX_USER_LEVEL` (a PBX seat for one user), `PBX_SOFTPHONE` (softphone client),\n`PBX_ROUTE_IVR`, `PBX_ROUTE_GROUP`, `PBX_ROUTE_QUEUE`, and `PBX_ROUTE_VOICEMAIL` (call routing\nfeatures), plus `EXTERNAL_PRODUCT` for licenses tied to products outside the telecom platform.\n",
        "example": "PBX_USER_LEVEL"
      },
      "EmbeddedAssignedTo": {
        "type": "object",
        "description": "The entity that a license is assigned to, with the display information for it.\nA license is always assigned to a subscription.\n",
        "required": [
          "type",
          "subscriptionId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SUBSCRIPTION"
            ],
            "description": "The type of assignment"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier for the subscription",
            "example": "c9a4d8d4-24c0-4164-ac8d-c77c4103b786"
          },
          "subscriptionDisplay": {
            "type": "string",
            "description": "Display name for the subscription (typically the phone number)",
            "example": "+1 (555) 123-4567"
          }
        }
      },
      "EmbeddedLicense": {
        "type": "object",
        "description": "Essential license information without sensitive details.",
        "required": [
          "licenseId",
          "status",
          "productOffering",
          "assignedTo"
        ],
        "properties": {
          "licenseId": {
            "type": "string",
            "description": "The unique identifier for the license.",
            "example": "b3c4d5e6-f7a8-9012-3456-789012345678"
          },
          "status": {
            "$ref": "#/components/schemas/LicenseStatus"
          },
          "type": {
            "$ref": "#/components/schemas/LicenseType"
          },
          "productOffering": {
            "$ref": "#/components/schemas/EmbeddedProductOffering"
          },
          "assignedTo": {
            "$ref": "#/components/schemas/EmbeddedAssignedTo"
          },
          "customer": {
            "$ref": "#/components/schemas/EmbeddedCustomer"
          },
          "activatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the license was activated.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "SubscriptionAddon": {
        "type": "object",
        "description": "An add-on attached to a subscription, providing extra services or resources (for example additional data, roaming packages, or travel eSIM bundles) on top of the base plan.",
        "required": [
          "subscriptionAddonId",
          "subscriptionId",
          "status"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The unique identifier of the subscription add-on.",
            "example": "a47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription this add-on belongs to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "referenceId": {
            "type": "string",
            "description": "A reference identifier provided by API clients or upstream provider integrations\nto identify this subscription add-on in their own systems. Unique per tenant when\nset. Use this field to look up add-ons by your external identifier (for example a\nprovider-side package ID). Typically populated by a workflow once the add-on has\nbeen provisioned with the underlying network provider.\n",
            "example": "telna-package-12345",
            "maxLength": 255
          },
          "productOffering": {
            "$ref": "#/components/schemas/EmbeddedProductOffering"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionAddonStatus"
          },
          "group": {
            "$ref": "#/components/schemas/ProductOfferingGroup"
          },
          "license": {
            "$ref": "#/components/schemas/EmbeddedLicense"
          },
          "pendingStatus": {
            "type": "object",
            "description": "A status change that has been requested but not yet applied, for example a scheduled cancellation. Present only while a status change is scheduled.",
            "properties": {
              "status": {
                "$ref": "#/components/schemas/SubscriptionAddonStatus"
              },
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending status change is scheduled to occur.",
                "example": "2024-02-01"
              }
            }
          },
          "pendingProductOffering": {
            "type": "object",
            "description": "A product offering change (upgrade or downgrade) that has been requested for this add-on but not yet applied. Present only while a change is scheduled; the current offering remains in `productOffering` until the scheduled date.",
            "properties": {
              "productOffering": {
                "$ref": "#/components/schemas/EmbeddedProductOffering"
              },
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending product offering change is scheduled to occur.",
                "example": "2024-02-01"
              }
            }
          },
          "addedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on was added to the subscription.",
            "example": "2024-01-15T10:30:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on was last updated.",
            "example": "2024-01-20T09:00:00Z"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on was canceled (if applicable).",
            "example": "2024-06-30T00:00:00Z"
          },
          "expiredAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on expired (if applicable).",
            "example": "2024-07-15T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "AddAddonRequest": {
        "type": "object",
        "description": "Request to add an add-on to a subscription.",
        "required": [
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier of the add-on product offering to add. Use the addon-options endpoint to discover which add-ons are available for the subscription.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the add-on should be added. If not provided, the add-on will be added immediately or according to the default schedule.",
            "example": "2024-03-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CancelSubscriptionRequest": {
        "type": "object",
        "description": "Request to cancel a subscription.",
        "required": [
          "cancelAt"
        ],
        "additionalProperties": false,
        "properties": {
          "cancelAt": {
            "description": "When the subscription should be canceled.",
            "oneOf": [
              {
                "type": "object",
                "title": "CancelNextDay",
                "required": [
                  "nextDay"
                ],
                "additionalProperties": false,
                "properties": {
                  "nextDay": {
                    "type": "boolean",
                    "description": "Cancel the subscription the next day.",
                    "example": true
                  }
                }
              },
              {
                "type": "object",
                "title": "CancelAtBeginningOfNextMonth",
                "required": [
                  "nextMonth"
                ],
                "additionalProperties": false,
                "properties": {
                  "nextMonth": {
                    "type": "boolean",
                    "description": "Cancel the subscription at the beginning of next month.",
                    "example": true
                  }
                }
              },
              {
                "type": "object",
                "title": "CancelAtDate",
                "required": [
                  "date"
                ],
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Cancel the subscription on a specific date.",
                    "example": "2024-02-01"
                  }
                }
              }
            ]
          },
          "churn": {
            "type": "string",
            "description": "Standardized reason for the cancellation used for reporting and analysis.\n\nIf OTHER is provided, please also provide a comment.\n",
            "enum": [
              "BETTER_DEAL_PRICE",
              "NOT_HAPPY_MISSING_FUNCTIONS",
              "NOT_HAPPY_COVERAGE_SLA",
              "NOT_HAPPY_COMPLEX_ADMIN",
              "NOT_HAPPY_SUPPORT_ENGAGEMENT",
              "FRAUD",
              "FRAUD_ATTEMPT",
              "TEST_OR_MARKETING",
              "NO_NEED",
              "WRONG_ORDER",
              "OTHER"
            ]
          },
          "comment": {
            "type": "string",
            "description": "Optional comment about the cancellation.",
            "example": "Switching to a different provider"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "SuspendSubscriptionRequest": {
        "type": "object",
        "description": "Request to temporarily suspend a subscription. The customer continues to pay but service is disabled.",
        "additionalProperties": false,
        "properties": {
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Suspend the subscription on a specific date.",
            "example": "2024-02-01"
          },
          "reason": {
            "type": "string",
            "description": "Optional reason for the suspension.",
            "example": "Payment overdue"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "PauseSubscriptionRequest": {
        "type": "object",
        "description": "Request to pause a subscription. The customer stops paying and service is disabled.",
        "additionalProperties": false,
        "properties": {
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Earliest date to perform the pause on. If the pause schedule doesn't fit this date, the earliest date after this will be chosen.",
            "example": "2024-02-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "RestoreSubscriptionRequest": {
        "type": "object",
        "description": "Request to restore a suspended, paused, or blocked subscription back to active state.",
        "additionalProperties": false,
        "properties": {
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Restore the subscription on a specific date.",
            "example": "2024-02-01"
          },
          "allowedCurrentStatuses": {
            "type": "array",
            "uniqueItems": true,
            "description": "Current statuses from which this request can restore the subscription.\nIf omitted, the request can restore all supported statuses.\n",
            "items": {
              "$ref": "#/components/schemas/SubscriptionStatus"
            }
          },
          "barReasons": {
            "type": "array",
            "uniqueItems": true,
            "minItems": 1,
            "description": "The reasons of the bars to remove from a `BLOCKED` subscription. The `barReasons` field of the subscription lists them.\nThe subscription is activated only when no other bar stays. Otherwise it stays `BLOCKED` with the bars that stay.\nIf omitted, the request removes every bar. If the subscription has no bar with one of these reasons, the request fails with `412`.\n",
            "items": {
              "$ref": "#/components/schemas/BarReason"
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "USPortOutPin": {
        "type": "object",
        "description": "A PIN that a subscriber gives to a new carrier to move a US number away.",
        "required": [
          "pin",
          "expiresAt"
        ],
        "properties": {
          "pin": {
            "type": "string",
            "x-pii": "KIND_AUTH_TOKEN",
            "description": "The 6-digit port-out PIN. Treat it as a credential."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the PIN stops working."
          },
          "accountNumber": {
            "type": "string",
            "x-pii": "KIND_AUTH_TOKEN",
            "description": "The port-out account number of the subscriber. A new carrier needs it together with the PIN. Treat it as a credential. It is absent when the subscriber has no port-out account number."
          }
        }
      },
      "USPortOutProtection": {
        "type": "object",
        "description": "The port-out protection of a new number. During the protection period, a new carrier cannot port\nout the number, even with a valid PIN. Support can open the number for port-out before the period\nends.\n",
        "properties": {
          "portableFrom": {
            "type": "string",
            "format": "date",
            "description": "The first day that a new carrier can port out the number. It is absent when the subscription\nhas no activation date. Then only support can open the number for port-out.\n",
            "example": "2026-10-28"
          }
        }
      },
      "USPortOutPinState": {
        "type": "object",
        "description": "The US port-out state of a subscription.",
        "required": [
          "portable"
        ],
        "properties": {
          "portable": {
            "type": "boolean",
            "description": "False when the subscription cannot port out, for example during a binding period. The PIN is then hidden, and no PIN can be generated."
          },
          "activePin": {
            "$ref": "#/components/schemas/USPortOutPin",
            "description": "The active PIN. It is absent when the subscription has no active PIN."
          },
          "portOutProtection": {
            "$ref": "#/components/schemas/USPortOutProtection",
            "description": "Present while the number is in its port-out protection period after activation. The subscription can get a PIN in this period, but a port-out request with the PIN fails."
          }
        }
      },
      "ResetNetworkServicesRequest": {
        "type": "object",
        "description": "Confirms that the user approved a temporary interruption while network services are reset.",
        "additionalProperties": false,
        "required": [
          "confirmed"
        ],
        "properties": {
          "confirmed": {
            "type": "boolean",
            "description": "Must be true after the user explicitly approves the temporary service interruption.",
            "example": true
          }
        }
      },
      "ResetNetworkServicesResult": {
        "type": "object",
        "description": "Current state of a subscription network-services reset.",
        "required": [
          "subscriptionId",
          "networkProvider",
          "status",
          "outcome",
          "observedAt"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "Subscription whose network services are being reset."
          },
          "subscriptionActionId": {
            "type": "string",
            "description": "Identifier of the reset workflow action. Absent when the network provider is unsupported."
          },
          "networkProvider": {
            "type": "string",
            "description": "Network provider selected for this subscription."
          },
          "status": {
            "type": "string",
            "description": "Current workflow state.",
            "enum": [
              "PENDING",
              "RUNNING",
              "SUCCEEDED",
              "FAILED",
              "UNSUPPORTED"
            ]
          },
          "outcome": {
            "type": "string",
            "description": "Whether a reset was started or an existing recent reset was returned.",
            "enum": [
              "STARTED",
              "ALREADY_RUNNING",
              "RECENT_SUCCESS",
              "RECENT_FAILURE",
              "OPERATOR_UNSUPPORTED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the reset workflow action was created."
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When execution started, if it has started."
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When execution finished, if it has finished."
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this status was read."
          }
        }
      },
      "ChangeSubscriptionSimRequest": {
        "type": "object",
        "description": "Request to change the SIM card (ICC/ICCID) for a subscription.",
        "required": [
          "icc",
          "simCardType"
        ],
        "additionalProperties": false,
        "properties": {
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Change the SIM card on a specific date.",
            "example": "2024-02-01"
          },
          "icc": {
            "x-pii": "KIND_SIM_ID",
            "type": "string",
            "description": "The ICCID (Integrated Circuit Card Identifier) of the new SIM card — the 19-20 digit serial number printed on the SIM or embedded in the eSIM profile.",
            "example": "89012345678901234567"
          },
          "simCardType": {
            "type": "string",
            "description": "The type of SIM card being installed.",
            "enum": [
              "PHYSICAL",
              "ESIM"
            ],
            "example": "PHYSICAL"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CancelAddonRequest": {
        "type": "object",
        "description": "Request to cancel an add-on from a subscription.",
        "required": [
          "subscriptionAddonId"
        ],
        "additionalProperties": false,
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The identifier of the subscription add-on to cancel. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_telna-package-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n",
            "example": "a47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the add-on should be canceled. If not provided, the add-on will be canceled immediately or according to the default schedule.",
            "example": "2024-03-01"
          },
          "reason": {
            "type": "string",
            "description": "Free-text explanation of why the add-on is being canceled. Stored with the cancellation for audit and reporting; not shown to the subscriber.",
            "example": "No longer needed"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "ChangeAddonRequest": {
        "type": "object",
        "description": "Request to change an existing add-on to a different product offering.",
        "required": [
          "subscriptionAddonId",
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The identifier of the subscription add-on to change. May be the entity's internal UUID or an external reference identifier.\nReference identifiers MUST be prefixed with `rid_` (e.g., `rid_telna-package-12345`) so the API\ncan distinguish them from internal UUIDs. The prefix is stripped before lookup.\n",
            "example": "a47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier of the new add-on product offering to change to.",
            "example": "addon-data-5gb"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Earliest date to perform the change on. If the change schedule doesn't fit this date, the earliest date after this will be chosen.",
            "example": "2024-02-01"
          },
          "reason": {
            "type": "string",
            "description": "Free-text explanation of why the add-on is being changed. Stored with the change for audit and reporting; not shown to the subscriber.",
            "example": "Customer upgrade request"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsagePackageStatus": {
        "type": "string",
        "description": "Whether a usage package is currently consumable.\n\n- ACTIVE: The package is in its validity window and usage draws from it\n- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet\n- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable\n",
        "enum": [
          "ACTIVE",
          "NOT_ACTIVE",
          "EXPIRED"
        ]
      },
      "UsageVoicePackage": {
        "type": "object",
        "description": "A single voice allowance bucket — either the base plan's included calling allowance or one granted by an add-on — reporting how much call time has been used and how much remains, in seconds.",
        "required": [
          "name",
          "callSeconds",
          "callCount",
          "callRemainingSeconds",
          "callTotalSeconds",
          "status"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name of the package, as shown to end users.",
            "example": "Unlimited National"
          },
          "callSeconds": {
            "type": "integer",
            "format": "int64",
            "description": "Call time consumed from this allowance so far, in seconds.",
            "example": 3600
          },
          "callCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of calls placed against this allowance.",
            "example": 15
          },
          "callRemainingSeconds": {
            "type": "integer",
            "format": "int64",
            "description": "Call time still available in this allowance, in seconds.",
            "example": 32400
          },
          "callTotalSeconds": {
            "type": "integer",
            "format": "int64",
            "description": "The full call time allowance of this package, in seconds.",
            "example": 36000
          },
          "status": {
            "$ref": "#/components/schemas/UsagePackageStatus",
            "description": "The status of this package."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period this allowance applies to.",
            "example": "2025-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.",
            "example": "2025-02-01T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsageVoiceIldPackage": {
        "type": "object",
        "description": "An international long distance (ILD) calling balance. Unlike national and roaming allowances, ILD calling is prepaid as a monetary amount that is drawn down per call, rather than a bucket of minutes.",
        "required": [
          "name"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The subscription add-on that granted this balance. Present only when the balance comes from an add-on.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name of the package, as shown to end users.",
            "example": "ILD Top-up"
          },
          "balanceMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Remaining prepaid amount available for international long distance calls, in minor units of the currency given by `currency`. Each ILD call deducts from this balance at the destination's per-minute rate.",
            "example": 1550
          },
          "currency": {
            "type": "string",
            "description": "Three-letter ISO 4217 code for the currency the balance is denominated in. Matches the subscription's billing currency.",
            "example": "USD"
          },
          "expiryDate": {
            "type": "string",
            "format": "date",
            "description": "The date the remaining balance expires and can no longer be used. Absent when the balance does not expire.",
            "example": "2025-12-31"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsageVoice": {
        "type": "object",
        "description": "Voice call usage for a subscription, split by where and to whom calls are made: national\n(domestic calls), roaming (calls made while abroad), and ILD (international long distance —\ncalls placed from the home country to foreign numbers).\n",
        "properties": {
          "callSeconds": {
            "type": "integer",
            "format": "int64",
            "description": "Call time in the current period across every scope, in seconds.",
            "example": 3600
          },
          "callCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of calls dialed in the current period across every scope.",
            "example": 15
          },
          "national": {
            "type": "array",
            "description": "Allowance buckets for calls made within the home country, including the base plan's voice allowance and any add-on packages.",
            "items": {
              "$ref": "#/components/schemas/UsageVoicePackage"
            }
          },
          "roaming": {
            "type": "array",
            "description": "Allowance buckets for calls made while roaming abroad.",
            "items": {
              "$ref": "#/components/schemas/UsageVoicePackage"
            }
          },
          "ild": {
            "type": "array",
            "description": "International long distance (ILD) balances for calls placed from the home country to foreign numbers. Tracked as a monetary balance rather than minutes.",
            "items": {
              "$ref": "#/components/schemas/UsageVoiceIldPackage"
            }
          }
        }
      },
      "UsageSmsPackage": {
        "type": "object",
        "description": "A single SMS allowance bucket — either the base plan's included message allowance or one granted by an add-on — reporting how many messages have been sent and how many remain.",
        "required": [
          "name",
          "smsCount",
          "smsRemaining",
          "smsTotal",
          "status"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name of the package, as shown to end users.",
            "example": "500 SMS National"
          },
          "smsCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of messages consumed from this allowance so far.",
            "example": 25
          },
          "smsRemaining": {
            "type": "integer",
            "format": "int64",
            "description": "Number of messages still available in this allowance.",
            "example": 475
          },
          "smsTotal": {
            "type": "integer",
            "format": "int64",
            "description": "The full message allowance of this package.",
            "example": 500
          },
          "status": {
            "$ref": "#/components/schemas/UsagePackageStatus",
            "description": "The status of this package."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period this allowance applies to.",
            "example": "2025-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.",
            "example": "2025-02-01T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsageSms": {
        "type": "object",
        "description": "SMS usage for a subscription, split by where and to whom messages are sent: national\n(domestic messages), roaming (messages sent while abroad), and ILD (international long\ndistance — messages sent from the home country to foreign numbers).\n",
        "properties": {
          "smsCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of messages sent in the current period across every scope.",
            "example": 25
          },
          "national": {
            "type": "array",
            "description": "Allowance buckets for messages sent within the home country, including the base plan's SMS allowance and any add-on packages.",
            "items": {
              "$ref": "#/components/schemas/UsageSmsPackage"
            }
          },
          "roaming": {
            "type": "array",
            "description": "Allowance buckets for messages sent while roaming abroad.",
            "items": {
              "$ref": "#/components/schemas/UsageSmsPackage"
            }
          },
          "ild": {
            "type": "array",
            "description": "Allowance buckets for messages sent from the home country to foreign numbers (international long distance).",
            "items": {
              "$ref": "#/components/schemas/UsageSmsPackage"
            }
          }
        }
      },
      "UsageMmsPackage": {
        "type": "object",
        "description": "A single MMS allowance bucket — either the base plan's included multimedia message allowance or one granted by an add-on — reporting how many messages have been sent and how many remain.",
        "required": [
          "name",
          "mmsCount",
          "mmsRemaining",
          "mmsTotal"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name of the package, as shown to end users.",
            "example": "100 MMS National"
          },
          "mmsCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of multimedia messages consumed from this allowance so far.",
            "example": 10
          },
          "mmsRemaining": {
            "type": "integer",
            "format": "int64",
            "description": "Number of multimedia messages still available in this allowance.",
            "example": 90
          },
          "mmsTotal": {
            "type": "integer",
            "format": "int64",
            "description": "The full multimedia message allowance of this package.",
            "example": 100
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period this allowance applies to.",
            "example": "2025-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.",
            "example": "2025-02-01T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsageMms": {
        "type": "object",
        "description": "MMS (multimedia message) usage for a subscription, split by where and to whom messages are\nsent: national (domestic messages), roaming (messages sent while abroad), and ILD (international\nlong distance — messages sent from the home country to foreign numbers).\n",
        "properties": {
          "national": {
            "type": "array",
            "description": "Allowance buckets for multimedia messages sent within the home country, including the base plan's MMS allowance and any add-on packages.",
            "items": {
              "$ref": "#/components/schemas/UsageMmsPackage"
            }
          },
          "roaming": {
            "type": "array",
            "description": "Allowance buckets for multimedia messages sent while roaming abroad.",
            "items": {
              "$ref": "#/components/schemas/UsageMmsPackage"
            }
          },
          "ild": {
            "type": "array",
            "description": "Allowance buckets for multimedia messages sent from the home country to foreign numbers (international long distance).",
            "items": {
              "$ref": "#/components/schemas/UsageMmsPackage"
            }
          }
        }
      },
      "UsageDataNationalPackage": {
        "type": "object",
        "description": "A single data allowance bucket for use in the home country — either the base plan's included data or a package granted by an add-on — reporting bytes used and remaining. Also carries the package's RLAH (Roam Like At Home) counters when part of the allowance can be used while roaming in RLAH regions (such as the EU/EEA) at no extra cost.",
        "required": [
          "name",
          "dataBytesUsed",
          "dataBytesRemaining",
          "dataBytesTotal",
          "status"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name of the package, as shown to end users.",
            "example": "10GB National"
          },
          "dataBytesUsed": {
            "type": "integer",
            "format": "int64",
            "description": "Data consumed from this allowance so far, in bytes.",
            "example": 3221225472
          },
          "dataBytesRemaining": {
            "type": "integer",
            "format": "int64",
            "description": "Data still available in this allowance, in bytes.",
            "example": 7516192768
          },
          "dataBytesTotal": {
            "type": "integer",
            "format": "int64",
            "description": "The full data allowance of this package, in bytes.",
            "example": 10737418240
          },
          "rlahBytesUsed": {
            "type": "integer",
            "format": "int64",
            "description": "Data consumed while roaming under RLAH (Roam Like At Home) rules, in bytes. Present only when the package includes an RLAH allowance.",
            "example": 1073741824
          },
          "rlahBytesRemaining": {
            "type": "integer",
            "format": "int64",
            "description": "RLAH data still available, in bytes. Once exhausted, roaming usage may incur additional charges even though national data remains.",
            "example": 4294967296
          },
          "rlahBytesTotal": {
            "type": "integer",
            "format": "int64",
            "description": "The portion of this package usable while roaming under RLAH rules, in bytes. Often lower than the full national allowance.",
            "example": 5368709120
          },
          "status": {
            "$ref": "#/components/schemas/UsagePackageStatus",
            "description": "The status of this package."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period this allowance applies to.",
            "example": "2025-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.",
            "example": "2025-02-01T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsageDataRoamingPackage": {
        "type": "object",
        "description": "A single data allowance bucket for use while roaming abroad — from the base plan's roaming allowance or a dedicated roaming add-on — reporting bytes used and remaining.",
        "required": [
          "name",
          "dataBytesUsed",
          "dataBytesRemaining",
          "dataBytesTotal",
          "status"
        ],
        "properties": {
          "subscriptionAddonId": {
            "type": "string",
            "description": "The subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included roaming allowance.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Human-readable name of the package, as shown to end users.",
            "example": "Asia 5GB Roaming"
          },
          "dataBytesUsed": {
            "type": "integer",
            "format": "int64",
            "description": "Data consumed from this allowance so far, in bytes.",
            "example": 1073741824
          },
          "dataBytesRemaining": {
            "type": "integer",
            "format": "int64",
            "description": "Data still available in this allowance, in bytes.",
            "example": 4294967296
          },
          "dataBytesTotal": {
            "type": "integer",
            "format": "int64",
            "description": "The full data allowance of this package, in bytes.",
            "example": 5368709120
          },
          "status": {
            "$ref": "#/components/schemas/UsagePackageStatus",
            "description": "The status of this package."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period this allowance applies to.",
            "example": "2025-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.",
            "example": "2025-02-01T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UsageDataHotspotPackage": {
        "type": "object",
        "description": "A data allowance bucket for the personal hotspot of the phone (tethering). It holds the hotspot data of the product or a hotspot top-up.",
        "required": [
          "name",
          "dataBytesUsed",
          "dataBytesRemaining",
          "dataBytesTotal",
          "status"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Human-readable name of the bucket, as shown to end users.",
            "example": "Hotspot data"
          },
          "dataBytesUsed": {
            "type": "integer",
            "format": "int64",
            "description": "Hotspot data consumed from this allowance so far, in bytes.",
            "example": 1073741824
          },
          "dataBytesRemaining": {
            "type": "integer",
            "format": "int64",
            "description": "Hotspot data still available in this allowance, in bytes.",
            "example": 4294967296
          },
          "dataBytesTotal": {
            "type": "integer",
            "format": "int64",
            "description": "The full hotspot data allowance of this bucket, in bytes.",
            "example": 5368709120
          },
          "status": {
            "$ref": "#/components/schemas/UsagePackageStatus",
            "description": "The status of this bucket."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the period this allowance applies to.",
            "example": "2025-01-01T00:00:00Z"
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "description": "End of the period this allowance applies to.",
            "example": "2025-02-01T00:00:00Z"
          }
        }
      },
      "UsageData": {
        "type": "object",
        "description": "Mobile data usage for a subscription, split by where the data is consumed: national (used in\nthe home country), roaming (used while abroad), and hotspot (shared with other devices through\nthe phone).\n",
        "required": [
          "unlimited"
        ],
        "properties": {
          "dataBytesUsed": {
            "type": "integer",
            "format": "int64",
            "description": "Data used in the current period, in bytes. It is the total of the national and roaming buckets that did not expire.\nThe hotspot buckets are not in this total.\n\nAbsent when the network reported no national or roaming bucket.\n",
            "example": 4294967296
          },
          "unlimited": {
            "type": "boolean",
            "description": "True when the product of the subscription has no cap on its own data. The `dataBytesTotal` of the bucket of the product is then not a limit to count down.\nAn add-on, roaming or hotspot bucket keeps its limit.\n\nFalse when the product has a cap.\n",
            "example": true
          },
          "national": {
            "type": "array",
            "description": "Allowance buckets for data used in the home country, including the base plan's data allowance and any add-on packages.",
            "items": {
              "$ref": "#/components/schemas/UsageDataNationalPackage"
            }
          },
          "roaming": {
            "type": "array",
            "description": "Allowance buckets for data used while roaming abroad, from the base plan's roaming allowance or dedicated roaming add-on packages.",
            "items": {
              "$ref": "#/components/schemas/UsageDataRoamingPackage"
            }
          },
          "hotspot": {
            "type": "array",
            "description": "Allowance buckets for data that the phone shares through its personal hotspot (tethering), from the hotspot allowance of the product and from hotspot top-ups. The `dataBytesUsed` total does not include these buckets.",
            "items": {
              "$ref": "#/components/schemas/UsageDataHotspotPackage"
            }
          }
        }
      },
      "Usage": {
        "type": "object",
        "description": "Current usage statistics for a subscription, organized by service type (voice, SMS, MMS, data).\nWithin each service type, usage is broken down into per-package allowance buckets: the base plan's\nincluded allowance plus any add-on packages, each reporting used, remaining, and total amounts.\nVoice and SMS carry the consumption of the current period for every cellular plan, and a package only when the plan counts an allowance. A service type is absent when the plan does not include it.\n",
        "required": [
          "updatedAt"
        ],
        "properties": {
          "voice": {
            "$ref": "#/components/schemas/UsageVoice",
            "description": "Voice call usage across all scopes and packages."
          },
          "sms": {
            "$ref": "#/components/schemas/UsageSms",
            "description": "SMS usage across all scopes and packages."
          },
          "mms": {
            "$ref": "#/components/schemas/UsageMms",
            "description": "MMS usage across all scopes and packages."
          },
          "data": {
            "$ref": "#/components/schemas/UsageData",
            "description": "Data usage across all scopes and packages."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the usage information was last refreshed from the network. Usage counters are not real-time; recent activity may not be reflected yet.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "RoamingCostControl": {
        "type": "object",
        "description": "The roaming cost-control setting for one subscription. This cost limit is separate from roaming data allowances and top-up balances.\n",
        "required": [
          "subscriptionId",
          "provider",
          "state",
          "observedAt"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The subscription that owns this roaming cost-control setting.",
            "example": "a47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "provider": {
            "type": "string",
            "description": "The network provider that supplies the setting.",
            "example": "telia"
          },
          "state": {
            "type": "string",
            "description": "The availability and configuration state of roaming cost control.",
            "enum": [
              "ACTIVE",
              "NOT_CONFIGURED",
              "UNSUPPORTED",
              "UNAVAILABLE"
            ]
          },
          "limitMinor": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "description": "The configured cost limit in minor currency units. It is present only when state is ACTIVE.",
            "example": 52000
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "The currency of limitMinor. It is present only when state is ACTIVE."
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the platform read this setting."
          }
        }
      },
      "OfferingOptionLineItemType": {
        "type": "string",
        "description": "The type of order line item that an offering option is for. The values are the same as the\n`type` of an order line item.\n\n- SUBSCRIPTION_CHANGE: Change the plan of the subscription.\n- ADDON: Add an add-on to the subscription.\n- ADDON_CHANGE: Change an add-on that the subscription has.\n",
        "enum": [
          "SUBSCRIPTION_CHANGE",
          "ADDON",
          "ADDON_CHANGE"
        ]
      },
      "SubscriptionOfferingOption": {
        "type": "object",
        "description": "A product offering that an order line item for the subscription can use, and the day that it takes effect.",
        "required": [
          "productOffering",
          "schedule",
          "effectiveDate"
        ],
        "properties": {
          "productOffering": {
            "$ref": "#/components/schemas/EmbeddedProductOffering"
          },
          "schedule": {
            "$ref": "#/components/schemas/ProductOfferingChangeSchedule"
          },
          "effectiveDate": {
            "type": "string",
            "format": "date",
            "description": "The date when the product offering takes effect. For an add-on, this is today.",
            "example": "2026-12-01"
          }
        }
      },
      "SubscriptionOfferingOptions": {
        "type": "object",
        "description": "The product offerings that an order line item of one type can use for a subscription.",
        "required": [
          "lineItemType",
          "items"
        ],
        "properties": {
          "lineItemType": {
            "$ref": "#/components/schemas/OfferingOptionLineItemType"
          },
          "items": {
            "type": "array",
            "description": "The options. The list is empty when the subscription has no option for this type.",
            "items": {
              "$ref": "#/components/schemas/SubscriptionOfferingOption"
            }
          }
        }
      },
      "DiscountSource": {
        "type": "string",
        "description": "What gave the customer the discount:\n\n- `STANDARD` and `BINDING_CONTRACT` are part of the terms of the product offering.\n- `PRICE_LIST` and `PRICE_LIST_DISCOUNT` come from the price list that the customer is on.\n- `BINDING_PERIOD` comes from the contract that the customer signed.\n- `UPFRONT_PAYMENT` is what the customer bought when the customer paid for several periods at once.\n- `TAG` is a campaign that the customer carries.\n- `PROMOTION_CODE` is a promotional code that the customer used.\n",
        "enum": [
          "STANDARD",
          "BINDING_CONTRACT",
          "PRICE_LIST",
          "PRICE_LIST_DISCOUNT",
          "BINDING_PERIOD",
          "UPFRONT_PAYMENT",
          "TAG",
          "PROMOTION_CODE"
        ],
        "example": "TAG"
      },
      "SubscriptionPriceDiscount": {
        "type": "object",
        "description": "One discount that comes off the price of a subscription today. Use `validTo` to tell the customer\nwhen the price goes up. Use `source` to tell what gave the customer the discount.\n\nA fixed discount gives `amountMinor`. A percentage discount gives `percent`.\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the discount, as the brand wrote it. When the discount has no name, this is the code\nof the discount, or else its type. The order pricing gives the same name to the same discount.\n",
            "example": "Summer campaign"
          },
          "source": {
            "$ref": "#/components/schemas/DiscountSource"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount that comes off each billing period, in minor currency units. Present for a fixed discount.",
            "example": 500
          },
          "percent": {
            "type": "number",
            "format": "decimal",
            "description": "The percentage that comes off the price, for example 10 for 10 percent. Present for a percentage discount.",
            "example": 10
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first day that the discount comes off the price. Omitted when the discount applies from the start."
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last day that the discount comes off the price. Omitted when the discount never stops."
          }
        }
      },
      "SubscriptionPrice": {
        "type": "object",
        "description": "The price that the customer pays for one subscription. The price includes the discounts that the\ncustomer has today. The catalog price of the product offering, in `productOffering.price`, is the\nsame for each customer and does not include them.\n\nAll amounts are in minor units of the currency. For example, 2999 is $29.99 when the currency is USD.\n",
        "required": [
          "subscriptionId",
          "currency",
          "priceMinor",
          "basePriceMinor",
          "includesTax",
          "discounts"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier for the subscription.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "The currency of each amount in this price."
          },
          "priceMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The price for one billing period after each discount in `discounts`, in minor currency units.\nOne invoice covers `billingCycle.interval` billing periods, so the invoice charges `priceMinor` ×\n`billingCycle.interval`. For a one-time price, `priceMinor` is the full charge.\n",
            "example": 2499
          },
          "basePriceMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The price for one billing period before any discount, in minor currency units.",
            "example": 2999
          },
          "includesTax": {
            "type": "boolean",
            "description": "True when `priceMinor` and `basePriceMinor` include their tax. When false, the tax comes on\ntop of the amounts.\n",
            "example": false
          },
          "taxAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The tax of `priceMinor`, in minor currency units. When `includesTax` is true, the tax is a part of\n`priceMinor`. When `includesTax` is false, the amount with tax is `priceMinor` + `taxAmountMinor`.\nOmitted when the tax depends on the address of the customer, because this price does not\ncalculate that tax.\n",
            "example": 625
          },
          "billingCycle": {
            "$ref": "#/components/schemas/BillingCycle",
            "description": "How often the price is charged. Omitted when the price is a one-time price."
          },
          "discounts": {
            "type": "array",
            "description": "The discounts that come off the price today. The array is empty when the customer has no\ndiscount. The price goes up after the earliest `validTo` of these discounts.\n",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPriceDiscount"
            }
          }
        }
      },
      "ChangeSubscriptionServiceAddressRequest": {
        "type": "object",
        "description": "Request to change the address where a subscription is served.",
        "required": [
          "address"
        ],
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address where the subscriber uses this subscription.\n\nAn address that is equal to the billing address of the customer removes the address that the subscription holds. The subscription then takes the billing address.\n"
          }
        }
      },
      "EsimQrCode": {
        "type": "object",
        "description": "eSIM QR code data for a subscription's eSIM profile, with an optional hosted image URL.",
        "required": [
          "subscriptionId",
          "qrCodeData"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription this QR code belongs to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "qrCodeData": {
            "type": "string",
            "description": "The QR code data string that contains the eSIM profile download information (LPA format).",
            "example": "LPA:1$rsp-prod.example.com$12345678-1234-1234-1234-123456789012"
          },
          "qrCodeUrl": {
            "type": "string",
            "format": "uri",
            "description": "Hosted URL where the QR code image can be accessed for display or download. Omitted when no hosted image is available; render the qrCodeData string as a QR code instead.",
            "example": "https://esim.your-domain.com/qr/d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the QR code and any hosted URL expire. After this time, a new QR code should be requested. Omitted when no expiry applies.",
            "example": "2024-12-31T23:59:59Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "EsimInstallationStatus": {
        "type": "string",
        "description": "The installation state of an eSIM profile on the network.\nReflects the current eUICC profile lifecycle stage as reported by the network operator.\n",
        "enum": [
          "AVAILABLE",
          "ALLOCATED",
          "LINKED",
          "CONFIRMED",
          "RELEASED",
          "DOWNLOADED",
          "INSTALLED",
          "ENABLED",
          "DISABLED",
          "ERROR",
          "UNAVAILABLE",
          "DELETED"
        ]
      },
      "SubscriptionEsimProfile": {
        "type": "object",
        "description": "The live eSIM profile status of a subscription's SIM, reported by the network operator.\nShows whether the eSIM has been downloaded, installed, or enabled on a device.\n",
        "required": [
          "subscriptionId",
          "status"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription this eSIM profile belongs to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "status": {
            "$ref": "#/components/schemas/EsimInstallationStatus"
          },
          "eid": {
            "type": "string",
            "description": "The EID (eSIM Identifier) assigned to the device. Empty until the eSIM is activated.",
            "example": "89049032004008882600009B40002780"
          },
          "lastOperationAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the last eUICC operation occurred for this profile.",
            "example": "2024-06-15T14:30:00Z"
          },
          "installedCount": {
            "type": "integer",
            "description": "The number of times a device installed this profile. Absent when the network operator sets no limit.",
            "example": 3
          },
          "maxCount": {
            "type": "integer",
            "description": "The maximum number of times a device can install this profile. Absent when the network operator sets no limit.",
            "example": 5
          }
        }
      },
      "TagTarget": {
        "type": "string",
        "description": "The kind of entity that a tag attaches to.",
        "enum": [
          "SUBSCRIPTION",
          "CUSTOMER",
          "LICENSE"
        ]
      },
      "TagTypeName": {
        "type": "string",
        "description": "The type of a tag. We add new types without notice. Your client must accept a type that it does not know.\n",
        "enum": [
          "DIRECT_SALE",
          "PARTNER_SALE",
          "PARTNER_LEAD",
          "MARKETING_SALE",
          "SUPPORT_SALE",
          "ONLINE_SALE",
          "COMPANY_OWNER",
          "INVITE_SALE",
          "REFERRAL_SALE",
          "SALES",
          "ABROAD",
          "DISCOUNT",
          "ENABLE_FEATURE",
          "CUSTOM",
          "REBATE_FIXED",
          "REBATE_PERCENTAGE",
          "REBATE_CREDIT_FIXED",
          "REBATE_CREDIT_PERCENTAGE",
          "CUSTOMER_BOUND_COST_PER_MONTH",
          "INVOICE_DAY_OF_MONTH",
          "INVOICE_DUE_IN_DAYS",
          "INVOICE_VAT",
          "CLOUD_COM_BAS",
          "CALL_SERVICE",
          "CHURN",
          "SUPPORT",
          "PROVISIONING",
          "CHARITY",
          "INVOICE_PERIOD_TYPE",
          "REMOVE_FEE",
          "BILLING_IGNORE_CUSTOMER",
          "INVOICE_IGNORE_CUSTOMER",
          "INVOICE_PROTECTED_IDENTITY",
          "TEST_AND_TRAINING_ENTITY",
          "PRICE_LIST",
          "PRODUCT_CATALOG",
          "MANUAL_CHARGE",
          "MANUAL_CHARGE_ONCE"
        ]
      },
      "TagValueShape": {
        "type": "string",
        "description": "The shape of the value of a tag type.",
        "enum": [
          "TEXT",
          "NUMBER",
          "OPTION",
          "FLAG",
          "REFERENCE",
          "MANUAL_CHARGE",
          "ONE_TIME_MANUAL_CHARGE"
        ]
      },
      "CreatableTagType": {
        "type": "object",
        "description": "A tag type that the API key can create.",
        "required": [
          "type",
          "valueShape",
          "options"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TagTypeName"
          },
          "valueShape": {
            "$ref": "#/components/schemas/TagValueShape"
          },
          "options": {
            "type": "array",
            "description": "The permitted values of a type with the value shape `OPTION`. It is empty for the other shapes.",
            "items": {
              "type": "string",
              "example": "MovedAbroad"
            }
          }
        }
      },
      "TextTag": {
        "type": "object",
        "title": "TextTag",
        "description": "A tag with a text value.",
        "required": [
          "tagId",
          "type",
          "value",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "DIRECT_SALE",
              "PARTNER_SALE",
              "PARTNER_LEAD",
              "MARKETING_SALE",
              "SUPPORT_SALE",
              "ONLINE_SALE",
              "COMPANY_OWNER",
              "INVITE_SALE",
              "REFERRAL_SALE",
              "SALES",
              "ABROAD",
              "DISCOUNT",
              "ENABLE_FEATURE",
              "CUSTOM"
            ]
          },
          "value": {
            "type": "string",
            "x-pii": "KIND_FREE_TEXT",
            "description": "The value of the tag.",
            "example": "seller@example.com"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "NumberTag": {
        "type": "object",
        "title": "NumberTag",
        "description": "A tag with a number value.",
        "required": [
          "tagId",
          "type",
          "value",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "REBATE_FIXED",
              "REBATE_PERCENTAGE",
              "REBATE_CREDIT_FIXED",
              "REBATE_CREDIT_PERCENTAGE",
              "CUSTOMER_BOUND_COST_PER_MONTH",
              "INVOICE_DAY_OF_MONTH",
              "INVOICE_DUE_IN_DAYS",
              "INVOICE_VAT",
              "CLOUD_COM_BAS"
            ]
          },
          "value": {
            "type": "number",
            "description": "The value of the tag. A percentage type holds a percentage, and an amount type holds an amount in major units of the currency.",
            "example": 10
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "OptionTag": {
        "type": "object",
        "title": "OptionTag",
        "description": "A tag with a value from a fixed list of options.",
        "required": [
          "tagId",
          "type",
          "value",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "CALL_SERVICE",
              "CHURN",
              "SUPPORT",
              "PROVISIONING",
              "CHARITY",
              "INVOICE_PERIOD_TYPE",
              "REMOVE_FEE"
            ]
          },
          "value": {
            "type": "string",
            "description": "The value of the tag. It is one of the options that `GET /tag-types` gives for the type.",
            "example": "MovedAbroad"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "FlagTag": {
        "type": "object",
        "title": "FlagTag",
        "description": "A tag that turns on a behavior while it is valid. It has no value.",
        "required": [
          "tagId",
          "type",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "BILLING_IGNORE_CUSTOMER",
              "INVOICE_IGNORE_CUSTOMER",
              "INVOICE_PROTECTED_IDENTITY",
              "TEST_AND_TRAINING_ENTITY"
            ]
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "ReferenceTag": {
        "type": "object",
        "title": "ReferenceTag",
        "description": "A tag that points to another entity of the brand.",
        "required": [
          "tagId",
          "type",
          "value",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "PRICE_LIST",
              "PRODUCT_CATALOG"
            ]
          },
          "value": {
            "type": "string",
            "description": "The unique identifier of the entity that the tag points to, for example a price list.",
            "example": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "ManualCharge": {
        "type": "object",
        "description": "A charge that the invoice includes.",
        "required": [
          "description",
          "amountMinor",
          "currency"
        ],
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1,
            "x-pii": "KIND_FREE_TEXT",
            "description": "The text of the charge on the invoice. It must not contain a colon.",
            "example": "Installation"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount of the charge, in minor units of the currency (for example 2900 = $29.00 when the currency is USD).",
            "example": 2900
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        }
      },
      "ManualChargeTag": {
        "type": "object",
        "title": "ManualChargeTag",
        "description": "A charge that each invoice includes while the tag is valid.",
        "required": [
          "tagId",
          "type",
          "manualCharge",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "MANUAL_CHARGE"
            ]
          },
          "manualCharge": {
            "$ref": "#/components/schemas/ManualCharge"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "OneTimeManualChargeTag": {
        "type": "object",
        "title": "OneTimeManualChargeTag",
        "description": "A charge that the invoice includes one time.",
        "required": [
          "tagId",
          "type",
          "manualCharge",
          "chargeDate",
          "createdAt"
        ],
        "properties": {
          "tagId": {
            "type": "string",
            "description": "The unique identifier of the tag.",
            "example": "3f6c2a1e-8b4d-4c7a-9e2f-1a5b6c7d8e9f"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The time when the tag was created.",
            "example": "2026-10-29T08:30:00Z"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier of the subscription that the tag attaches to.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer that the tag attaches to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license that the tag attaches to.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "MANUAL_CHARGE_ONCE"
            ]
          },
          "manualCharge": {
            "$ref": "#/components/schemas/ManualCharge"
          },
          "chargeDate": {
            "type": "string",
            "format": "date",
            "description": "The date of the charge. The invoice that covers this date includes the charge one time.",
            "example": "2026-11-15"
          }
        }
      },
      "Tag": {
        "description": "A tag on a subscription, a customer or a license. The `type` decides the shape of the value.\n\nWe add new tag types without notice. Your client must accept a type that it does not know.\n",
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextTag"
          },
          {
            "$ref": "#/components/schemas/NumberTag"
          },
          {
            "$ref": "#/components/schemas/OptionTag"
          },
          {
            "$ref": "#/components/schemas/FlagTag"
          },
          {
            "$ref": "#/components/schemas/ReferenceTag"
          },
          {
            "$ref": "#/components/schemas/ManualChargeTag"
          },
          {
            "$ref": "#/components/schemas/OneTimeManualChargeTag"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "DIRECT_SALE": "#/components/schemas/TextTag",
            "PARTNER_SALE": "#/components/schemas/TextTag",
            "PARTNER_LEAD": "#/components/schemas/TextTag",
            "MARKETING_SALE": "#/components/schemas/TextTag",
            "SUPPORT_SALE": "#/components/schemas/TextTag",
            "ONLINE_SALE": "#/components/schemas/TextTag",
            "COMPANY_OWNER": "#/components/schemas/TextTag",
            "INVITE_SALE": "#/components/schemas/TextTag",
            "REFERRAL_SALE": "#/components/schemas/TextTag",
            "SALES": "#/components/schemas/TextTag",
            "ABROAD": "#/components/schemas/TextTag",
            "DISCOUNT": "#/components/schemas/TextTag",
            "ENABLE_FEATURE": "#/components/schemas/TextTag",
            "CUSTOM": "#/components/schemas/TextTag",
            "REBATE_FIXED": "#/components/schemas/NumberTag",
            "REBATE_PERCENTAGE": "#/components/schemas/NumberTag",
            "REBATE_CREDIT_FIXED": "#/components/schemas/NumberTag",
            "REBATE_CREDIT_PERCENTAGE": "#/components/schemas/NumberTag",
            "CUSTOMER_BOUND_COST_PER_MONTH": "#/components/schemas/NumberTag",
            "INVOICE_DAY_OF_MONTH": "#/components/schemas/NumberTag",
            "INVOICE_DUE_IN_DAYS": "#/components/schemas/NumberTag",
            "INVOICE_VAT": "#/components/schemas/NumberTag",
            "CLOUD_COM_BAS": "#/components/schemas/NumberTag",
            "CALL_SERVICE": "#/components/schemas/OptionTag",
            "CHURN": "#/components/schemas/OptionTag",
            "SUPPORT": "#/components/schemas/OptionTag",
            "PROVISIONING": "#/components/schemas/OptionTag",
            "CHARITY": "#/components/schemas/OptionTag",
            "INVOICE_PERIOD_TYPE": "#/components/schemas/OptionTag",
            "REMOVE_FEE": "#/components/schemas/OptionTag",
            "BILLING_IGNORE_CUSTOMER": "#/components/schemas/FlagTag",
            "INVOICE_IGNORE_CUSTOMER": "#/components/schemas/FlagTag",
            "INVOICE_PROTECTED_IDENTITY": "#/components/schemas/FlagTag",
            "TEST_AND_TRAINING_ENTITY": "#/components/schemas/FlagTag",
            "PRICE_LIST": "#/components/schemas/ReferenceTag",
            "PRODUCT_CATALOG": "#/components/schemas/ReferenceTag",
            "MANUAL_CHARGE": "#/components/schemas/ManualChargeTag",
            "MANUAL_CHARGE_ONCE": "#/components/schemas/OneTimeManualChargeTag"
          }
        }
      },
      "CreateTextTagRequest": {
        "type": "object",
        "title": "TextTag",
        "description": "A tag with a text value.",
        "required": [
          "type",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "DIRECT_SALE",
              "PARTNER_SALE",
              "PARTNER_LEAD",
              "MARKETING_SALE",
              "SUPPORT_SALE",
              "ONLINE_SALE",
              "COMPANY_OWNER",
              "INVITE_SALE",
              "REFERRAL_SALE",
              "SALES",
              "ABROAD",
              "DISCOUNT",
              "ENABLE_FEATURE",
              "CUSTOM"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "value": {
            "type": "string",
            "x-pii": "KIND_FREE_TEXT",
            "minLength": 1,
            "description": "The value of the tag. A `CUSTOM` value must not start with the name of another tag type and a colon.",
            "example": "seller@example.com"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "CreateNumberTagRequest": {
        "type": "object",
        "title": "NumberTag",
        "description": "A tag with a number value.",
        "required": [
          "type",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "REBATE_FIXED",
              "REBATE_PERCENTAGE",
              "REBATE_CREDIT_FIXED",
              "REBATE_CREDIT_PERCENTAGE",
              "CUSTOMER_BOUND_COST_PER_MONTH",
              "INVOICE_DAY_OF_MONTH",
              "INVOICE_DUE_IN_DAYS",
              "INVOICE_VAT",
              "CLOUD_COM_BAS"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "value": {
            "type": "number",
            "description": "The value of the tag. A percentage type holds a percentage, and an amount type holds an amount in major units of the currency.",
            "example": 10
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "CreateOptionTagRequest": {
        "type": "object",
        "title": "OptionTag",
        "description": "A tag with a value from a fixed list of options.",
        "required": [
          "type",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "CALL_SERVICE",
              "CHURN",
              "SUPPORT",
              "PROVISIONING",
              "CHARITY",
              "INVOICE_PERIOD_TYPE",
              "REMOVE_FEE"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "description": "The value of the tag. It is one of the options that `GET /tag-types` gives for the type.",
            "example": "MovedAbroad"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "CreateFlagTagRequest": {
        "type": "object",
        "title": "FlagTag",
        "description": "A tag that turns on a behavior while it is valid. It has no value.",
        "required": [
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "BILLING_IGNORE_CUSTOMER",
              "INVOICE_IGNORE_CUSTOMER",
              "INVOICE_PROTECTED_IDENTITY",
              "TEST_AND_TRAINING_ENTITY"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "CreateReferenceTagRequest": {
        "type": "object",
        "title": "ReferenceTag",
        "description": "A tag that points to another entity of the brand.",
        "required": [
          "type",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "PRICE_LIST",
              "PRODUCT_CATALOG"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "description": "The unique identifier of the entity that the tag points to, for example a price list.",
            "example": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "ManualChargeInput": {
        "type": "object",
        "description": "A charge that the invoice includes.",
        "required": [
          "description",
          "amountMinor",
          "currency"
        ],
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1,
            "x-pii": "KIND_FREE_TEXT",
            "description": "The text of the charge on the invoice. It must not contain a colon.",
            "example": "Installation"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount of the charge, in minor units of the currency (for example 2900 = $29.00 when the currency is USD).",
            "example": 2900
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        }
      },
      "CreateManualChargeTagRequest": {
        "type": "object",
        "title": "ManualChargeTag",
        "description": "A charge that each invoice includes while the tag is valid.",
        "required": [
          "type",
          "manualCharge"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "MANUAL_CHARGE"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "manualCharge": {
            "$ref": "#/components/schemas/ManualChargeInput"
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first date that the tag is valid. If it is absent, the tag is valid from the start.",
            "example": "2026-11-01"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. If it is absent, the tag has no end.",
            "example": "2027-10-31"
          }
        }
      },
      "CreateOneTimeManualChargeTagRequest": {
        "type": "object",
        "title": "OneTimeManualChargeTag",
        "description": "A charge that the invoice includes one time.",
        "required": [
          "type",
          "manualCharge",
          "chargeDate"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the tag. The type decides the shape of the value.",
            "enum": [
              "MANUAL_CHARGE_ONCE"
            ]
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "customerId": {
            "type": "string",
            "description": "The customer to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "licenseId": {
            "type": "string",
            "description": "The license to attach the tag to. Give exactly one of `subscriptionId`, `customerId` and `licenseId`.",
            "example": "b7c8d9e0-f1a2-4b3c-8d4e-5f6a7b8c9d0e"
          },
          "manualCharge": {
            "$ref": "#/components/schemas/ManualChargeInput"
          },
          "chargeDate": {
            "type": "string",
            "format": "date",
            "description": "The date of the charge. The invoice that covers this date includes the charge one time.",
            "example": "2026-11-15"
          }
        }
      },
      "CreateTagRequest": {
        "description": "A request to create a tag. The `type` decides the shape of the value.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateTextTagRequest"
          },
          {
            "$ref": "#/components/schemas/CreateNumberTagRequest"
          },
          {
            "$ref": "#/components/schemas/CreateOptionTagRequest"
          },
          {
            "$ref": "#/components/schemas/CreateFlagTagRequest"
          },
          {
            "$ref": "#/components/schemas/CreateReferenceTagRequest"
          },
          {
            "$ref": "#/components/schemas/CreateManualChargeTagRequest"
          },
          {
            "$ref": "#/components/schemas/CreateOneTimeManualChargeTagRequest"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "DIRECT_SALE": "#/components/schemas/CreateTextTagRequest",
            "PARTNER_SALE": "#/components/schemas/CreateTextTagRequest",
            "PARTNER_LEAD": "#/components/schemas/CreateTextTagRequest",
            "MARKETING_SALE": "#/components/schemas/CreateTextTagRequest",
            "SUPPORT_SALE": "#/components/schemas/CreateTextTagRequest",
            "ONLINE_SALE": "#/components/schemas/CreateTextTagRequest",
            "COMPANY_OWNER": "#/components/schemas/CreateTextTagRequest",
            "INVITE_SALE": "#/components/schemas/CreateTextTagRequest",
            "REFERRAL_SALE": "#/components/schemas/CreateTextTagRequest",
            "SALES": "#/components/schemas/CreateTextTagRequest",
            "ABROAD": "#/components/schemas/CreateTextTagRequest",
            "DISCOUNT": "#/components/schemas/CreateTextTagRequest",
            "ENABLE_FEATURE": "#/components/schemas/CreateTextTagRequest",
            "CUSTOM": "#/components/schemas/CreateTextTagRequest",
            "REBATE_FIXED": "#/components/schemas/CreateNumberTagRequest",
            "REBATE_PERCENTAGE": "#/components/schemas/CreateNumberTagRequest",
            "REBATE_CREDIT_FIXED": "#/components/schemas/CreateNumberTagRequest",
            "REBATE_CREDIT_PERCENTAGE": "#/components/schemas/CreateNumberTagRequest",
            "CUSTOMER_BOUND_COST_PER_MONTH": "#/components/schemas/CreateNumberTagRequest",
            "INVOICE_DAY_OF_MONTH": "#/components/schemas/CreateNumberTagRequest",
            "INVOICE_DUE_IN_DAYS": "#/components/schemas/CreateNumberTagRequest",
            "INVOICE_VAT": "#/components/schemas/CreateNumberTagRequest",
            "CLOUD_COM_BAS": "#/components/schemas/CreateNumberTagRequest",
            "CALL_SERVICE": "#/components/schemas/CreateOptionTagRequest",
            "CHURN": "#/components/schemas/CreateOptionTagRequest",
            "SUPPORT": "#/components/schemas/CreateOptionTagRequest",
            "PROVISIONING": "#/components/schemas/CreateOptionTagRequest",
            "CHARITY": "#/components/schemas/CreateOptionTagRequest",
            "INVOICE_PERIOD_TYPE": "#/components/schemas/CreateOptionTagRequest",
            "REMOVE_FEE": "#/components/schemas/CreateOptionTagRequest",
            "BILLING_IGNORE_CUSTOMER": "#/components/schemas/CreateFlagTagRequest",
            "INVOICE_IGNORE_CUSTOMER": "#/components/schemas/CreateFlagTagRequest",
            "INVOICE_PROTECTED_IDENTITY": "#/components/schemas/CreateFlagTagRequest",
            "TEST_AND_TRAINING_ENTITY": "#/components/schemas/CreateFlagTagRequest",
            "PRICE_LIST": "#/components/schemas/CreateReferenceTagRequest",
            "PRODUCT_CATALOG": "#/components/schemas/CreateReferenceTagRequest",
            "MANUAL_CHARGE": "#/components/schemas/CreateManualChargeTagRequest",
            "MANUAL_CHARGE_ONCE": "#/components/schemas/CreateOneTimeManualChargeTagRequest"
          }
        }
      },
      "EndTagRequest": {
        "type": "object",
        "description": "A request to end a tag.",
        "required": [
          "validTo"
        ],
        "additionalProperties": false,
        "properties": {
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last date that the tag is valid. It must not be before the `validFrom` of the tag. If the tag already has a `validTo`, the new date must not be later.\n",
            "example": "2026-12-31"
          }
        }
      },
      "SubscriberListItem": {
        "type": "object",
        "description": "Simplified representation of a subscriber (the end user of a subscription) optimized for list operations. Use the detailed Subscriber schema for individual subscriber views.",
        "required": [
          "subscriberId",
          "name"
        ],
        "properties": {
          "subscriberId": {
            "type": "string",
            "description": "The unique identifier of the subscriber.",
            "example": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
          },
          "name": {
            "type": "string",
            "description": "The full name of the subscriber.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Optional email address of the subscriber.",
            "example": "john.doe@example.com"
          },
          "address": {
            "deprecated": true,
            "description": "Deprecated. Use `serviceAddress` on each subscription instead.\n\nThe service address of the oldest subscription of the subscriber. A subscriber with two subscriptions can hold two service addresses, and this field shows only one.\n",
            "$ref": "#/components/schemas/Address"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier of the customer the subscriber belongs to.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "subscriptionIds": {
            "type": "array",
            "description": "List of subscriptions ids associated with the subscriber.\n\nTypically a subscriber has exactly one subscription, but in rare cases, a subscriber may have multiple subscriptions.\n",
            "items": {
              "type": "string",
              "description": "The unique identifier of the subscription.",
              "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the subscriber was created.",
            "example": "2024-01-10T08:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the subscriber was last updated.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "Subscriber": {
        "type": "object",
        "description": "The person or entity that uses a subscription's service (the end user), as opposed to the customer, who pays for it. For example, an employee using a company-paid phone plan.",
        "required": [
          "subscriberId",
          "name",
          "customer"
        ],
        "properties": {
          "subscriberId": {
            "type": "string",
            "description": "The unique identifier of the subscriber.",
            "example": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
          },
          "name": {
            "type": "string",
            "description": "The full name of the subscriber.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Optional email address of the subscriber.",
            "example": "john.doe@example.com"
          },
          "contactNumber": {
            "type": "string",
            "format": "phone",
            "description": "A phone number for reaching the subscriber, separate from the number their subscription provides.",
            "example": "+15551234567"
          },
          "address": {
            "deprecated": true,
            "description": "Deprecated. Use `serviceAddress` on each subscription instead.\n\nThe service address of the oldest subscription of the subscriber. A subscriber with two subscriptions can hold two service addresses, and this field shows only one.\n",
            "$ref": "#/components/schemas/Address"
          },
          "customer": {
            "$ref": "#/components/schemas/EmbeddedCustomer"
          },
          "subscriptions": {
            "type": "array",
            "description": "List of subscriptions associated with the subscriber.\n\nTypically a subscriber has exactly one subscription, but in rare cases, a subscriber may have multiple subscriptions.\n",
            "items": {
              "$ref": "#/components/schemas/Subscription"
            }
          }
        }
      },
      "UpdateSubscriberRequest": {
        "type": "object",
        "description": "Request to update a subscriber's information.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The full name of the subscriber.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address of the subscriber.",
            "example": "john.doe@example.com"
          },
          "contactNumber": {
            "type": "string",
            "format": "phone",
            "description": "A phone number for reaching the subscriber, separate from the number their subscription provides.",
            "example": "+15551234567"
          },
          "address": {
            "deprecated": true,
            "description": "Deprecated. Use `changeSubscriptionServiceAddress` instead.\n\nThe service address of the mobile subscription of the subscriber. The request fails when the subscriber does not have exactly one mobile subscription.\n",
            "$ref": "#/components/schemas/Address"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "License": {
        "type": "object",
        "description": "A license represents a permission to use a software product with embedded customer and product offering details.",
        "required": [
          "licenseId",
          "status",
          "type",
          "customer",
          "productOffering",
          "activatedAt"
        ],
        "properties": {
          "licenseId": {
            "type": "string",
            "description": "The unique identifier for the license.",
            "example": "c9d0e1f2-a3b4-5678-9012-def012345678"
          },
          "status": {
            "$ref": "#/components/schemas/LicenseStatus"
          },
          "type": {
            "$ref": "#/components/schemas/LicenseType"
          },
          "customer": {
            "$ref": "#/components/schemas/EmbeddedCustomer"
          },
          "productOffering": {
            "$ref": "#/components/schemas/EmbeddedProductOffering"
          },
          "assignedTo": {
            "$ref": "#/components/schemas/EmbeddedAssignedTo"
          },
          "details": {
            "type": "object",
            "description": "Additional license details specific to certain license types.",
            "additionalProperties": true
          },
          "pendingStatus": {
            "type": "object",
            "description": "A status change that has been requested but not yet applied, for example a scheduled cancellation. Present only while a status change is scheduled.",
            "required": [
              "status",
              "scheduledAt"
            ],
            "properties": {
              "status": {
                "$ref": "#/components/schemas/LicenseStatus"
              },
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending status change is scheduled to occur.",
                "example": "2024-02-01"
              }
            }
          },
          "pendingProductOffering": {
            "type": "object",
            "description": "A product offering change (upgrade or downgrade) that has been requested but not yet applied. Present only while a change is scheduled; the current offering remains in `productOffering` until the scheduled date.",
            "required": [
              "scheduledAt",
              "product"
            ],
            "properties": {
              "scheduledAt": {
                "type": "string",
                "format": "date",
                "description": "The date when the pending product offering change is scheduled to occur.",
                "example": "2024-02-01"
              },
              "product": {
                "$ref": "#/components/schemas/EmbeddedProductOffering"
              }
            }
          },
          "activatedAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the license was activated.",
            "example": "2024-01-15"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the license was canceled (if applicable).",
            "example": "2024-06-30"
          },
          "pausedAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the license was paused (if applicable).",
            "example": "2024-03-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "AssignedTo": {
        "description": "The entity that a license is assigned to. A license is always assigned to a subscription.\n",
        "oneOf": [
          {
            "type": "object",
            "title": "Subscription",
            "required": [
              "type",
              "subscriptionId"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "SUBSCRIPTION"
                ],
                "description": "The type of entity the license is assigned to."
              },
              "subscriptionId": {
                "type": "string",
                "description": "The unique identifier of the subscription the license is assigned to.",
                "example": "c9a4d8d4-24c0-4164-ac8d-c77c4103b786"
              }
            }
          }
        ]
      },
      "CreateLicenseRequest": {
        "type": "object",
        "description": "Create a new license.\n\nThe product offering sets the type of the license. A license for an external product is\nstandalone and takes no `assignedTo`. Every other license needs `assignedTo`, and the\nsubscription must belong to the same customer.\n",
        "required": [
          "productOfferingId",
          "customerId"
        ],
        "additionalProperties": false,
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier for the product offering to subscribe to.\n\nThe offering sets the type of the license.\n",
            "example": "a7b8c9d0-e1f2-3456-7890-bcdef0123456"
          },
          "customerId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier for the existing customer who will own this license.",
            "example": "b8c9d0e1-f2a3-4567-8901-cdef01234567"
          },
          "licenseType": {
            "$ref": "#/components/schemas/LicenseType",
            "deprecated": true,
            "description": "Deprecated. The product offering sets the type of the license.\n\nThe platform rejects a value that does not agree with the product offering.\n"
          },
          "assignedTo": {
            "$ref": "#/components/schemas/AssignedTo"
          },
          "scheduleActivationAt": {
            "type": "string",
            "format": "date",
            "description": "Date when the license must be activated. The platform activates the license today when you\nomit this date. A date in the past is not permitted.\n",
            "example": "2024-01-15"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        },
        "example": {
          "productOfferingId": "d0e1f2a3-b4c5-6789-0123-ef0123456789",
          "customerId": "b8c9d0e1-f2a3-4567-8901-cdef01234567",
          "assignedTo": {
            "type": "SUBSCRIPTION",
            "subscriptionId": "c9d0e1f2-a3b4-5678-9012-def012345678"
          },
          "scheduleActivationAt": "2024-01-20"
        }
      },
      "ChangeLicenseProductOfferingRequest": {
        "type": "object",
        "description": "Request to change the product offering of a license.",
        "required": [
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier of the new product offering. Use the product-offering-options endpoint to discover which offerings the license can be changed to.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "Earliest date to perform the change on. If the change schedule doesn't fit this date, the earliest date after this will be chosen.",
            "example": "2024-02-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CancelLicenseRequest": {
        "type": "object",
        "description": "Request to cancel a license.",
        "additionalProperties": false,
        "properties": {
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "The date that the license ends. It cannot be before today. If you give no date, the license ends today.",
            "example": "2024-03-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "ProductCatalogListItem": {
        "type": "object",
        "description": "A product catalog defines a curated set of product offerings for a specific context such as customer segment, region, or sales channel.\n",
        "required": [
          "productCatalogId",
          "name",
          "extendsDefault"
        ],
        "properties": {
          "productCatalogId": {
            "type": "string",
            "description": "Unique identifier for the product catalog.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "Name of the product catalog.",
            "example": "US Consumer Catalog"
          },
          "description": {
            "type": "string",
            "description": "Description of the product catalog.",
            "example": "Product catalog for US consumer customers"
          },
          "extendsDefault": {
            "type": "boolean",
            "description": "Whether this catalog extends the default product catalog. When true, the catalog inherits all offerings from the default catalog in addition to its own."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default catalog for its customer type. A customer with no catalog of their own is served the default one."
          },
          "customerType": {
            "$ref": "#/components/schemas/CustomerType",
            "description": "The kind of customer this catalog serves. Absent on catalogs that have not been assigned a customer type."
          }
        }
      },
      "ProductCatalogSection": {
        "type": "object",
        "description": "A heading in a product catalog, and the product offerings under it in the order that a checkout shows them.\n",
        "required": [
          "productCatalogSectionId",
          "name",
          "productOfferingIds"
        ],
        "properties": {
          "productCatalogSectionId": {
            "type": "string",
            "description": "Unique identifier for the section.",
            "example": "0b6f3c1e-8d2a-4f7b-9c5e-2a1d4e6f8b90"
          },
          "name": {
            "type": "string",
            "description": "The heading of the section.",
            "example": "Mobile plans"
          },
          "description": {
            "type": "string",
            "description": "The text under the heading. Absent when the section has none.",
            "example": "Plans with unlimited calls and texts"
          },
          "productOfferingIds": {
            "type": "array",
            "description": "The product offerings in the section, in display order.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SimType": {
        "type": "string",
        "description": "The technology type of the SIM card.\n\n- PHYSICAL: A plastic SIM card that is shipped and inserted into the device\n- ESIM: An embedded SIM profile that is downloaded digitally to the device, typically via QR code\n",
        "enum": [
          "PHYSICAL",
          "ESIM"
        ]
      },
      "Storefront": {
        "type": "object",
        "description": "The product catalogs that a storefront sells from, and the sections that it shows their product offerings in.\n",
        "required": [
          "customerType",
          "productCatalogIds",
          "sections",
          "productOfferings"
        ],
        "properties": {
          "customerType": {
            "$ref": "#/components/schemas/CustomerType",
            "description": "The kind of customer that these catalogs sell to."
          },
          "productCatalogIds": {
            "type": "array",
            "description": "The product catalogs that the storefront sells from. Empty when no catalog applies.",
            "items": {
              "type": "string"
            }
          },
          "sections": {
            "type": "array",
            "description": "The sections of these catalogs, in display order. A section gives only initial product offerings.",
            "items": {
              "$ref": "#/components/schemas/ProductCatalogSection"
            }
          },
          "initialProductOfferingIds": {
            "type": "array",
            "description": "The initial product offerings of these catalogs. A customer can order them as a new subscription or as an external product.\nA storefront with no sections shows these product offerings.\n",
            "items": {
              "type": "string"
            }
          },
          "productOfferings": {
            "type": "array",
            "description": "The product offerings that these catalogs sell to the caller. A section names its product offerings by their ID, and this list gives their details.\nA customer with the `TestAndTrainingEntity` tag gets the newest `TESTING` version of a product offering in place of the version that the catalog holds.\n",
            "items": {
              "$ref": "#/components/schemas/ProductOffering"
            }
          },
          "simTypes": {
            "type": "array",
            "description": "The SIM types that the storefront sells with a new subscription. A subscription line with another SIM type cannot go through the checkout of the storefront.\nEmpty when the storefront sells no SIM type.\n",
            "items": {
              "$ref": "#/components/schemas/SimType"
            }
          }
        }
      },
      "EmbeddedDiscount": {
        "type": "object",
        "description": "Essential discount information without sensitive details.",
        "required": [
          "discountId",
          "description"
        ],
        "properties": {
          "discountId": {
            "type": "string",
            "description": "The unique identifier for the discount.",
            "example": "80df6fdf-c450-406e-948b-f77d4ac1cdb8"
          },
          "description": {
            "type": "string",
            "description": "A description of what the discount provides.",
            "example": "25% Off Summer Promo"
          },
          "tag": {
            "type": "string",
            "description": "A short label or category for the discount.",
            "example": "SUMMER25"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the discount was created.",
            "example": "2024-01-15T10:30:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the discount was last updated.",
            "example": "2024-01-20T14:45:00Z"
          }
        }
      },
      "Promotion": {
        "type": "object",
        "description": "A promotion that applies a discount when the promotional code is used.",
        "required": [
          "promotionId",
          "discountId",
          "promoCode",
          "discountPeriodMonths",
          "discount"
        ],
        "properties": {
          "promotionId": {
            "type": "string",
            "description": "The unique identifier for the promotion.",
            "example": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          },
          "promoCode": {
            "type": "string",
            "description": "The promotional code that customers can use to activate this promotion.",
            "example": "SUMMER25"
          },
          "discountPeriodMonths": {
            "type": "integer",
            "description": "The number of months the discount will be applied.",
            "example": 12
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "When the promotion becomes valid and can be used.\n\nIf not provided, the promotion is valid immediately.\n"
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "When the promotion expires and can no longer be used.\n\nIf not provided, the promotion does not expire.\n"
          },
          "discountId": {
            "type": "string",
            "description": "The unique identifier for the discount that this promotion applies to.",
            "example": "80df6fdf-c450-406e-948b-f77d4ac1cdb8"
          },
          "discount": {
            "$ref": "#/components/schemas/EmbeddedDiscount"
          }
        }
      },
      "OrderState": {
        "type": "string",
        "description": "The status of an order in its lifecycle.\n\n- PENDING: Order is in cart state, can be modified\n- PENDING_PAYMENT: Order is locked and awaiting payment completion\n- SUBMITTED: Order has been submitted for processing\n- PENDING_APPROVAL: Order is pending approval\n- PROCESSING: Order is being fulfilled\n- COMPLETED: Order has been successfully fulfilled\n- CANCELLED: Order was canceled before completion\n- EXPIRED: Order expired due to inactivity\n- FAILED: Order fulfillment failed\n",
        "enum": [
          "PENDING",
          "PENDING_PAYMENT",
          "SUBMITTED",
          "PENDING_APPROVAL",
          "PROCESSING",
          "COMPLETED",
          "CANCELLED",
          "EXPIRED",
          "FAILED"
        ]
      },
      "OrderListItem": {
        "type": "object",
        "description": "Optimized order representation for list operations.",
        "required": [
          "orderId",
          "state",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The unique identifier for the order.",
            "example": "ce0539b4-ec57-4709-b72e-47892586d05a"
          },
          "state": {
            "$ref": "#/components/schemas/OrderState"
          },
          "customer": {
            "$ref": "#/components/schemas/EmbeddedCustomer"
          },
          "pricing": {
            "type": "object",
            "description": "Summary pricing information for the order.",
            "required": [
              "totalMinor",
              "currency"
            ],
            "additionalProperties": false,
            "properties": {
              "totalMinor": {
                "type": "integer",
                "format": "int64",
                "description": "Final order total including all taxes and fees, in minor currency units.",
                "example": 13739
              },
              "currency": {
                "type": "string",
                "description": "ISO 4217 currency code.",
                "example": "USD"
              }
            }
          },
          "validationStatus": {
            "type": "string",
            "enum": [
              "VALID",
              "INVALID",
              "PENDING_VALIDATION"
            ],
            "description": "Whether the order is complete and ready for submission. Fetch the full order to see which fields are missing or invalid."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was last updated.",
            "example": "2024-01-15T10:30:00Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order will expire if not submitted.",
            "example": "2024-01-22T10:30:00Z"
          }
        }
      },
      "OrderCustomerType": {
        "$ref": "#/components/schemas/CustomerType",
        "description": "The type of customer this order is for. This scopes the order to the customer type's context,\nwhich affects which product offerings can be ordered, who is authorized to place the order, and what is required to submit it.\n\nFor logged in orders, this must match the customer's type.\n"
      },
      "OrderUserReference_NewUser": {
        "type": "object",
        "title": "NewUser",
        "additionalProperties": false,
        "required": [
          "name",
          "email"
        ],
        "description": "Details for creating a new user together with the order. The user is created when payment\nis initiated, or at submission for orders that collect no payment, and can then log in to\nmanage the services they ordered.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "The user's full name.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email the user logs in with and receives order confirmations on.",
            "example": "john.doe@example.com"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The user's phone number.",
            "example": "+15551234567"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "deprecated": true,
            "description": "Deprecated. The platform does not store this address. A user is a sign-in\nidentity, and the address of the person belongs to the customer that pays.\nGive the address in `customer` instead.\n"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "OrderUserReference": {
        "oneOf": [
          {
            "type": "object",
            "title": "ExistingUserById",
            "additionalProperties": false,
            "required": [
              "userId"
            ],
            "description": "Reference to an existing user. Only accepted from an authenticated caller who is that user or\nis authorized for their organisation.\n",
            "properties": {
              "userId": {
                "type": "string",
                "description": "The user's internal ID.",
                "example": "d47ac10b-58cc-4372-a567-0e02b2c3d479"
              }
            }
          },
          {
            "type": "object",
            "title": "AuthenticatedUser",
            "additionalProperties": false,
            "required": [
              "authenticatedUser"
            ],
            "description": "Use the authenticated user the request is made on behalf of, without naming them.\nRequires a bearer token for that user; an anonymous caller is refused.\n",
            "properties": {
              "authenticatedUser": {
                "type": "boolean",
                "description": "Always true.",
                "example": true
              }
            }
          },
          {
            "$ref": "#/components/schemas/OrderUserReference_NewUser"
          }
        ],
        "description": "The person who will log in and manage the services in this order. Provide a userId for a\nreturning user, let the authenticated user be resolved from their token, or provide details to\ncreate a new user together with the order.\n"
      },
      "OrderCustomerReference_NewCustomer": {
        "type": "object",
        "title": "NewCustomer",
        "required": [
          "name",
          "customerType"
        ],
        "description": "Details for creating a new customer together with the order.\n\nThe customer's default payment profile can be set via the save payment profile endpoint once the customer is created.\n\nIf referenceId is provided and a customer already exists with that referenceId,\nthe existing customer will be used instead of creating a new one.\n",
        "properties": {
          "referenceId": {
            "type": "string",
            "description": "Optional reference ID to assign to the new customer. If a customer with\nthis referenceId already exists, that customer will be used instead of\ncreating a new one.\n",
            "example": "crm-customer-12345",
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "Name for the new customer.",
            "example": "Acme Corporation"
          },
          "customerType": {
            "$ref": "#/components/schemas/CustomerType"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "preferredLocale": {
            "type": "string",
            "description": "Preferred locale for the customer.",
            "example": "en-US"
          },
          "contact": {
            "type": "object",
            "description": "Contact information for the new customer.",
            "additionalProperties": false,
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "description": "Primary contact email for the new customer.",
                "example": "billing@acme.com"
              },
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "Primary contact phone number for the new customer.",
                "example": "+15551234567"
              }
            }
          },
          "billing": {
            "type": "object",
            "description": "Billing configuration and payment preferences for the new customer.",
            "required": [
              "method",
              "currency"
            ],
            "additionalProperties": false,
            "properties": {
              "method": {
                "$ref": "#/components/schemas/CustomerBillingMethod",
                "description": "How invoices should be delivered to the customer."
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "The email address to send invoices to.\nRequired if billing method is EMAIL_INVOICE.\n",
                "example": "billing@acme.com"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The billing address of the customer. A paper invoice goes to this address, and it decides the tax of each charge.\n\nA subscription with no service address of its own is served at this address. A delivery goes to this address when the customer holds no shipping address.\n"
              },
              "currency": {
                "$ref": "#/components/schemas/Currency",
                "description": "The currency for customer billing and payments."
              },
              "autoPay": {
                "type": "boolean",
                "description": "Whether to automatically charge the default payment profile for invoices and bills.\nRequires defaultPaymentProfileId to be set to have any effect.\n",
                "example": true,
                "default": false
              }
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "OrderCustomerReference": {
        "oneOf": [
          {
            "type": "object",
            "title": "ExistingCustomerById",
            "additionalProperties": false,
            "required": [
              "customerId"
            ],
            "description": "Reference to an existing customer by internal ID or external reference ID.\nOnly accepted from an authenticated caller who is authorized for that customer.\n",
            "properties": {
              "customerId": {
                "type": "string",
                "description": "The customer's internal ID (UUID) or external reference ID.\nBoth formats are accepted and will be resolved automatically.\n",
                "example": "a47ac10b-58cc-4372-a567-0e02b2c3d479"
              }
            }
          },
          {
            "type": "object",
            "title": "AuthenticatedCustomer",
            "additionalProperties": false,
            "required": [
              "authenticatedCustomer"
            ],
            "description": "Use the customer of the authenticated user the request is made on behalf of, without naming it.\nRequires a bearer token for that user; an anonymous caller is refused.\n",
            "properties": {
              "authenticatedCustomer": {
                "type": "boolean",
                "description": "Always true.",
                "example": true
              }
            }
          },
          {
            "$ref": "#/components/schemas/OrderCustomerReference_NewCustomer"
          }
        ],
        "description": "Reference to a customer of the order. Provide a customerId (which accepts both internal UUIDs and external reference IDs),\nlet the authenticated user's own customer be resolved, or provide details to create a new customer.\n"
      },
      "OrderBillingInput": {
        "type": "object",
        "description": "Billing information for an order.\n\nFor existing customers, we suggest you pre-fill this with the customer's billing information,\nhowever it is possible to override this at the order level.\n",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Billing contact name.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Billing contact email.",
            "example": "billing@example.com"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The billing address that this order holds. It is a record of the order, and it does not change the billing address of the customer.\n\nThe platform reads it for tax only when the customer holds no billing address.\n"
          }
        }
      },
      "ShippingInput": {
        "type": "object",
        "description": "Shipping information for order fulfillment. Only required if the order contains shippable items.",
        "required": [
          "name",
          "address"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the person or department receiving the delivery, printed on the shipping label.",
            "example": "John Doe"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "Phone number the carrier can use to reach the recipient about the delivery.",
            "example": "+15551234567"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address that the physical items of this order go to. It is a record of the order, and it does not change the shipping address of the customer."
          },
          "instructions": {
            "type": "string",
            "description": "Free-text delivery instructions passed along with the shipment, such as a gate code or drop-off preference.",
            "example": "Leave at front door"
          }
        }
      },
      "LineItemSim": {
        "type": "object",
        "title": "Line Item SIM",
        "description": "The choice between eSIM and physical SIM plus related device details.",
        "additionalProperties": false,
        "required": [
          "esim"
        ],
        "properties": {
          "esim": {
            "type": "boolean",
            "description": "Whether this line item uses eSIM technology.",
            "example": true
          },
          "imei": {
            "x-pii": "KIND_IMEI_HARDWARE_ID",
            "type": "string",
            "description": "International Mobile Equipment Identity for eSIM activation.\n\nSome networks require this to activate the eSIM.\n",
            "example": "356938035643809"
          },
          "iccid": {
            "x-pii": "KIND_SIM_ID",
            "type": "string",
            "description": "Integrated Circuit Card identifier for existing SIM.\nProvide if using a pre-existing SIM card.\n\nThis feature only applies to certain networks.\n",
            "example": "8931440400000000000"
          }
        }
      },
      "OrderLineItemStatus": {
        "type": "string",
        "description": "The fulfillment status of an order line item.\n\nAn order fulfills all its line items or none of them. Thus the status follows the order `state`,\nand each line item of one order has the same status. The status does not show when the network\nprovisions a subscription or an add-on. The `order.updated` event carries the order again when\nthe network provisions an entity of the order.\n",
        "enum": [
          "PENDING",
          "RUNNING",
          "COMPLETED",
          "FAILED"
        ]
      },
      "SubscriptionLineItem": {
        "type": "object",
        "title": "Subscription",
        "description": "Create a new subscription in this order. This will set up a new phone service for a customer with their chosen plan and phone number.",
        "required": [
          "type",
          "lineItemId",
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SUBSCRIPTION"
            ],
            "description": "Identifies this line item as a new subscription purchase. Always SUBSCRIPTION."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-1"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The product offering to create a subscription for.",
            "example": "mobile-plan-basic"
          },
          "msisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "string",
            "description": "The phone number for this subscription.\n- Leave empty to have one assigned.\n- When the number pool is available, you can choose a number from the pool and provide the leaseToken.\n- When porting a number, provide the number and porting details.\n",
            "example": "+15551234567"
          },
          "leaseToken": {
            "type": "string",
            "description": "Token received when leasing a number. Required when an msisdn is provided from the number pool.",
            "example": "lease_8f3b1c2d4e5f6789"
          },
          "tempNumber": {
            "type": "boolean",
            "description": "Whether to use a temporary number until the porting is completed.\n\nIf true, a temporary number will be assigned and activated as soon as possible until the porting is finalized.\n\nCan only be used when porting in a number (i.e., when msisdn and porting details are provided).\n",
            "example": true
          },
          "portingRequested": {
            "type": "boolean",
            "description": "If true, the number is a port-in.",
            "example": true
          },
          "porting": {
            "type": "object",
            "description": "Details needed to port in a number for this subscription.",
            "required": [
              "details"
            ],
            "additionalProperties": false,
            "properties": {
              "details": {
                "$ref": "#/components/schemas/PortingDetails"
              }
            }
          },
          "extensions": {
            "type": "object",
            "description": "Additional subscription extensions fields for custom subscription types.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "display": {
            "type": "string",
            "description": "Custom display name for the subscription. If not provided, will be auto-generated from msisdn.",
            "example": "John Doe - Work phone"
          },
          "subscriber": {
            "type": "object",
            "description": "The person who will use this subscription, including their name, contact details, and service address. Optional while the order is a draft, but must be provided before the order can be submitted.",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the subscriber.",
                "example": "John Doe"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "Contact email of the subscriber.",
                "example": "john.doe@example.com"
              },
              "msisdn": {
                "type": "string",
                "format": "phone",
                "description": "Contact phone number of the subscriber. May be the same as the subscription's msisdn.",
                "example": "+15551234567"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The address where the subscriber uses this subscription. In the US, this is the E911 address.\n\nGive it only when it is different from the billing address of the customer. The subscription then holds it as its service address. A subscription with no address of its own is served at the billing address.\n"
              }
            }
          },
          "sim": {
            "$ref": "#/components/schemas/LineItemSim",
            "description": "The choice between eSIM and physical SIM plus related device details.\n\nThis value is optional while the order is a draft. You must give it before you submit the order.\n"
          },
          "scheduleActivationAt": {
            "type": "string",
            "format": "date",
            "description": "Date when the subscription should be activated. Cannot be combined with activateOnDemand.",
            "example": "2024-02-01"
          },
          "activateOnDemand": {
            "type": "boolean",
            "description": "Whether the subscription waits for the subscriber to activate it rather than being activated on a date.\n\nThe subscription is created when the order is fulfilled and stays pending until the subscriber\nrequests activation; only then is it activated in the network. Use this when the subscriber decides\nwhen their service starts, for example a SIM shipped ahead of time.\n\nCannot be combined with scheduleActivationAt.\n",
            "example": true
          },
          "parentLineItemId": {
            "type": "string",
            "description": "The line item in this same order that this line item belongs to.\n\nOn a subscription line item, only a data SIM can give it, and the parent must be a\ncell subscription line item. The data SIM gets the subscriber and the activation of\nthe parent and shares its data. Do not also give `subscriber`, `scheduleActivationAt`\nor `activateOnDemand`.\n",
            "example": "line-item-1"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "AddonLineItem": {
        "type": "object",
        "title": "Add-on",
        "description": "Line item for adding an add-on to a subscription.",
        "required": [
          "type",
          "lineItemId",
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "ADDON"
            ],
            "description": "Identifies this line item as adding an add-on to a subscription. Always ADDON."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-3"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The add-on product offering to add.",
            "example": "addon-data-5gb"
          },
          "subscriptionId": {
            "type": "string",
            "description": "An existing subscription to add the add-on to.\n\nEither this or `parentLineItemId` must be provided.\n",
            "example": "subscription-456"
          },
          "parentLineItemId": {
            "type": "string",
            "description": "Reference to parent subscription line item in this same order.\n\nEither this or `subscriptionId` must be provided.\n",
            "example": "line-item-1"
          },
          "scheduledAt": {
            "type": "string",
            "format": "date",
            "description": "When to activate the add-on.",
            "example": "2024-02-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "ExternalProductLineItem": {
        "type": "object",
        "title": "External Product",
        "description": "Line item for purchasing a catalog product that is fulfilled outside the platform. The order records the sale while fulfillment happens in your own systems.",
        "required": [
          "type",
          "lineItemId",
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EXTERNAL_PRODUCT"
            ],
            "description": "Identifies this line item as a catalog product fulfilled outside the platform. Always EXTERNAL_PRODUCT."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-5"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The external product offering from the catalog.",
            "example": "external-device-iphone15"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "description": "Quantity of the external product.",
            "example": 2
          },
          "parentLineItemId": {
            "type": "string",
            "description": "Reference to parent line item in this order.",
            "example": "line-item-1"
          },
          "scheduleActivationAt": {
            "type": "string",
            "format": "date",
            "description": "Date when the external product must be activated. The order activates it on the day of fulfillment when you omit this date.",
            "example": "2024-02-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "ExternalLineItem": {
        "type": "object",
        "title": "External Item",
        "description": "Line item for selling an externally managed product or service that is not in the product catalog. You define the name, price, and taxation, and can optionally receive a webhook to fulfill the item yourself.",
        "required": [
          "type",
          "lineItemId",
          "name",
          "price"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EXTERNAL"
            ],
            "description": "Identifies this line item as an externally managed product or service that is not in the product catalog. Always EXTERNAL."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-6"
          },
          "name": {
            "type": "string",
            "description": "Name of the external item.",
            "example": "Custom Installation Service"
          },
          "description": {
            "type": "string",
            "description": "Description of the external item.",
            "example": "Professional on-site installation and setup"
          },
          "price": {
            "type": "object",
            "description": "Custom pricing for the external item.",
            "required": [
              "amountMinor",
              "currency"
            ],
            "additionalProperties": false,
            "properties": {
              "amountMinor": {
                "type": "integer",
                "format": "int64",
                "description": "The price per unit, in minor units of the currency (e.g., 9999 = $99.99 when the currency is USD).",
                "example": 9999
              },
              "currency": {
                "type": "string",
                "description": "The ISO 4217 currency code the price is expressed in. Must match the order currency.",
                "example": "USD"
              }
            }
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "description": "Quantity of the external item.",
            "example": 1
          },
          "taxationId": {
            "type": "string",
            "description": "US taxation ID for tax calculation.",
            "example": "TAX123456"
          },
          "fulfillmentWebhook": {
            "type": "string",
            "format": "uri",
            "description": "Optional webhook URL for fulfillment notifications.",
            "example": "https://partner.com/webhooks/fulfillment"
          },
          "parentLineItemId": {
            "type": "string",
            "description": "Reference to parent line item in this order.",
            "example": "line-item-1"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "SubscriptionPlanChange": {
        "type": "object",
        "title": "Subscription Plan Change",
        "description": "A change of the product of a subscription.\n",
        "additionalProperties": false,
        "required": [
          "productOfferingId"
        ],
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The plan offering to change to. The platform refuses an offering in the SIM card category.\n",
            "example": "mobile-plan-premium"
          }
        }
      },
      "SubscriptionSimChange": {
        "type": "object",
        "title": "Subscription SIM Change",
        "description": "A change of the SIM card of a subscription. The change carries a one-time price.\n",
        "additionalProperties": false,
        "required": [
          "productOfferingId"
        ],
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The SIM card offering to change to. The offering must be in the SIM card category.\n",
            "example": "sim-card-replacement"
          },
          "sim": {
            "$ref": "#/components/schemas/LineItemSim",
            "description": "The SIM card of the change.\n\nThe product offering decides the SIM type. The platform refuses an esim value that disagrees with the offering. Give the value only to state what you expect.\n\nThe iccid is optional. Give it to name a card you already hold. Without it the SIM pool supplies the card, the same way it does for a new subscription.\n"
          }
        }
      },
      "SubscriptionChangeLineItem": {
        "type": "object",
        "title": "Subscription Change",
        "description": "Line item that changes an existing subscription.\n\nThe changeType field says what the line item changes. Give the variant of that kind. Each variant carries the product offering of its own kind. The schedule date applies to every kind, so it stays on the line item.\n",
        "required": [
          "type",
          "lineItemId",
          "subscriptionId",
          "changeType"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SUBSCRIPTION_CHANGE"
            ],
            "description": "Identifies this line item as a change to an existing subscription. Always SUBSCRIPTION_CHANGE."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-7"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The identifier of the existing subscription that this line item changes.",
            "example": "subscription-456"
          },
          "changeType": {
            "type": "string",
            "enum": [
              "PLAN_CHANGE",
              "SIM_CHANGE"
            ],
            "description": "What this line item changes.\n\nPLAN_CHANGE changes the product of the subscription. SIM_CHANGE changes the SIM card of the subscription.\n\nThe category of the product offering must agree with this value. The platform refuses a SIM card offering under PLAN_CHANGE, and a plan offering under SIM_CHANGE.\n",
            "example": "PLAN_CHANGE"
          },
          "planChange": {
            "$ref": "#/components/schemas/SubscriptionPlanChange",
            "description": "The plan change. Give this value only for changeType PLAN_CHANGE.\n"
          },
          "simChange": {
            "$ref": "#/components/schemas/SubscriptionSimChange",
            "description": "The SIM card change. Give this value only for changeType SIM_CHANGE.\n"
          },
          "scheduleDate": {
            "type": "string",
            "format": "date",
            "description": "Earliest date to perform the change on. If the change schedule does not fit this date, the platform selects the earliest date after it.\n",
            "example": "2024-02-01"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "AddonPlanChange": {
        "type": "object",
        "title": "Add-on Plan Change",
        "description": "A change of the product of an add-on.\n",
        "additionalProperties": false,
        "required": [
          "productOfferingId"
        ],
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The add-on offering to change to.\n",
            "example": "addon-data-5gb"
          }
        }
      },
      "AddonChangeLineItem": {
        "type": "object",
        "title": "Add-on Change",
        "description": "Line item that changes an add-on of a subscription.\n\nThe changeType field says what the line item changes. Give the variant of that kind. Each variant carries the product offering of its own kind. The schedule date applies to every kind, so it stays on the line item.\n",
        "required": [
          "type",
          "lineItemId",
          "subscriptionId",
          "addonId",
          "changeType"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "ADDON_CHANGE"
            ],
            "description": "Identifies this line item as a change to an existing add-on. Always ADDON_CHANGE."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-9"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription containing the add-on to modify.",
            "example": "subscription-456"
          },
          "addonId": {
            "type": "string",
            "description": "The identifier of the existing add-on on the subscription that this line item changes.",
            "example": "addon-123"
          },
          "changeType": {
            "type": "string",
            "enum": [
              "PLAN_CHANGE"
            ],
            "description": "What this line item changes.\n\nPLAN_CHANGE changes the product of the add-on.\n",
            "example": "PLAN_CHANGE"
          },
          "planChange": {
            "$ref": "#/components/schemas/AddonPlanChange",
            "description": "The plan change. Give this value only for changeType PLAN_CHANGE.\n"
          },
          "scheduleDate": {
            "type": "string",
            "format": "date",
            "description": "Earliest date to perform the change on. If the change schedule does not fit this date, the platform selects the earliest date after it.\n",
            "example": "2024-02-01"
          },
          "reason": {
            "type": "string",
            "description": "Free-text note recording why the add-on is being changed, kept with the order for audit and support follow-up.",
            "example": "Customer upgrade request"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "LicenseChangeLineItem": {
        "type": "object",
        "title": "License Change",
        "description": "Line item that changes the product offering of an existing standalone license, for example from a basic to a premium plan of an external product. An order holds at most one line item for each license.\n\nThe platform selects the date of the change. An upgrade applies on the day of fulfillment, and the order charges the difference for the period that the customer paid already. A downgrade of a prepaid license applies on the next payment date, and the order charges nothing.\n",
        "required": [
          "type",
          "lineItemId",
          "licenseId",
          "productOfferingId"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "LICENSE_CHANGE"
            ],
            "description": "Identifies this line item as a change to an existing license. Always LICENSE_CHANGE."
          },
          "lineItemId": {
            "type": "string",
            "description": "Unique identifier for this line item within the order.",
            "example": "line-item-7"
          },
          "licenseId": {
            "type": "string",
            "description": "The license of the customer of the order that this line item changes. Only a manager of the customer can change a license. For a caller below manager, the order refuses the line with `license_not_found`.",
            "example": "0c0f5f8e-3b7a-4d55-9c3e-2f6f2a1b9d41"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The product offering that the license changes to. Get the permitted offerings from the product offering options of the license.",
            "example": "external-music-premium"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "status": {
            "$ref": "#/components/schemas/OrderLineItemStatus",
            "readOnly": true,
            "deprecated": true,
            "description": "Deprecated. Use `state` on the order.\n\nAn order fulfills all its line items or none of them, so every line item of\nan order reports what the order's own `state` already gives you.\n"
          }
        }
      },
      "OrderLineItem": {
        "description": "A line item in an order representing a billable action or service.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SubscriptionLineItem"
          },
          {
            "$ref": "#/components/schemas/AddonLineItem"
          },
          {
            "$ref": "#/components/schemas/ExternalProductLineItem"
          },
          {
            "$ref": "#/components/schemas/ExternalLineItem"
          },
          {
            "$ref": "#/components/schemas/SubscriptionChangeLineItem"
          },
          {
            "$ref": "#/components/schemas/AddonChangeLineItem"
          },
          {
            "$ref": "#/components/schemas/LicenseChangeLineItem"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "SUBSCRIPTION": "#/components/schemas/SubscriptionLineItem",
            "ADDON": "#/components/schemas/AddonLineItem",
            "EXTERNAL_PRODUCT": "#/components/schemas/ExternalProductLineItem",
            "EXTERNAL": "#/components/schemas/ExternalLineItem",
            "SUBSCRIPTION_CHANGE": "#/components/schemas/SubscriptionChangeLineItem",
            "ADDON_CHANGE": "#/components/schemas/AddonChangeLineItem",
            "LICENSE_CHANGE": "#/components/schemas/LicenseChangeLineItem"
          }
        }
      },
      "Consents": {
        "type": "object",
        "description": "The consents and acknowledgments the customer gave when placing the order, such as accepting terms of service or opting in to marketing.\nKeys name the consent and values record what was agreed to, so the consent can be audited later.\n",
        "additionalProperties": {
          "type": "string"
        },
        "example": {
          "termsOfService": "true",
          "marketing": "true"
        }
      },
      "CreateOrderRequest": {
        "type": "object",
        "description": "Request to create a new order. Orders can be created with minimal information\nand progressively configured. User and customer information can be added later,\nincluding through mid-flow authentication.\n",
        "additionalProperties": false,
        "required": [
          "customerType"
        ],
        "properties": {
          "customerType": {
            "$ref": "#/components/schemas/OrderCustomerType"
          },
          "user": {
            "$ref": "#/components/schemas/OrderUserReference"
          },
          "customer": {
            "$ref": "#/components/schemas/OrderCustomerReference"
          },
          "billing": {
            "$ref": "#/components/schemas/OrderBillingInput"
          },
          "shipping": {
            "$ref": "#/components/schemas/ShippingInput"
          },
          "lineItems": {
            "type": "array",
            "description": "Initial line items for the order (can be empty).",
            "items": {
              "$ref": "#/components/schemas/OrderLineItem"
            }
          },
          "consents": {
            "$ref": "#/components/schemas/Consents"
          },
          "promoCode": {
            "type": "string",
            "description": "Promo code to apply to the order. Rejected with `internalCode` 4119 when no promotion has\nthat code, or when it is outside its validity period.\n",
            "example": "SUMMER2023"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "OrderUserResult": {
        "type": "object",
        "description": "The person who will log in and manage the services in this order.\n\nFor a new user, userId is absent until the user is actually created, which happens when\npayment is initiated or, for orders that collect no payment, at submission.\n",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The user's identifier, once the user exists.",
            "example": "c47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "The user's full name.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email the user logs in with.",
            "example": "john.doe@example.com"
          },
          "newUser": {
            "type": "boolean",
            "description": "Whether this user is created as part of fulfilling the order.",
            "example": true
          }
        },
        "required": [
          "newUser"
        ]
      },
      "OrderCustomerResult": {
        "type": "object",
        "description": "The customer associated with this order. Includes minimal details about the customer\nand creation details if the customer was created during order fulfillment.\n",
        "properties": {
          "customerId": {
            "type": "string",
            "description": "The unique identifier for the customer. For new customers, set once the customer has been created during fulfillment.",
            "example": "b47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "customerType": {
            "$ref": "#/components/schemas/CustomerType"
          },
          "name": {
            "type": "string",
            "description": "Customer name.",
            "example": "John Doe"
          },
          "newCustomer": {
            "type": "boolean",
            "description": "Indicates if the customer was/will be created as part of order fulfillment.",
            "example": true
          },
          "emailVerified": {
            "type": "boolean",
            "x-pii": "KIND_NONE",
            "description": "Indicates if a code that we sent to the contact email of the new customer was verified. It is false for an existing customer.",
            "example": false
          }
        },
        "required": [
          "customerType",
          "name",
          "newCustomer"
        ]
      },
      "OrderBilling": {
        "type": "object",
        "description": "Billing information for an order.\n\nFor existing customers, we suggest you pre-fill this with the customer's billing information,\nhowever it is possible to override this at the order level.\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "Billing contact name.",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Billing contact email.",
            "example": "billing@example.com"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The billing address that this order holds. It is a record of the order, and it does not change the billing address of the customer.\n\nThe platform reads it for tax only when the customer holds no billing address.\n"
          }
        }
      },
      "Shipping": {
        "type": "object",
        "description": "Shipping information for order fulfillment. Only required if the order contains shippable items.",
        "required": [
          "name",
          "address"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the person or department receiving the delivery, printed on the shipping label.",
            "example": "John Doe"
          },
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "Phone number the carrier can use to reach the recipient about the delivery.",
            "example": "+15551234567"
          },
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address that the physical items of this order go to. It is a record of the order, and it does not change the shipping address of the customer."
          },
          "instructions": {
            "type": "string",
            "description": "Free-text delivery instructions passed along with the shipment, such as a gate code or drop-off preference.",
            "example": "Leave at front door"
          }
        }
      },
      "OrderPricingSummary": {
        "type": "object",
        "description": "The price of an order, recalculated whenever the order changes. In regions with complex tax\nrules (e.g., the US), tax is resolved per jurisdiction from the order's addresses. In other\nregions, tax depends on customer type but is typically included.\n\nAll amounts are in minor units of the currency (e.g., 13739 = $137.39 when the currency is USD).\n",
        "required": [
          "totalMinor",
          "currency",
          "calculatedAt"
        ],
        "properties": {
          "subtotalMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The net of the order after discounts, in minor currency units. When `taxIncluded` is false,\nadd the `totalDiscountsMinor` of each line item to it to get the amount before discounts.\nWhen `taxIncluded` is true, the discounts came off the total instead, so the amount before\ndiscounts is `totalMinor` plus the discounts.\n",
            "example": 12599
          },
          "taxAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Tax amount for the order, in minor currency units.\nSet to 0 for orders that will be invoiced separately.\n",
            "example": 1008
          },
          "totalMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Total amount due for the order, in minor currency units.",
            "example": 13739
          },
          "amountDueNowMinor": {
            "type": "integer",
            "format": "int64",
            "description": "What the checkout collects when the order is placed, in minor currency units. Zero for an\norder that is invoiced instead, such as a postpaid subscription billed each month.\n\nThis is not `totalMinor`, which answers what the order costs however it is paid. Use this\none to decide whether to ask for a payment method.\n",
            "example": 13739
          },
          "taxIncluded": {
            "type": "boolean",
            "description": "Whether every line was priced with its tax as a part of the price. When true, the discounts\ncame off `totalMinor` and `taxAmountMinor` is the tax inside it. When false, the discounts\ncame off `subtotalMinor` and the tax was added on top. Absent when the order has no priced\nline yet.\n",
            "example": true
          },
          "taxEstimated": {
            "type": "boolean",
            "description": "Whether the amounts leave out a tax that is not calculated yet. In a region where the tax\ndepends on the address, the tax is calculated when the payment starts, and this field is\ntrue until then. When `taxIncluded` is also true, the tax is a part of `totalMinor`.\nOtherwise the tax is added to it.\n",
            "example": false
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code for all pricing amounts (e.g., \"USD\").",
            "example": "USD"
          },
          "recurringCosts": {
            "type": "object",
            "description": "Expected recurring costs after the initial period.\nRepresents the typical monthly/billing cycle charges.\n\nA discount that ends with the periods paid for up front is not applied here.\n",
            "additionalProperties": false,
            "properties": {
              "subtotalMinor": {
                "type": "integer",
                "format": "int64",
                "description": "Recurring subtotal after discounts and before taxes, in minor currency units.",
                "example": 2999
              },
              "totalMinor": {
                "type": "integer",
                "format": "int64",
                "description": "Total estimated recurring amount, in minor currency units.",
                "example": 3239
              },
              "taxAmountMinor": {
                "type": "integer",
                "format": "int64",
                "description": "Estimated tax on recurring charges, in minor currency units.\n\nOnly calculated in certain regions. In the US, taxes are calculated at\nthe time of invoicing and are not estimated here.\n",
                "example": 240
              },
              "taxIncluded": {
                "type": "boolean",
                "description": "Whether every line in this total was priced with its tax as a part of the price.",
                "example": true
              },
              "billingCycle": {
                "$ref": "#/components/schemas/BillingCycle"
              }
            }
          },
          "initialInvoice": {
            "type": "object",
            "description": "Optional breakdown for the first invoice when different from recurring.\nUsed for prorated charges, first-month adjustments, etc.\n",
            "additionalProperties": false,
            "properties": {
              "subtotalMinor": {
                "type": "integer",
                "format": "int64",
                "description": "First invoice subtotal (e.g., prorated amount, setup fees), in minor currency units.",
                "example": 1450
              },
              "totalMinor": {
                "type": "integer",
                "format": "int64",
                "description": "Total first invoice amount, in minor currency units.",
                "example": 1566
              },
              "taxAmountMinor": {
                "type": "integer",
                "format": "int64",
                "description": "Estimated tax on initial invoice charges, in minor currency units.\n\nOnly calculated in certain regions. In the US, taxes are calculated at\nthe time of invoicing and are not estimated here.\n",
                "example": 116
              },
              "taxIncluded": {
                "type": "boolean",
                "description": "Whether every line in this total was priced with its tax as a part of the price.",
                "example": true
              },
              "period": {
                "type": "object",
                "description": "Period covered by the initial invoice.",
                "additionalProperties": false,
                "properties": {
                  "start": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date of the initial billing period.",
                    "example": "2024-01-15"
                  },
                  "end": {
                    "type": "string",
                    "format": "date",
                    "description": "End date of the initial billing period.",
                    "example": "2024-01-31"
                  }
                }
              }
            }
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the pricing was last calculated.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "TaxBreakdownItem": {
        "type": "object",
        "description": "A single tax or fee contributing to the total tax on a charge, such as state sales tax or a regulatory fee.",
        "required": [
          "description",
          "amountMinor"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Human-readable name of the tax or fee, suitable for display on invoices and receipts.",
            "example": "Sales Tax"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount charged for this tax component, in minor units of the currency of the transaction.",
            "example": 240
          },
          "rate": {
            "type": "number",
            "format": "decimal",
            "description": "The tax rate applied, as a percentage (e.g., 8.25 for 8.25%). Omitted for flat fees that are not rate-based.",
            "example": 8.25
          }
        }
      },
      "OrderPricingDiscount": {
        "type": "object",
        "description": "One reduction applied to a line item, with where it came from and how long it lasts. Use `source`\nto tell a reduction the customer earned from one that every price carries, and `validTo` to tell\nthe customer when the price goes back up.\n",
        "required": [
          "name",
          "amountMinor"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Discount name or description.",
            "example": "First month free"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Discount amount (positive value), in minor currency units.",
            "example": 2999
          },
          "source": {
            "$ref": "#/components/schemas/DiscountSource",
            "description": "What gave the customer the discount. Omitted on an order priced before this field existed."
          },
          "validFrom": {
            "type": "string",
            "format": "date",
            "description": "The first day the discount comes off the price."
          },
          "validTo": {
            "type": "string",
            "format": "date",
            "description": "The last day the discount comes off the price. Omitted when the discount never stops.\n"
          }
        }
      },
      "OrderLineItemPricing": {
        "type": "object",
        "description": "The calculated price of a single order line item, with its tax, fee, and discount breakdown.\nReturned by the order price calculation endpoint so you can show a per-item breakdown\nbefore the order is submitted. All amounts are in minor units of the order currency\n(e.g., 2999 = $29.99 when the currency is USD).\n",
        "required": [
          "lineItemId",
          "subtotalMinor",
          "totalMinor"
        ],
        "properties": {
          "lineItemId": {
            "type": "string",
            "description": "The line item in the order that this pricing applies to.",
            "example": "line-item-1"
          },
          "subtotalMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The net of this line item after discounts, in minor currency units. When `taxIncluded` is\nfalse, add `totalDiscountsMinor` to it to get the amount before discounts. When `taxIncluded`\nis true, the discounts came off `totalMinor` instead.\n",
            "example": 2999
          },
          "totalMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Amount due for this line item after taxes, fees, and discounts, in minor currency units.",
            "example": 2747
          },
          "taxBreakdown": {
            "type": "array",
            "description": "The individual taxes and regulatory fees making up `taxAmountMinor`, as reported by the tax authority for this line item.",
            "items": {
              "$ref": "#/components/schemas/TaxBreakdownItem"
            }
          },
          "taxAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Total taxes for this line item, in minor currency units.",
            "example": 247
          },
          "taxIncluded": {
            "type": "boolean",
            "description": "Whether the line was priced with its tax as a part of the price. When true, `totalMinor` is\nthe listed price less the discounts and `taxAmountMinor` is the tax inside it.\n",
            "example": true
          },
          "discounts": {
            "type": "array",
            "description": "The individual discounts making up `totalDiscountsMinor`, such as a campaign, a promotion\ncode, a price list reduction or a binding period discount. The amounts cover everything this\norder charges for the line, which is more than one billing period when the order pays for\nseveral at once.\n",
            "items": {
              "$ref": "#/components/schemas/OrderPricingDiscount"
            }
          },
          "recurringDiscounts": {
            "type": "array",
            "description": "The individual discounts inside `recurringAmountMinor`, for one billing period. Add back the\nones that carry a `validTo` to get what the line costs after they stop.\n",
            "items": {
              "$ref": "#/components/schemas/OrderPricingDiscount"
            }
          },
          "totalDiscountsMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Total discounts for this line item, in minor currency units.",
            "example": 2999
          },
          "description": {
            "type": "string",
            "description": "Description of what this line item covers.",
            "example": "Premium Plan"
          },
          "recurringAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Recurring cost for this line item per billing cycle, in minor currency units.",
            "example": 2999
          },
          "chargedMonthAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "What one month this order charges for costs, in minor currency units. Quote this next to\n`totalMinor` on an order that pays for several months at once, because `recurringAmountMinor`\nis what a month costs once the order renews, which is more. Do not divide `totalMinor` by\n`chargedMonths` instead: on a brand that bills calendar months, the order also charges a\nprorated part-month, and that part is in `totalMinor` but not in these two fields.\n",
            "example": 14458
          },
          "chargedMonths": {
            "type": "integer",
            "description": "How many consecutive months cost `chargedMonthAmountMinor`. A part-month first period is not\none of them. The count stops at the first month that costs something else, which is when a\ndiscount ends part way through the months the order pays for.\n",
            "example": 6
          },
          "initialInvoiceAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "Amount for this line item on the first invoice when different from recurring, in minor currency units.",
            "example": 1450
          }
        }
      },
      "OrderPricing": {
        "description": "Detailed pricing information for an order including taxes and discounts.",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderPricingSummary"
          },
          {
            "properties": {
              "lineItems": {
                "description": "Pricing breakdown per line item.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrderLineItemPricing"
                }
              }
            }
          }
        ]
      },
      "InlineValidationError": {
        "type": "object",
        "description": "A single validation problem reported on an entity, explaining what must be corrected.\nFor example, orders return these for anything that blocks submission.\n",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Validation error message.",
            "example": "Subscriber name is required."
          },
          "property": {
            "type": "string",
            "description": "Property related to the error, if applicable. May be nested using dot notation (e.g., \"customer.email\").",
            "example": "subscriber.name"
          },
          "reason": {
            "type": "string",
            "description": "Names the problem. `property_required` is a missing value, `property_invalid` is a value with\nthe wrong format, and `property_conflict` is two values that cannot occur together. Other\nreasons name a business condition, for example `not_an_initial_offering`. Your client must\naccept a reason that it does not know.\n",
            "example": "not_an_initial_offering"
          },
          "code": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated. Use `reason`.\n\nA code for the problem. An order sets it when the order cannot buy the product offering of a line item:\n\n- NOT_AN_INITIAL_OFFERING: The product offering is not an initial product offering of the product catalog of the customer.\n- ADDON_NOT_APPLICABLE: The plan of the subscription does not take the add-on.\n- OFFERING_CHANGE_NOT_AVAILABLE: The subscription cannot change to the product offering.\n\nA problem without a code is a field that is missing or not correct.\n",
            "enum": [
              "NOT_AN_INITIAL_OFFERING",
              "ADDON_NOT_APPLICABLE",
              "OFFERING_CHANGE_NOT_AVAILABLE"
            ],
            "example": "NOT_AN_INITIAL_OFFERING"
          }
        }
      },
      "OrderRequirement": {
        "type": "string",
        "description": "Whether a submission step (payment, payment profile setup, or signing) must be completed\nbefore the order can be submitted. Determined by platform configuration and the contents\nof the order.\n\n- NOT_REQUIRED: The step does not apply; the order can be submitted without it.\n- OPTIONAL: The step may be completed, but the order can be submitted without it.\n- REQUIRED: The step must be completed and its session reference provided when submitting the order.\n",
        "enum": [
          "NOT_REQUIRED",
          "OPTIONAL",
          "REQUIRED"
        ]
      },
      "SubscriptionListItem": {
        "type": "object",
        "description": "Simplified subscription representation optimized for list operations. Use the detailed Subscription schema for individual subscription views.",
        "required": [
          "subscriptionId",
          "status",
          "type",
          "display",
          "msisdn",
          "customerId",
          "productOfferingId",
          "subscriberId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The unique identifier for the subscription.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          },
          "type": {
            "$ref": "#/components/schemas/SubscriptionType"
          },
          "display": {
            "type": "string",
            "description": "Human-friendly name for the subscription, suitable for showing in UIs. Auto-generated as a pretty-printed version of the phone number unless a custom display name was set at creation.",
            "example": "(555) 123-4567"
          },
          "msisdn": {
            "x-pii": "KIND_PHONE_NUMBER",
            "type": "string",
            "description": "The phone number currently active on this subscription, in E.164 format. MSISDN (Mobile Station International Subscriber Directory Number) is the telecom term for a subscriber's full international phone number.",
            "example": "+15551234567"
          },
          "customerId": {
            "type": "string",
            "description": "The unique identifier for the customer who owns this subscription.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier for the product offering associated with this subscription.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "subscriberId": {
            "type": "string",
            "description": "The unique identifier for the subscriber associated with this subscription.",
            "example": "b2c3d4e5-f6a7-5b6c-9d0e-1f2a3b4c5d6e"
          },
          "activatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was activated. Absent until the subscription has been activated.",
            "example": "2024-01-15T10:30:00Z"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was canceled (if applicable).",
            "example": "2024-06-30T00:00:00Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was created.",
            "example": "2024-01-10T08:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the subscription was last updated.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "SubscriptionAddonListItem": {
        "type": "object",
        "description": "An add-on attached to a subscription, as returned inside subscription list responses. Carries the essentials for showing the add-on alongside its subscription; fetch the add-on individually for the full detail.",
        "required": [
          "productOfferingId",
          "status"
        ],
        "properties": {
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier for the product offering.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "referenceId": {
            "type": "string",
            "description": "A reference identifier provided by API clients or upstream provider integrations\nto identify this subscription add-on in their own systems. Unique per tenant when\nset. Use this field to look up add-ons by your external identifier (for example a\nprovider-side package ID). Typically populated by a workflow once the add-on has\nbeen provisioned with the underlying network provider.\n",
            "example": "telna-package-12345",
            "maxLength": 255
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionAddonStatus"
          },
          "productOfferingGroupId": {
            "type": "string",
            "description": "The unique identifier for the product offering group.",
            "example": "extra-data-packages"
          },
          "licenseId": {
            "type": "string",
            "description": "The unique identifier of the license associated with this add-on (if applicable).",
            "example": "c9d0e1f2-a3b4-5678-9012-def012345678"
          },
          "addedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on was added to the subscription.",
            "example": "2024-01-15T10:30:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on was last updated.",
            "example": "2024-01-20T09:00:00Z"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the add-on was canceled (if applicable).",
            "example": "2024-06-30T00:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "LicenseListItem": {
        "type": "object",
        "description": "Simplified license representation optimized for list operations. The detailed License schema adds the customer and the product offering.",
        "required": [
          "licenseId",
          "status",
          "type",
          "productOfferingId"
        ],
        "properties": {
          "licenseId": {
            "type": "string",
            "description": "The unique identifier for the license.",
            "example": "c9d0e1f2-a3b4-5678-9012-def012345678"
          },
          "status": {
            "$ref": "#/components/schemas/LicenseStatus"
          },
          "type": {
            "$ref": "#/components/schemas/LicenseType"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The unique identifier for the product offering that the license grants.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription that the license is assigned to. Absent for a license that stands alone.",
            "example": "d8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "activatedAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the license was activated.",
            "example": "2024-01-15"
          },
          "cancelledAt": {
            "type": "string",
            "format": "date",
            "description": "The date when the license was canceled.",
            "example": "2024-06-30"
          }
        }
      },
      "OrderModification": {
        "type": "object",
        "description": "A modification applied to an existing service during order fulfillment.",
        "required": [
          "type",
          "targetId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "SUBSCRIPTION_CHANGE",
              "ADDON_CHANGE"
            ],
            "description": "Type of modification applied."
          },
          "targetId": {
            "type": "string",
            "description": "The subscription or add-on that was modified.",
            "example": "e8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "newProductOfferingId": {
            "type": "string",
            "description": "The product offering the entity was changed to.",
            "example": "po_mobile_premium_plus"
          },
          "appliedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the modification was applied.",
            "example": "2024-01-15T15:00:00Z"
          }
        }
      },
      "Order": {
        "type": "object",
        "description": "A shopping cart for telecommunications services and products. Add line items to configure\nservices, get pricing, and submit for fulfillment. Orders track progress from creation through completion.\n",
        "required": [
          "orderId",
          "state",
          "lineItems",
          "validation",
          "requirements",
          "createdAt",
          "expiresAt",
          "updatedAt"
        ],
        "properties": {
          "orderId": {
            "type": "string",
            "description": "Unique identifier for the order.",
            "example": "order-123"
          },
          "state": {
            "$ref": "#/components/schemas/OrderState"
          },
          "user": {
            "$ref": "#/components/schemas/OrderUserResult"
          },
          "customer": {
            "$ref": "#/components/schemas/OrderCustomerResult"
          },
          "billing": {
            "$ref": "#/components/schemas/OrderBilling"
          },
          "shipping": {
            "$ref": "#/components/schemas/Shipping"
          },
          "promoCode": {
            "type": "string",
            "description": "Promotional code applied to this order, if any.",
            "example": "STUDENT2024"
          },
          "paymentSessionId": {
            "type": "string",
            "description": "The payment session that collected payment for this order, set when the order was submitted with one.",
            "example": "d2e3f4a5-b6c7-8901-2345-012345678901"
          },
          "paymentProfileSessionId": {
            "type": "string",
            "description": "The payment profile session used to set up a payment method for this order, set when the order was submitted with one.",
            "example": "69321a62-f1fe-461f-8761-a19ae6587bb2"
          },
          "signingSessionId": {
            "type": "string",
            "description": "The signing session that captured the customer's signature for this order, set when the order was submitted with one.",
            "example": "8f3b1c2d-4e5f-6789-abcd-1234567890ef"
          },
          "consents": {
            "$ref": "#/components/schemas/Consents"
          },
          "lineItems": {
            "type": "array",
            "description": "Line items in the order.",
            "items": {
              "$ref": "#/components/schemas/OrderLineItem"
            }
          },
          "pricing": {
            "$ref": "#/components/schemas/OrderPricing"
          },
          "validation": {
            "type": "object",
            "description": "The result of the checks that a submit makes on the order and its line items. The checks make sure that each\nnecessary field is set, and that the customer can buy each product offering. Payment is not part of these checks.\n",
            "additionalProperties": false,
            "required": [
              "isValid"
            ],
            "properties": {
              "isValid": {
                "type": "boolean",
                "description": "Whether the order is valid and ready for submission.",
                "example": false
              },
              "missingFields": {
                "type": "array",
                "description": "Required fields that are still missing.",
                "items": {
                  "type": "string"
                },
                "example": [
                  "customer",
                  "billing.address"
                ]
              },
              "errors": {
                "type": "array",
                "description": "Order-level validation errors.",
                "items": {
                  "$ref": "#/components/schemas/InlineValidationError"
                }
              },
              "lineItemValidation": {
                "type": "array",
                "description": "Validation status for each line item.",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "lineItemId": {
                      "type": "string",
                      "description": "Reference to the line item.",
                      "example": "line-item-1"
                    },
                    "isValid": {
                      "type": "boolean",
                      "description": "Whether this line item is valid.",
                      "example": false
                    },
                    "missingFields": {
                      "type": "array",
                      "description": "Required fields that are still missing.",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "subscriber.name",
                        "sim.iccid"
                      ]
                    },
                    "errors": {
                      "type": "array",
                      "description": "Validation errors for this line item.",
                      "items": {
                        "$ref": "#/components/schemas/InlineValidationError"
                      }
                    }
                  }
                }
              }
            }
          },
          "requirements": {
            "type": "object",
            "description": "What this platform expects a checkout to collect before the order is submitted, so a client can build\nthe right flow up front. These are declared per platform, not derived from the contents of the order.\n\nSubmit enforces what the order itself demands rather than what is declared here: an order with an\namount left to collect is refused until that amount is paid, and an order that owes nothing submits\nwithout any payment reference.\n",
            "additionalProperties": false,
            "properties": {
              "requiresPayment": {
                "$ref": "#/components/schemas/OrderRequirement",
                "description": "Whether a checkout on this platform is expected to collect payment before submitting an order."
              },
              "requiresPaymentProfile": {
                "$ref": "#/components/schemas/OrderRequirement",
                "description": "Whether a checkout on this platform is expected to save a payment profile for future billing, passing its paymentProfileSessionId when submitting an order."
              },
              "requiresSigning": {
                "$ref": "#/components/schemas/OrderRequirement",
                "description": "Whether a checkout on this platform is expected to capture a digital signature, passing its signingSessionId when submitting an order."
              }
            }
          },
          "externalPayment": {
            "type": "object",
            "description": "External payment details if the order was paid outside the system.",
            "additionalProperties": false,
            "properties": {
              "reference": {
                "type": "string",
                "description": "Reference from the external payment system.",
                "example": "ext-payment-ref-123"
              },
              "receiptDescription": {
                "type": "string",
                "description": "Description of the external payment.",
                "example": "Payment via external billing system"
              },
              "receiptUrl": {
                "type": "string",
                "format": "uri",
                "description": "URL to the external payment receipt.",
                "example": "https://external.example.com/receipts/123"
              },
              "receivedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When the external payment was recorded.",
                "example": "2024-01-15T14:30:00Z"
              }
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order expires if not submitted (automatically refreshed on each order update to maintain active session).",
            "example": "2024-01-22T10:30:00Z"
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was submitted for fulfillment.",
            "example": "2024-01-15T14:30:00Z"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was completed.",
            "example": "2024-01-15T15:00:00Z"
          },
          "createdEntities": {
            "type": "object",
            "description": "Entities created as part of order fulfillment.",
            "additionalProperties": false,
            "properties": {
              "subscriptions": {
                "type": "array",
                "description": "Subscriptions created during order fulfillment.",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SubscriptionListItem"
                    },
                    {
                      "required": [
                        "createdByLineItem"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "createdByLineItem": {
                          "type": "string",
                          "description": "Line item ID that created this subscription.",
                          "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
                        }
                      }
                    }
                  ]
                }
              },
              "addons": {
                "type": "array",
                "description": "Add-ons created during order fulfillment.",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/SubscriptionAddonListItem"
                    },
                    {
                      "required": [
                        "createdByLineItem"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "createdByLineItem": {
                          "type": "string",
                          "description": "Line item ID that created this add-on.",
                          "example": "h47ac10b-58cc-4372-a567-0e02b2c3d479"
                        }
                      }
                    }
                  ]
                }
              },
              "licenses": {
                "type": "array",
                "description": "Standalone licenses created during order fulfillment. A license that belongs to an add-on is not listed here.",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LicenseListItem"
                    },
                    {
                      "required": [
                        "createdByLineItem"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "createdByLineItem": {
                          "type": "string",
                          "description": "Line item ID that created this license.",
                          "example": "j47ac10b-58cc-4372-a567-0e02b2c3d479"
                        }
                      }
                    }
                  ]
                }
              },
              "modifications": {
                "type": "array",
                "description": "Modifications applied during order fulfillment.",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/OrderModification"
                    },
                    {
                      "required": [
                        "createdByLineItem"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "createdByLineItem": {
                          "type": "string",
                          "description": "Line item ID that created this modification.",
                          "example": "i47ac10b-58cc-4372-a567-0e02b2c3d479"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the order was last updated.",
            "example": "2024-01-15T10:30:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UpdateOrderRequest": {
        "type": "object",
        "description": "Request to update order details (excludes line items).",
        "additionalProperties": false,
        "properties": {
          "user": {
            "$ref": "#/components/schemas/OrderUserReference"
          },
          "customer": {
            "$ref": "#/components/schemas/OrderCustomerReference"
          },
          "billing": {
            "$ref": "#/components/schemas/OrderBillingInput"
          },
          "shipping": {
            "$ref": "#/components/schemas/ShippingInput"
          },
          "consents": {
            "$ref": "#/components/schemas/Consents"
          },
          "promoCode": {
            "type": "string",
            "description": "Promo code to apply to the order, or an empty string to remove the one it holds. Rejected with\n`internalCode` 4119 when no promotion has that code, or when it is outside its validity\nperiod.\n",
            "example": "STUDENT2024"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "AddLineItemRequest": {
        "type": "object",
        "description": "Request to add a line item to an order.",
        "required": [
          "lineItem"
        ],
        "additionalProperties": false,
        "properties": {
          "lineItem": {
            "$ref": "#/components/schemas/OrderLineItem"
          }
        }
      },
      "UpdateLineItemRequest": {
        "type": "object",
        "description": "Request to update a line item configuration.",
        "required": [
          "lineItem"
        ],
        "additionalProperties": false,
        "properties": {
          "lineItem": {
            "$ref": "#/components/schemas/OrderLineItem"
          }
        }
      },
      "SubmitOrderRequest": {
        "type": "object",
        "description": "Request to submit an order for fulfillment.\n\nDepending on the order's requirements, payment intent, saved payment profile, or signing reference may be required.\n\nIn a fully managed flow, the order may be auto-submitted on successfully fulfilling all requirements (e.g. successful payment or signing).\n",
        "additionalProperties": false,
        "properties": {
          "paymentSessionId": {
            "type": "string",
            "description": "Reference to completed payment session for orders requiring payment collection.",
            "example": "a1b2c3d4-e5f6-7890-1234-56789abcdef0"
          },
          "paymentProfileSessionId": {
            "type": "string",
            "description": "Reference to completed payment profile session for zero-total orders requiring payment method setup.",
            "example": "b2c3d4e5-f6a7-8901-2345-6789abcdef01"
          },
          "signingSessionId": {
            "type": "string",
            "description": "Reference to completed signing session.",
            "example": "c3d4e5f6-a7b8-9012-3456-789abcdef012"
          },
          "externalPayment": {
            "type": "object",
            "description": "Details of an external payment made outside the system. When provided, the order\nis considered paid and will bypass internal payment requirements.\n\nCannot be used together with paymentSessionId.\n",
            "additionalProperties": false,
            "required": [
              "reference"
            ],
            "properties": {
              "reference": {
                "type": "string",
                "minLength": 1,
                "description": "Reference or identifier from the external payment system.",
                "example": "ext-payment-ref-123"
              },
              "receiptDescription": {
                "type": "string",
                "description": "Optional human-readable description of the payment.",
                "example": "Payment via external billing system"
              },
              "receiptUrl": {
                "type": "string",
                "format": "uri",
                "description": "Optional URL to a receipt or confirmation page for the payment.",
                "example": "https://external.example.com/receipts/123"
              }
            }
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "ApproveOrderRequest": {
        "type": "object",
        "description": "Approve an order that requires admin or manager approval before fulfillment can proceed.",
        "additionalProperties": false,
        "properties": {
          "comment": {
            "type": "string",
            "maxLength": 1000,
            "description": "Optional comment explaining the approval decision.",
            "example": "Approved after reviewing customer credit check"
          }
        }
      },
      "OrderHandoffToken": {
        "type": "object",
        "description": "A token that gives an open order to a checkout. A person with the token can\nsee, change, and pay for the order. Give the token only to the user that the\norder is for.\n",
        "required": [
          "handoffToken",
          "orderId",
          "expiresAt"
        ],
        "properties": {
          "handoffToken": {
            "type": "string",
            "description": "The handoff token. We return it only in this response. If you lose it, create a new token.",
            "example": "oht_f47ac10b58cc4372a5670e02b2c3d479"
          },
          "orderId": {
            "type": "string",
            "description": "The order of the token.",
            "example": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the token expires, 1 hour after its creation. The order has its own expiry.",
            "example": "2024-01-15T11:00:00Z"
          }
        }
      },
      "OrderEmailVerification": {
        "type": "object",
        "description": "A verification of the contact email of the new customer of an order. The code went to that email.",
        "required": [
          "nonce",
          "expiresIn",
          "createdAt",
          "expiresAt"
        ],
        "properties": {
          "nonce": {
            "type": "string",
            "description": "Token that references this code when you verify it.",
            "example": "a1b2c3d4-e5f6-4890-abcd-ef1234567890"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Number of seconds until the code expires.",
            "example": 600
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When we sent the code.",
            "example": "2024-01-15T10:30:00Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the code expires.",
            "example": "2024-01-15T10:40:00Z"
          },
          "resendAt": {
            "type": "string",
            "format": "date-time",
            "description": "When you can ask for the next code to the same email. A request before this time gets a\n429. The field is absent when we cannot tell.\n",
            "example": "2024-01-15T10:30:30Z"
          }
        }
      },
      "OrderHandoffClaim": {
        "type": "object",
        "description": "The order of a handoff token.",
        "required": [
          "orderId",
          "customerType"
        ],
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The order of the token.",
            "example": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
          },
          "customerType": {
            "$ref": "#/components/schemas/CustomerType"
          }
        }
      },
      "PaymentProvider": {
        "type": "string",
        "description": "Payment service provider that processes the transaction.",
        "enum": [
          "STRIPE",
          "BILLOGRAM"
        ],
        "example": "STRIPE"
      },
      "InvoicePaymentStatus": {
        "type": "string",
        "description": "The status of the payment of an invoice.\n\n- UNKNOWN: The status of the provider has no match.\n- DRAFT: The provider did not issue the payment.\n- ISSUED: The provider issued the payment, and the payment is not paid.\n- PARTIALLY_PAID: The customer paid a part of the amount due.\n- PAID: The customer paid the amount due.\n- OVERDUE: The due date is in the past, and the payment is not paid.\n- UNCOLLECTIBLE: The provider stopped the collection of the payment.\n- VOID: The provider canceled the payment.\n- CREDITED: A credit settled the payment.\n",
        "enum": [
          "UNKNOWN",
          "DRAFT",
          "ISSUED",
          "PARTIALLY_PAID",
          "PAID",
          "OVERDUE",
          "UNCOLLECTIBLE",
          "VOID",
          "CREDITED"
        ]
      },
      "InvoicePayment": {
        "type": "object",
        "description": "The record of the payment provider that collects an invoice. One payment can collect more than\none invoice. Then each of these invoices shows the same payment, with the amounts of the whole\npayment.\n",
        "required": [
          "provider",
          "status",
          "amountDueMinor",
          "amountPaidMinor",
          "amountRemainingMinor",
          "currency",
          "invoiceNumbers"
        ],
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/PaymentProvider",
            "description": "The payment provider that collects the invoice."
          },
          "status": {
            "$ref": "#/components/schemas/InvoicePaymentStatus",
            "description": "The status of the payment."
          },
          "reference": {
            "type": "string",
            "description": "The number or the payment reference that the provider gives the payment.",
            "example": "INV-2026-001"
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "description": "The date when the payment is due. Absent when the provider has no due date.",
            "example": "2026-12-31"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the provider issued the payment. Absent while the payment is a draft.",
            "example": "2026-12-01T08:00:00Z"
          },
          "paidAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment became paid.",
            "example": "2026-12-20T14:30:00Z"
          },
          "amountDueMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount that the provider collects, in minor units of the currency.",
            "example": 49875
          },
          "amountPaidMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount that the customer paid, in minor units of the currency.",
            "example": 0
          },
          "amountRemainingMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount that is not paid, in minor units of the currency.",
            "example": 49875
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code of the amounts.",
            "example": "USD"
          },
          "hostedUrl": {
            "type": "string",
            "format": "uri",
            "description": "The page of the provider where the customer reads and pays the invoice.",
            "example": "https://example.com/invoices/261100042"
          },
          "pdfUrl": {
            "type": "string",
            "format": "uri",
            "description": "The PDF of the provider. Absent when the provider gives no PDF.",
            "example": "https://example.com/invoices/261100042.pdf"
          },
          "invoiceNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The numbers of all invoices that the payment collects, this invoice included.",
            "example": [
              "261100042"
            ]
          }
        }
      },
      "Invoice": {
        "type": "object",
        "description": "The invoice that bills a customer for one month. The API shows only the final invoice of a\nmonth. While the month is open, its invoice changes every day and the API does not show it.\n",
        "required": [
          "invoiceNumber",
          "customerId",
          "month",
          "periodFrom",
          "periodUntil",
          "subtotalMinor",
          "currency",
          "createdAt"
        ],
        "properties": {
          "invoiceNumber": {
            "type": "string",
            "pattern": "^\\d{1,9}$",
            "description": "The number of the invoice. The customer sees this number on the invoice.",
            "example": "261100042"
          },
          "customerId": {
            "type": "string",
            "description": "The customer that the invoice bills.",
            "example": "456789ab-cdef-0123-4567-89abcdef0123"
          },
          "month": {
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "description": "The month of the invoice, in the format `YYYY-MM`.",
            "example": "2026-11"
          },
          "periodFrom": {
            "type": "string",
            "format": "date",
            "description": "The first day that the charges of the invoice cover.",
            "example": "2026-11-01"
          },
          "periodUntil": {
            "type": "string",
            "format": "date",
            "description": "The last day that the charges of the invoice cover. An invoice paid in advance covers\ndays after its month.\n",
            "example": "2026-12-31"
          },
          "subtotalMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The sum of the charges without tax, in minor units of the currency.",
            "example": 39900
          },
          "taxAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The tax of the invoice, in minor units of the currency. On a brand that calculates the tax\nfor each jurisdiction, the tax comes from the payment. The field is absent when that\npayment has no tax.\n",
            "example": 9975
          },
          "totalMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The subtotal and the tax together, in minor units of the currency. The field is absent\nwhen `taxAmountMinor` is absent.\n",
            "example": 49875
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code of the amounts.",
            "example": "USD"
          },
          "payment": {
            "$ref": "#/components/schemas/InvoicePayment",
            "description": "The payment that collects the invoice. The field is absent when no payment provider of the\nplatform collects the invoice, for example when an external partner collects it.\n"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the final run of the month made the invoice.",
            "example": "2026-12-01T03:00:00Z"
          }
        }
      },
      "InvoiceChargeType": {
        "type": "string",
        "description": "The type of a charge.\n\n- SUBSCRIPTION: The fee of a subscription.\n- LICENSE: The fee of a license.\n- ADDITION: The fee of an addition to a subscription.\n- USAGE: The usage of a subscription, for example calls or data.\n- DISCOUNT: A discount.\n- ADJUSTMENT: A correction of an earlier invoice.\n- BINDING_PERIOD: The fee of a binding period.\n- BINDING_PERIOD_REMAINING: The fee for the remaining months of a binding period that ended early.\n- ACTIVATION_FEE: The fee of an activation.\n- INVOICE_FEE: The fee of the invoice.\n- MANUAL: A charge that an administrator added.\n- OTHER: A charge of another type.\n",
        "enum": [
          "SUBSCRIPTION",
          "LICENSE",
          "ADDITION",
          "USAGE",
          "DISCOUNT",
          "ADJUSTMENT",
          "BINDING_PERIOD",
          "BINDING_PERIOD_REMAINING",
          "ACTIVATION_FEE",
          "INVOICE_FEE",
          "MANUAL",
          "OTHER"
        ]
      },
      "InvoiceCharge": {
        "type": "object",
        "description": "A charge of an invoice. The charges show the invoice after each correction.",
        "required": [
          "type",
          "description",
          "startDate",
          "endDate",
          "oneTime",
          "amountMinor"
        ],
        "properties": {
          "chargeId": {
            "type": "string",
            "description": "The identifier of the charge. It stays the same on each run of the month. Absent when the\ncharge has no identifier.\n",
            "example": "c3d4e5f6-a7b8-9012-cdef-345678901234"
          },
          "type": {
            "$ref": "#/components/schemas/InvoiceChargeType",
            "description": "The type of the charge."
          },
          "description": {
            "type": "string",
            "description": "The text of the charge on the invoice.",
            "example": "Mobile 20 GB"
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription that the charge bills. Absent for a charge of the customer.",
            "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
          },
          "licenseId": {
            "type": "string",
            "description": "The license that the charge bills. Absent for a charge of the customer.",
            "example": "b2c3d4e5-f6a7-8901-bcde-f23456789012"
          },
          "productOfferingId": {
            "type": "string",
            "description": "The product offering that the charge bills. Absent when the charge has no offering.",
            "example": "d4e5f6a7-b8c9-0123-def4-567890123456"
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "The first day that the charge covers.",
            "example": "2026-11-01"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "The last day that the charge covers.",
            "example": "2026-11-30"
          },
          "oneTime": {
            "type": "boolean",
            "description": "Whether the charge occurs one time and does not repeat each month.",
            "example": false
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount of the charge without tax, in minor units of the currency. Each charge rounds\non its own, so the sum of the charges can differ from `subtotalMinor` by a few minor units.\n",
            "example": 39900
          },
          "taxRate": {
            "type": "number",
            "format": "decimal",
            "description": "The tax rate of the charge, as a percentage. Absent on a charge of the type `USAGE`. Absent\non a brand that calculates the tax for each jurisdiction. Then the tax of the invoice comes\nfrom the payment.\n",
            "example": 25
          },
          "taxAmountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The tax of the charge, in minor units of the currency. Absent when `taxRate` is absent.\nEach charge rounds on its own, so the sum can differ from the tax of the invoice.\n",
            "example": 9975
          }
        }
      },
      "PaymentLinkStatus": {
        "type": "string",
        "description": "Current status of a payment link.\n\n- ACTIVE: The link is open and the customer can complete payment.\n- EXPIRED: The link expired before payment was completed.\n- COMPLETED: Payment through the link succeeded.\n- CANCELED: The link was canceled and can no longer be used.\n- FAILED: Payment through the link failed.\n",
        "enum": [
          "ACTIVE",
          "EXPIRED",
          "COMPLETED",
          "CANCELED",
          "FAILED"
        ]
      },
      "PaymentLink": {
        "type": "object",
        "description": "A shareable hosted payment page that collects payment for an order at the customer's\nconvenience. Create one when the customer is not in an active checkout flow — for example\nto send by email or SMS — and anyone with the URL can complete the payment.\n\nUse a payment session instead when the customer is present in your checkout and should be\nredirected to pay immediately. Both collect against the order's underlying payment intent,\nwhich records the resulting charges and refunds.\n",
        "required": [
          "paymentLinkId",
          "hostedUrl",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "paymentLinkId": {
            "type": "string",
            "description": "Unique identifier for the payment link.",
            "example": "j47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "orderId": {
            "type": "string",
            "description": "The order this payment link collects payment for.",
            "example": "44567801-a504-4f09-8089-31ea78bc239b"
          },
          "customerId": {
            "type": "string",
            "description": "The customer this payment link collects payment from.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "paymentProfileId": {
            "type": "string",
            "description": "The saved payment method pre-selected for the customer, if any.",
            "example": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
          },
          "hostedUrl": {
            "type": "string",
            "format": "uri",
            "description": "The URL where customers can complete their payment.",
            "example": "https://checkout.yourapp.com/pay/j47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentLinkStatus"
          },
          "description": {
            "type": "string",
            "description": "Optional description displayed on the payment page.",
            "example": "Pay your monthly subscription"
          },
          "paymentIntentId": {
            "type": "string",
            "description": "The payment intent that collected the payment, available once the link has been paid.",
            "example": "64870b5c-fb61-4c9a-955a-e148e0826c20"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment was completed, if the link has been paid.",
            "example": "2024-01-15T14:30:00Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment link was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment link was last updated.",
            "example": "2024-01-15T10:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CreatePaymentLinkRequest": {
        "type": "object",
        "description": "Request to create a new payment link for the payment of an order.",
        "additionalProperties": false,
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The unique identifier of the order to create a payment link for. The request must give it.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "paymentProfileId": {
            "type": "string",
            "description": "A previously saved payment method to prefill on the payment page, for returning customers.",
            "example": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
          },
          "savePaymentProfile": {
            "type": "boolean",
            "description": "Whether to save the payment profile for future use. Only applicable if the customer is authenticated or for the initial order. Defaults to false.",
            "example": true
          },
          "setAsDefaultPaymentProfile": {
            "type": "boolean",
            "description": "Whether to set the payment method as the default for future payments. Only applicable if savePaymentProfile is true and the customer is authenticated or for the initial order. Defaults to false.\n",
            "example": false
          },
          "description": {
            "type": "string",
            "description": "Optional description to display on the payment page.",
            "example": "Payment for mobile subscription"
          },
          "grantAutopayConsent": {
            "type": "boolean",
            "description": "Whether the customer consents to being charged automatically for future renewals. Only applicable if savePaymentProfile is true. Automatic charging also requires a usable default payment profile. Defaults to false.\n",
            "example": false
          },
          "returnUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL to redirect customers to after successful payment.",
            "example": "https://your-domain.com/success"
          },
          "cancelUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL to redirect customers to if they cancel the payment.",
            "example": "https://your-domain.com/cancel"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "PaymentIntentStatus": {
        "type": "string",
        "description": "Current stage of a payment intent as it is collected through the payment provider.\n\n- UNKNOWN: The platform has no supported mapping for the current provider state.\n- PENDING: Created, no charge attempted yet.\n- REQUIRES_ACTION: The customer must take action to continue (e.g., 3D Secure authentication).\n- PROCESSING: A charge is in flight with the payment provider.\n- SUCCEEDED: The full amount has been collected.\n- REQUIRES_PAYMENT_METHOD: The last charge attempt failed; a new or updated payment method is needed to retry.\n- CANCELED: Collection was canceled and no further charges will be attempted.\n",
        "enum": [
          "UNKNOWN",
          "PENDING",
          "REQUIRES_ACTION",
          "PROCESSING",
          "SUCCEEDED",
          "REQUIRES_PAYMENT_METHOD",
          "CANCELED"
        ],
        "example": "SUCCEEDED"
      },
      "PaymentIntentType": {
        "type": "string",
        "description": "What the payment intent collects.\n\n- UNKNOWN: The platform does not have a supported type for this intent.\n- PREPAID_RENEWAL: A scheduled prepaid subscription renewal.\n- TOPUP: An immediate prepaid balance or allowance top-up.\n- INITIAL_ORDER: Payment collected while placing an order.\n- SUPPORT_CHARGE: A one-time charge that support creates for the customer.\n",
        "enum": [
          "UNKNOWN",
          "PREPAID_RENEWAL",
          "TOPUP",
          "INITIAL_ORDER",
          "SUPPORT_CHARGE"
        ],
        "example": "PREPAID_RENEWAL"
      },
      "PaymentIntentListItem": {
        "type": "object",
        "description": "A payment intent without its nested attempts, refunds, and line items, optimized for list views.",
        "required": [
          "paymentIntentId",
          "customerId",
          "status",
          "type",
          "amountMinor",
          "currency",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "paymentIntentId": {
            "type": "string",
            "description": "The unique identifier for this payment intent.",
            "example": "64870b5c-fb61-4c9a-955a-e148e0826c20"
          },
          "customerId": {
            "type": "string",
            "description": "The customer this payment intent collects from.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentIntentStatus"
          },
          "type": {
            "$ref": "#/components/schemas/PaymentIntentType"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The total amount to collect, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).",
            "example": 2900
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code the amount is collected in (e.g., \"USD\").",
            "example": "USD"
          },
          "description": {
            "type": "string",
            "description": "A human-readable description of what is being collected.",
            "example": "Mobile subscription renewal"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the amount is due.",
            "example": "2024-01-15T10:00:00Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment intent was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment intent was last updated.",
            "example": "2024-01-15T10:00:00Z"
          }
        }
      },
      "PaymentIntentLineItem": {
        "type": "object",
        "description": "A single billed item contributing to a payment intent's amount.",
        "required": [
          "description",
          "amountMinor"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "What this line item represents.",
            "example": "Mobile subscription - Premium Plan"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The base cost of the line item before discounts, in minor units of the payment intent's\ncurrency (e.g., 2900 = $29.00 when the currency is USD). The taxes are added to it, unless\n`includesTax` is true and they are a part of it.\n",
            "example": 2900
          },
          "includesTax": {
            "type": "boolean",
            "description": "Whether the taxes are a part of `amountMinor` rather than added to it.",
            "example": false
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription this line item is associated with, if any.",
            "example": "a8174435-6378-4be5-a9f5-8b4aaadae5d4"
          },
          "licenseId": {
            "type": "string",
            "description": "The license this line item is associated with, if any.",
            "example": "ffb19d4f-b3b6-4f2b-9365-dd80bdcf0a77"
          },
          "discounts": {
            "type": "array",
            "description": "Discounts applied to this line item.",
            "items": {
              "type": "object",
              "required": [
                "description",
                "amountMinor"
              ],
              "additionalProperties": false,
              "properties": {
                "description": {
                  "type": "string",
                  "description": "What the discount is for.",
                  "example": "Loyalty discount"
                },
                "amountMinor": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The discounted amount (positive value), in minor units of the payment intent's currency.",
                  "example": 500
                }
              }
            }
          },
          "taxes": {
            "type": "array",
            "description": "Taxes applied to this line item.",
            "items": {
              "type": "object",
              "required": [
                "description",
                "amountMinor"
              ],
              "additionalProperties": false,
              "properties": {
                "description": {
                  "type": "string",
                  "description": "The tax component applied (e.g., a named tax and its rate).",
                  "example": "VAT 25%"
                },
                "amountMinor": {
                  "type": "integer",
                  "format": "int64",
                  "description": "The tax amount, in minor units of the payment intent's currency.",
                  "example": 725
                }
              }
            }
          }
        }
      },
      "PaymentIntentDiscount": {
        "type": "object",
        "description": "A reduction applied to the payment intent as a whole rather than to one billed line.",
        "required": [
          "description",
          "amountMinor"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Why the payment intent was reduced.",
            "example": "Goodwill credit"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The positive amount deducted, in minor units of the payment intent currency.",
            "example": 1000
          }
        }
      },
      "PaymentAttempt": {
        "type": "object",
        "description": "A single charge attempt against a payment intent.",
        "required": [
          "paymentAttemptId",
          "amountMinor",
          "currency",
          "result",
          "createdAt"
        ],
        "properties": {
          "paymentAttemptId": {
            "type": "string",
            "description": "The unique identifier for this charge attempt.",
            "example": "a4da2b04-aa79-4b40-8987-048d6caf118f"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The amount charged in this attempt, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).",
            "example": 2900
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code the attempt was charged in (e.g., \"USD\").",
            "example": "USD"
          },
          "result": {
            "type": "string",
            "description": "Whether the charge attempt succeeded or failed.",
            "enum": [
              "SUCCEEDED",
              "FAILED"
            ],
            "example": "SUCCEEDED"
          },
          "reason": {
            "type": "string",
            "description": "Failure reason when the attempt did not succeed.",
            "example": "card_declined"
          },
          "chargedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the charge was made.",
            "example": "2024-01-15T10:00:00Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the attempt was created.",
            "example": "2024-01-15T10:00:00Z"
          }
        }
      },
      "PaymentRefund": {
        "type": "object",
        "description": "A refund issued against a payment intent.",
        "required": [
          "refundId",
          "amountMinor",
          "currency",
          "status",
          "createdAt"
        ],
        "properties": {
          "refundId": {
            "type": "string",
            "description": "The unique identifier for this refund.",
            "example": "c014b666-22e4-430e-bb18-9257a383dfe2"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The refunded amount, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).",
            "example": 2900
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code the refund is issued in (e.g., \"USD\").",
            "example": "USD"
          },
          "reason": {
            "type": "string",
            "description": "Why the refund was issued.",
            "enum": [
              "UNKNOWN",
              "DUPLICATE",
              "FRAUDULENT",
              "REQUESTED_BY_CUSTOMER",
              "DISPUTE_LOST"
            ],
            "example": "REQUESTED_BY_CUSTOMER"
          },
          "status": {
            "type": "string",
            "description": "Current stage of the refund.",
            "enum": [
              "PENDING",
              "SUCCEEDED",
              "FAILED",
              "CANCELED",
              "REQUIRES_ACTION"
            ],
            "example": "SUCCEEDED"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the refund was created.",
            "example": "2024-01-15T10:00:00Z"
          }
        }
      },
      "PaymentIntent": {
        "type": "object",
        "description": "The amount the platform is collecting from a customer, with its payment attempts, refunds,\nand billed line items.\n\nA payment intent is created automatically when payment collection starts for an order or\ninvoice; you do not create one directly. Read it to see what is due, what was attempted,\nand what was refunded. Card collection starts through a payment session or payment link;\ninvoice collection creates the payment intent as part of issuing the invoice.\n",
        "required": [
          "paymentIntentId",
          "customerId",
          "status",
          "amountMinor",
          "currency",
          "lineItems",
          "discounts",
          "attempts",
          "refunds",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "paymentIntentId": {
            "type": "string",
            "description": "The unique identifier for this payment intent.",
            "example": "64870b5c-fb61-4c9a-955a-e148e0826c20"
          },
          "customerId": {
            "type": "string",
            "description": "The customer this payment intent collects from.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentIntentStatus"
          },
          "amountMinor": {
            "type": "integer",
            "format": "int64",
            "description": "The total amount to collect, in minor units of the currency (e.g., 2900 = $29.00 when the currency is USD).",
            "example": 2900
          },
          "currency": {
            "type": "string",
            "description": "The ISO 4217 currency code the amount is collected in (e.g., \"USD\").",
            "example": "USD"
          },
          "description": {
            "type": "string",
            "description": "A human-readable description of what is being collected.",
            "example": "Mobile subscription renewal"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the amount is due.",
            "example": "2024-01-15T10:00:00Z"
          },
          "lineItems": {
            "type": "array",
            "description": "The items that make up the collected amount.",
            "items": {
              "$ref": "#/components/schemas/PaymentIntentLineItem"
            }
          },
          "discounts": {
            "type": "array",
            "description": "Reductions applied to the payment intent as a whole rather than to one billed line.",
            "items": {
              "$ref": "#/components/schemas/PaymentIntentDiscount"
            }
          },
          "attempts": {
            "type": "array",
            "description": "Charge attempts made against this payment intent, most recent first.",
            "items": {
              "$ref": "#/components/schemas/PaymentAttempt"
            }
          },
          "refunds": {
            "type": "array",
            "description": "Refunds issued against this payment intent.",
            "items": {
              "$ref": "#/components/schemas/PaymentRefund"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment intent was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the payment intent was last updated.",
            "example": "2024-01-15T10:00:00Z"
          }
        }
      },
      "PaymentSessionBranding": {
        "type": "object",
        "description": "The colors and the name that the payment form shows. Every property is optional. A property you\nleave out keeps the default of the payment provider. Branding does not change the layout or the\nspacing of the form.\n",
        "additionalProperties": false,
        "properties": {
          "backgroundColor": {
            "type": "string",
            "description": "The background color of the payment form, as a hex value with a leading number sign.",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "example": "#ffffff"
          },
          "buttonColor": {
            "type": "string",
            "description": "The color of the payment button, as a hex value with a leading number sign.",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "example": "#0cf68c"
          },
          "borderStyle": {
            "type": "string",
            "description": "The shape of the buttons and the input fields of the payment form.",
            "enum": [
              "PILL",
              "RECTANGULAR",
              "ROUNDED"
            ],
            "example": "PILL"
          },
          "displayName": {
            "type": "string",
            "description": "The name that the payment form shows at the top. Your legal business name stays on the\nreceipt and in the terms.\n",
            "maxLength": 100,
            "example": "Seamless"
          }
        }
      },
      "CreatePaymentSessionRequest": {
        "type": "object",
        "description": "Request to create a new payment session for processing payment for an order.",
        "required": [
          "orderId",
          "paymentProvider",
          "returnUrl"
        ],
        "additionalProperties": false,
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The unique identifier of the order to create a payment session for.",
            "example": "d4e5f6a7-b8c9-0123-4567-89abcdef0123"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "paymentProfileId": {
            "type": "string",
            "description": "A previously saved payment method to prefill on the payment page, for returning customers.",
            "example": "e5f6a7b8-c9d0-1234-5678-9abcdef01234"
          },
          "savePaymentProfile": {
            "type": "boolean",
            "description": "Whether to save the payment profile for future use. Only applicable if the customer is authenticated or for the initial order. Defaults to false.",
            "example": true
          },
          "setAsDefaultPaymentProfile": {
            "type": "boolean",
            "description": "Whether to set the payment method as the default for future payments. Only applicable if savePaymentProfile is true and the customer is authenticated or for the initial order. Defaults to false.\n",
            "example": false
          },
          "grantAutopayConsent": {
            "type": "boolean",
            "description": "Whether the customer consents to being charged automatically for future renewals. Only applicable if savePaymentProfile is true. Automatic charging also requires a usable default payment profile. Defaults to false.\n",
            "example": false
          },
          "hosted": {
            "type": "boolean",
            "description": "Whether to collect the payment on a hosted page. A hosted session returns hostedUrl, and you\nsend the customer to it. An embedded session (false) returns providerContext, and you show the\npayment form inside your own checkout page. Defaults to true.\n",
            "example": true
          },
          "returnUrl": {
            "type": "string",
            "description": "The URL the customer comes back to after they pay. A hosted page redirects to it. An embedded\nform redirects to it only for a payment method that leaves the page, such as 3D Secure. Must\nbe provided to create a session.\n",
            "example": "https://example.com/order/confirmation"
          },
          "cancelUrl": {
            "type": "string",
            "description": "The URL the customer is redirected to if they cancel the payment on the hosted page. A hosted session only.",
            "example": "https://example.com/order/checkout"
          },
          "branding": {
            "$ref": "#/components/schemas/PaymentSessionBranding"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "StripeCheckoutContext": {
        "type": "object",
        "description": "The Stripe values that mount an embedded Stripe Checkout in your own page. Load Stripe.js with\nthe publishable key and the connected account, then mount the checkout with the client secret.\nThe client secret authorizes this one payment session. Do not store it and do not send it to\nanybody but the payer's browser.\n",
        "required": [
          "clientSecret",
          "publishableKey",
          "connectedAccountId"
        ],
        "properties": {
          "clientSecret": {
            "type": "string",
            "description": "The client secret of the Stripe Checkout Session. Give it to Stripe.js to mount the checkout.",
            "example": "cs_test_a1b2c3d4e5f6g7h8i9j0_secret_k1l2m3n4o5"
          },
          "publishableKey": {
            "type": "string",
            "description": "The Stripe publishable key to load Stripe.js with. The key is public.",
            "example": "pk_test_51H8x2vLkdIwHu7ixaZ0m8Kj9"
          },
          "connectedAccountId": {
            "type": "string",
            "description": "The Stripe connected account that holds this payment. Load Stripe.js with it as the Stripe account.",
            "example": "acct_1H8x2vLkdIwHu7ix"
          }
        }
      },
      "PaymentSessionProviderContext": {
        "type": "object",
        "description": "What the payment provider needs to render its payment form inside your own checkout page. It is\nreturned only when you create the payment session with hosted set to false, and only by the\ncreate call. A hosted session gives you hostedUrl instead.\n\nThis object is the one place where the API is specific to a payment provider. Read the child\nobject that agrees with paymentProvider, and add a new child when you add a provider. Every other\npayment field stays independent of the provider.\n",
        "required": [
          "paymentProvider"
        ],
        "properties": {
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "stripe": {
            "$ref": "#/components/schemas/StripeCheckoutContext"
          }
        }
      },
      "PaymentSessionStatus": {
        "type": "string",
        "description": "Current status of a payment session lifecycle.",
        "enum": [
          "PENDING",
          "REQUIRES_ACTION",
          "COMPLETED",
          "FAILED",
          "CANCELED",
          "EXPIRED"
        ],
        "example": "PENDING"
      },
      "PaymentSession": {
        "type": "object",
        "description": "A single checkout attempt that collects payment for an order while the customer is present.\nCreate one during your checkout flow, let the customer pay, then pass its paymentSessionId when\nyou submit the order.\n\nThere are two ways to collect the payment. A hosted session gives you hostedUrl, and you send the\ncustomer to that page. An embedded session (create it with hosted set to false) gives you\nproviderContext, and you show the payment form inside your own checkout page.\n\nUse a payment link instead when the customer is not in an active checkout (e.g., to send a\npayment page by email), and read the order's payment intent to see the resulting charges\nand refunds.\n",
        "required": [
          "paymentSessionId",
          "orderId",
          "paymentProvider",
          "savePaymentProfile",
          "status",
          "metadata",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "paymentSessionId": {
            "type": "string",
            "description": "The unique identifier for this payment session.",
            "example": "d2e3f4a5-b6c7-8901-2345-012345678901"
          },
          "orderId": {
            "type": "string",
            "description": "The unique identifier of the order this payment session is for.",
            "example": "e3f4a5b6-c7d8-9012-3456-123456789012"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "paymentProfileId": {
            "type": "string",
            "description": "The saved payment method to use for this payment (for returning customers).",
            "example": "f4a5b6c7-d8e9-0123-4567-234567890123"
          },
          "savePaymentProfile": {
            "type": "boolean",
            "description": "Whether to save the payment profile for future use. Only applicable if the customer is authenticated or for the initial order. Defaults to false.",
            "example": true
          },
          "hostedUrl": {
            "type": "string",
            "format": "uri",
            "description": "The hosted checkout page to redirect the customer to in order to complete payment. A hosted session only.",
            "example": "https://payments.example.com/checkout/d2e3f4a5-b6c7-8901-2345-012345678901"
          },
          "providerContext": {
            "$ref": "#/components/schemas/PaymentSessionProviderContext"
          },
          "returnUrl": {
            "type": "string",
            "description": "The URL the customer is redirected to after payment completion.",
            "example": "https://example.com/order/confirmation"
          },
          "cancelUrl": {
            "type": "string",
            "description": "The URL the customer is redirected to if they cancel the payment.",
            "example": "https://example.com/order/checkout"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentSessionStatus"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom key-value pairs for additional payment session information.",
            "example": {
              "source": "mobile_app",
              "campaign": "summer_2024"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payment session was created.",
            "example": "2024-09-29T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payment session was last updated.",
            "example": "2024-09-29T10:30:00Z"
          }
        }
      },
      "CancelPaymentSessionRequest": {
        "type": "object",
        "description": "Request to cancel an active payment session.",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "description": "Optional reason for canceling the payment session.",
            "example": "Customer changed their mind"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom key-value pairs for additional cancellation information.",
            "example": {
              "cancelled_by": "customer_service",
              "ticket_id": "SUPP-12345"
            }
          }
        }
      },
      "PaymentMethodType": {
        "type": "string",
        "description": "The kind of payment method, as reported by the payment provider. This is an\nopen set of provider-defined values (for example \"CARD\", \"SEPA_DEBIT\", \"SWISH\",\n\"VIPPS\", \"KLARNA\", \"PAYPAL\") rather than a fixed enumeration, so new method\ntypes can appear without an API change.\n",
        "example": "CARD"
      },
      "PaymentProfileStatus": {
        "type": "string",
        "description": "Whether a saved payment profile can currently be charged.\n\n- ACTIVE: The payment method is valid and can be used for payments.\n- INACTIVE: The payment method has been deactivated and cannot be charged.\n- EXPIRED: The payment method has expired (e.g., an expired card) and must be replaced.\n- REQUIRES_ACTION: The customer must take action (e.g., re-authentication) before the payment method can be used again.\n",
        "enum": [
          "ACTIVE",
          "INACTIVE",
          "EXPIRED",
          "REQUIRES_ACTION"
        ]
      },
      "EmbeddedPaymentProfile": {
        "type": "object",
        "description": "A saved payment method with only the details needed to display it in a list, without billing information.",
        "required": [
          "paymentProfileId",
          "type",
          "status",
          "createdAt"
        ],
        "properties": {
          "paymentProfileId": {
            "type": "string",
            "description": "Unique identifier for this payment profile.",
            "example": "f6a7b8c9-d0e1-2345-6789-abcdef012345"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "type": {
            "$ref": "#/components/schemas/PaymentMethodType",
            "description": "Type of payment method.",
            "example": "CARD"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentProfileStatus",
            "description": "Current status of the payment profile.",
            "example": "ACTIVE"
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable name for the payment method, safe to show to the customer:\n- Card: \"Visa ending in 4242\"\n- SEPA: \"Bank account ending in 3000\"\n- Swish: \"Swish +46701234567\"\n",
            "example": "Visa ending in 4242"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the customer's default payment profile.",
            "example": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date",
            "description": "When this payment profile expires (for cards).",
            "example": "2025-12-31"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payment profile was created.",
            "example": "2024-01-15T10:00:00Z"
          }
        }
      },
      "PaymentProfile": {
        "type": "object",
        "description": "A saved payment method or mandate for future use.",
        "required": [
          "paymentProfileId",
          "type",
          "status",
          "customerId",
          "createdAt"
        ],
        "properties": {
          "paymentProfileId": {
            "type": "string",
            "description": "Unique identifier for this payment profile.",
            "example": "d9f0b83a-8b0d-44a6-af7c-54b6b91b6040"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider",
            "description": "The payment provider for this payment profile.",
            "example": "STRIPE"
          },
          "type": {
            "$ref": "#/components/schemas/PaymentMethodType",
            "description": "Type of payment method.",
            "example": "CARD"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentProfileStatus",
            "description": "Current status of the payment profile.",
            "example": "ACTIVE"
          },
          "customerId": {
            "type": "string",
            "description": "Customer who owns this payment profile.",
            "example": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d"
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable name for this payment method.",
            "example": "My credit card"
          },
          "expiresAt": {
            "type": "string",
            "format": "date",
            "description": "When this payment profile expires (for cards).",
            "example": "2025-12-31"
          },
          "billingDetails": {
            "type": "object",
            "description": "Billing details associated with this payment method.",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "description": "Billing name.",
                "example": "John Doe"
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "Billing email.",
                "example": "john.doe@example.com"
              },
              "address": {
                "$ref": "#/components/schemas/Address",
                "description": "The cardholder address that the payment provider holds for this payment profile.\n\nIt is a copy from the provider. A change to the billing address of the customer does not change it.\n"
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payment profile was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CreatePaymentProfileSessionRequest": {
        "type": "object",
        "description": "Request to create a new payment profile session for setting up a saved payment method.",
        "required": [
          "orderId",
          "paymentProvider",
          "returnUrl"
        ],
        "additionalProperties": false,
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The unique identifier of the order this payment profile session is associated with.",
            "example": "9f8e7d6c-5b4a-3210-9876-543210987654"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "returnUrl": {
            "type": "string",
            "description": "The URL the customer is redirected to after the payment method is saved.",
            "example": "https://example.com/order/confirmation"
          },
          "cancelUrl": {
            "type": "string",
            "description": "The URL the customer is redirected to if they cancel before saving a payment method.",
            "example": "https://example.com/order/checkout"
          },
          "setAsDefaultPaymentProfile": {
            "type": "boolean",
            "description": "Whether to set the saved payment method as the customer's default for future payments. Defaults to false.",
            "example": false
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "PaymentProfileSessionStatus": {
        "type": "string",
        "description": "Current status of a payment profile session lifecycle.",
        "enum": [
          "PENDING",
          "REQUIRES_ACTION",
          "COMPLETED",
          "FAILED",
          "CANCELED"
        ],
        "example": "PENDING"
      },
      "PaymentProfileSession": {
        "type": "object",
        "description": "A session that walks the customer through setting up and saving a payment method for\nfuture billing, without charging them. Create one when an order requires a payment\nprofile but no upfront payment (e.g., a zero-total order), redirect the customer to\nhostedUrl, and pass the completed session's paymentProfileSessionId when submitting\nthe order. To collect an actual payment, create a payment session instead.\n",
        "required": [
          "paymentProfileSessionId",
          "orderId",
          "paymentProvider",
          "status",
          "hostedUrl",
          "metadata",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "paymentProfileSessionId": {
            "type": "string",
            "description": "The unique identifier for this payment profile session.",
            "example": "69321a62-f1fe-461f-8761-a19ae6587bb2"
          },
          "orderId": {
            "type": "string",
            "description": "The unique identifier of the order this payment profile session is associated with.",
            "example": "44567801-a504-4f09-8089-31ea78bc239b"
          },
          "paymentProvider": {
            "$ref": "#/components/schemas/PaymentProvider"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentProfileSessionStatus"
          },
          "hostedUrl": {
            "type": "string",
            "format": "uri",
            "description": "The hosted page to redirect the customer to in order to save their payment method.",
            "example": "https://payments.example.com/setup/69321a62-f1fe-461f-8761-a19ae6587bb2"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom key-value pairs for additional payment profile session information.",
            "example": {
              "source": "mobile_app",
              "campaign": "summer_2024"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payment profile session was created.",
            "example": "2024-09-29T10:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payment profile session was last updated.",
            "example": "2024-09-29T10:30:00Z"
          }
        }
      },
      "CancelPaymentProfileSessionRequest": {
        "type": "object",
        "description": "Request to cancel an active payment profile session.",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "description": "Optional reason for canceling the payment profile session.",
            "example": "Customer decided not to save payment method"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom key-value pairs for additional cancellation information.",
            "example": {
              "cancelled_by": "customer_service",
              "ticket_id": "SUPP-12345"
            }
          }
        }
      },
      "SigningStatus": {
        "type": "string",
        "description": "The current status of a signing session.",
        "enum": [
          "PENDING",
          "IN_PROGRESS",
          "COMPLETED",
          "FAILED",
          "EXPIRED",
          "CANCELLED"
        ]
      },
      "SigningSession": {
        "type": "object",
        "description": "A contract signing session for an order requiring legal signature.",
        "required": [
          "signingSessionId",
          "orderId",
          "status",
          "signerDetails",
          "createdAt"
        ],
        "properties": {
          "signingSessionId": {
            "type": "string",
            "description": "The unique identifier for this signing session.",
            "example": "f7d2295f-0dd4-4ebe-8ec5-de2d0f41be7e"
          },
          "orderId": {
            "type": "string",
            "description": "The order that requires signing.",
            "example": "44567801-a504-4f09-8089-31ea78bc239b"
          },
          "status": {
            "$ref": "#/components/schemas/SigningStatus"
          },
          "signerDetails": {
            "type": "object",
            "description": "Information about the person signing the contract.\n\nThe specific fields required depend on the signing provider. Use GET /signing/providers to discover which fields are required for each provider.\n",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "name": "John Doe",
              "email": "john.doe@example.com",
              "identity": "199001011234"
            }
          },
          "provider": {
            "type": "string",
            "description": "The signing provider used for this session.",
            "example": "bankid"
          },
          "language": {
            "type": "string",
            "description": "The language used for the signing interface.",
            "example": "en",
            "default": "en"
          },
          "redirectUrl": {
            "type": "string",
            "format": "uri",
            "description": "The URL where the user should be redirected to complete signing.",
            "example": "https://sign.provider.com/session/abc123"
          },
          "returnUrl": {
            "type": "string",
            "format": "uri",
            "description": "The URL where the user will be redirected after signing completion.",
            "example": "https://yourapp.com/orders/123/complete"
          },
          "documentUrl": {
            "type": "string",
            "format": "uri",
            "description": "Download URL for the signed contract. Only available when status is COMPLETED.",
            "example": "https://api.yourapp.com/documents/signed-contract-123.pdf"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the signing was completed. Only present when status is COMPLETED.",
            "example": "2024-01-15T14:30:00Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this signing session expires.",
            "example": "2024-01-15T23:59:59Z"
          },
          "failureReason": {
            "type": "string",
            "description": "The reason for signing failure. Only present when status is FAILED.",
            "example": "User canceled signing process"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the signing session was created.",
            "example": "2024-01-15T10:00:00Z"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Additional metadata for the signing session.",
            "example": {
              "contract_type": "postpaid_subscription",
              "customer_segment": "b2b"
            }
          }
        }
      },
      "CreateSigningSessionRequest": {
        "type": "object",
        "description": "Request to create a contract signing session for an order.",
        "required": [
          "orderId",
          "signerDetails",
          "returnUrl"
        ],
        "additionalProperties": false,
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The order that requires contract signing.",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "signerDetails": {
            "type": "object",
            "description": "Information about the person who will sign the contract.\n\nThe specific fields required depend on the signing provider. Use GET /signing/providers to discover which fields are required for each provider.\n",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "name": "John Doe",
              "email": "john.doe@example.com",
              "identity": "199001011234"
            }
          },
          "returnUrl": {
            "type": "string",
            "format": "uri",
            "description": "The URL where the user will be redirected after signing completion or failure.",
            "example": "https://yourapp.com/orders/123/complete"
          },
          "provider": {
            "type": "string",
            "description": "The preferred signing provider. If not specified, the default provider will be used.",
            "example": "bankid"
          },
          "language": {
            "type": "string",
            "description": "The language for the signing interface.",
            "default": "en",
            "example": "sv"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Additional metadata for the signing session.",
            "example": {
              "contract_type": "postpaid_subscription",
              "customer_segment": "b2b"
            }
          }
        }
      },
      "SigningRequirement": {
        "type": "string",
        "enum": [
          "OPTIONAL",
          "REQUIRED"
        ],
        "description": "Whether a signer detail field is optional or required for a signing provider.\n\n- 'OPTIONAL': The field is optional and may be omitted.\n- 'REQUIRED': The field is required and must be provided.\n"
      },
      "SigningProvider": {
        "type": "object",
        "description": "A signing provider and its requirements for signer details.",
        "required": [
          "provider",
          "name",
          "requirements"
        ],
        "properties": {
          "provider": {
            "type": "string",
            "description": "The unique identifier for the signing provider.",
            "example": "bankid"
          },
          "name": {
            "type": "string",
            "description": "The display name of the signing provider.",
            "example": "BankID"
          },
          "description": {
            "type": "string",
            "description": "A brief description of the signing provider and its use cases.",
            "example": "Swedish digital identity verification and signing service"
          },
          "supportedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of country codes where this provider is available.",
            "example": [
              "SE"
            ]
          },
          "supportedLanguages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of language codes supported by this provider.",
            "example": [
              "sv",
              "en"
            ]
          },
          "requirements": {
            "type": "object",
            "description": "Information that may or must be collected from the signer before initiating the signing process.\n\nEach key represents a field name in the signerDetails object, and the value indicates whether it's optional or required.\n",
            "additionalProperties": {
              "$ref": "#/components/schemas/SigningRequirement"
            },
            "example": {
              "name": "REQUIRED",
              "email": "REQUIRED",
              "identity": "REQUIRED"
            }
          },
          "capabilities": {
            "type": "object",
            "description": "Additional capabilities and features supported by this provider.",
            "additionalProperties": false,
            "properties": {
              "multipleSigners": {
                "type": "boolean",
                "description": "Whether the provider supports multiple signers on the same document.",
                "example": false
              },
              "documentTemplates": {
                "type": "boolean",
                "description": "Whether the provider supports custom document templates.",
                "example": true
              },
              "biometricSigning": {
                "type": "boolean",
                "description": "Whether the provider supports biometric signing methods.",
                "example": true
              }
            }
          }
        }
      },
      "ValidateAddressRequest": {
        "type": "object",
        "description": "Request to validate an address.",
        "required": [
          "address"
        ],
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/components/schemas/Address",
            "description": "The address to validate. The platform does not store it."
          },
          "purpose": {
            "type": "string",
            "description": "What the address is for. The purpose selects the rules that the address must obey.\n\n- `SERVICE`: the address where a line is used. On a US brand, it is the emergency (E911) address of the line. The platform applies the rules of the network operator, and can refuse a PO box.\n- `POSTAL`: an address that only gets post, for example the address that a SIM card goes to. The platform applies only the address format of the country that the brand serves, and accepts a PO box.\n\nIf you do not send a purpose, the platform uses `SERVICE`.\n",
            "enum": [
              "SERVICE",
              "POSTAL"
            ],
            "default": "SERVICE"
          }
        }
      },
      "AddressValidationResult": {
        "type": "object",
        "description": "Result of address validation with optional suggestions.\n\nDepending on setup, address validation is either shape based (e.g. this looks like an address),\nor verified against an address registry.\n",
        "required": [
          "valid"
        ],
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Whether the provided address is valid.",
            "example": false
          },
          "suggestedAddress": {
            "$ref": "#/components/schemas/Address",
            "description": "If provided, a suggestion for a corrected address by the underlying address validation service.\n\nDo note that this may be returned for seemingly valid addresses, where the network has a more precise or standardized version of the address.\nA typical example of this is the address is found in the networks' registry but under a different name because it contains aliases or minor formatting issues, mistyped zip codes, etc.\n"
          },
          "validationDetails": {
            "type": "object",
            "description": "Additional validation details.",
            "additionalProperties": false,
            "properties": {
              "issues": {
                "type": "array",
                "description": "Specific issues found with the address.",
                "items": {
                  "type": "object",
                  "required": [
                    "message"
                  ],
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Description of the issue found.",
                      "example": "Missing city"
                    },
                    "property": {
                      "type": "string",
                      "description": "The property or field related to the issue (e.g., \"street\", \"zipCode\").",
                      "example": "city"
                    }
                  }
                }
              }
            },
            "example": {
              "issues": [
                {
                  "message": "Missing city",
                  "property": "city"
                },
                {
                  "message": "Invalid zip format",
                  "property": "zip"
                }
              ]
            }
          }
        }
      },
      "CheckPortingEligibilityRequest": {
        "type": "object",
        "description": "Request to check if a phone number is eligible for porting.",
        "required": [
          "msisdn"
        ],
        "additionalProperties": false,
        "properties": {
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The phone number to check for porting eligibility.",
            "example": "+15551234567"
          }
        }
      },
      "PortingEligibilityResult": {
        "type": "object",
        "description": "Result of number porting eligibility check.",
        "required": [
          "eligible",
          "msisdn"
        ],
        "properties": {
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The phone number that was checked.",
            "example": "+15551234567"
          },
          "eligible": {
            "type": "boolean",
            "description": "Whether the number is eligible for porting.",
            "example": true
          },
          "networkProviderId": {
            "type": "string",
            "description": "The identifier for the current network provider, if detectable",
            "example": "tmobile-us"
          },
          "ineligibilityReason": {
            "type": "string",
            "description": "Reason why number is not eligible (only present if eligible is false).",
            "example": "Number not found or not portable"
          }
        }
      },
      "GetDeviceInfoRequest": {
        "type": "object",
        "description": "Request to get device information by IMEI.",
        "required": [
          "imei"
        ],
        "additionalProperties": false,
        "properties": {
          "imei": {
            "x-pii": "KIND_IMEI_HARDWARE_ID",
            "type": "string",
            "description": "The International Mobile Equipment Identity of the device.",
            "example": "356938035643809"
          }
        }
      },
      "DeviceInfo": {
        "type": "object",
        "description": "Information about a device based on its IMEI.",
        "required": [
          "imei",
          "esim"
        ],
        "properties": {
          "imei": {
            "x-pii": "KIND_IMEI_HARDWARE_ID",
            "type": "string",
            "description": "The device IMEI that was checked.",
            "example": "356938035643809"
          },
          "tac": {
            "type": "string",
            "description": "The device TAC (Type Allocation Code), which is the first 8 digits of the IMEI identifying the device model and manufacturer.\n",
            "example": "35693803"
          },
          "esim": {
            "type": "boolean",
            "description": "Whether the device supports eSIM.",
            "example": true
          },
          "manufacturer": {
            "type": "string",
            "description": "Device manufacturer.",
            "example": "Apple"
          },
          "model": {
            "type": "string",
            "description": "Device model.",
            "example": "A2653"
          },
          "marketingName": {
            "type": "string",
            "description": "Device marketing name.",
            "example": "iPhone 15 Pro"
          }
        }
      },
      "SearchDevicesRequest": {
        "type": "object",
        "description": "Request to find devices by name.\n\nUse this when the customer knows their device by its everyday name and not by its IMEI, for\nexample to find out whether it supports eSIM before they order.\n",
        "required": [
          "query"
        ],
        "additionalProperties": false,
        "properties": {
          "query": {
            "type": "string",
            "minLength": 2,
            "description": "Part of the device name to match, such as the brand, the model, or both.",
            "example": "iPhone 15"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 20,
            "description": "The largest number of devices to return.",
            "example": 20
          }
        }
      },
      "DeviceMatch": {
        "type": "object",
        "description": "A device the network knows by name. It carries no IMEI, because a name matches a model rather than one handset.",
        "required": [
          "esim"
        ],
        "properties": {
          "tac": {
            "type": "string",
            "description": "The device TAC (Type Allocation Code), which is the first 8 digits of an IMEI identifying the device model and manufacturer.\n",
            "example": "35693803"
          },
          "esim": {
            "type": "boolean",
            "description": "Whether the device supports eSIM.",
            "example": true
          },
          "manufacturer": {
            "type": "string",
            "description": "Device manufacturer.",
            "example": "Apple"
          },
          "model": {
            "type": "string",
            "description": "Device model.",
            "example": "A2653"
          },
          "marketingName": {
            "type": "string",
            "description": "Device marketing name.",
            "example": "iPhone 15 Pro"
          }
        }
      },
      "DeviceSearchResult": {
        "type": "object",
        "description": "The devices whose name matches the query.",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "description": "One entry per matching device. An empty list means the network knows no device by that name.",
            "items": {
              "$ref": "#/components/schemas/DeviceMatch"
            }
          }
        }
      },
      "CoverageAddress": {
        "type": "object",
        "description": "A location to check network coverage at.\n\nOnly the ZIP code and the country are required. Some networks qualify a whole postal area and\nread nothing else. Send the full address when you have it. A network that grades a point needs\nthe street and the city to place it.\n",
        "required": [
          "zip",
          "country"
        ],
        "properties": {
          "street": {
            "x-pii": "KIND_STREET_ADDRESS",
            "type": "string",
            "description": "The first line of the address, typically street and house number.",
            "example": "500 S Main St"
          },
          "street1": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated. Use `street` instead.\n\nThe first line of the address, typically street and house number.\n",
            "x-pii": "KIND_STREET_ADDRESS"
          },
          "street2": {
            "x-pii": "KIND_STREET_ADDRESS",
            "type": "string",
            "description": "The second line of the address, typically apartment, suite, unit, building, floor, etc.",
            "example": "Apt 1"
          },
          "city": {
            "type": "string",
            "description": "The city or municipality of the address.",
            "example": "Natick"
          },
          "zip": {
            "x-pii": "KIND_STREET_ADDRESS",
            "type": "string",
            "description": "The zip code of the address.\n\nDepending on the country, this may be referred to as a postal code or postcode.\n\nSpecifically for US addresses, the zip can include the optional four-digit extension (e.g., '27604-5121').\n",
            "example": "01701"
          },
          "country": {
            "type": "string",
            "description": "The two-letter country abbreviation (e.g., 'US' for United States, 'SE' for Sweden).",
            "pattern": "^[A-Z]{2}$",
            "example": "US"
          },
          "state": {
            "type": "string",
            "description": "For countries that use states or regions, the state or administrative area code (e.g., 'CA' for California in the United States).",
            "example": "CA"
          }
        }
      },
      "CheckNetworkCoverageRequest": {
        "type": "object",
        "description": "Request to check network coverage at a location.",
        "required": [
          "address"
        ],
        "additionalProperties": false,
        "properties": {
          "address": {
            "$ref": "#/components/schemas/CoverageAddress"
          }
        }
      },
      "Coordinates": {
        "type": "object",
        "description": "A geographic location in WGS84 coordinates, the standard used by GPS.",
        "required": [
          "latitude",
          "longitude"
        ],
        "properties": {
          "latitude": {
            "x-pii": "KIND_LOCATION_COORDINATES",
            "type": "number",
            "format": "float",
            "description": "Latitude in decimal degrees. Positive values are north of the equator.",
            "example": 40.7128
          },
          "longitude": {
            "x-pii": "KIND_LOCATION_COORDINATES",
            "type": "number",
            "format": "float",
            "description": "Longitude in decimal degrees. Negative values are west of the prime meridian.",
            "example": -74.006
          }
        }
      },
      "TechnologyCoverage": {
        "type": "object",
        "description": "Coverage details for a single network technology (such as 4G or 5G) at a checked location.",
        "required": [
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether this technology is available at the checked location.",
            "example": true
          }
        }
      },
      "NetworkCoverage": {
        "type": "object",
        "description": "Network coverage information for a location.\n\nNetworks answer two different questions. One resolves the address to a point and grades the\nsignal there. Another qualifies a whole postal area for activation and grades nothing. Read\n`scope` to know which answer you got, and read `serviceable` for the verdict itself.\n\nWhat data is returned depends on the underlying network provider, so only the required\nfields are guaranteed to be present.\n",
        "required": [
          "address",
          "serviceable",
          "scope"
        ],
        "properties": {
          "address": {
            "$ref": "#/components/schemas/CoverageAddress",
            "description": "The address that was checked."
          },
          "serviceable": {
            "type": "boolean",
            "description": "Whether the network serves this location. Every network answers this.\n\nA network that grades signal reports `true` when at least one technology reaches the\nlocation. A network that qualifies a postal area reports `true` when it can activate a\nsubscription there.\n",
            "example": true
          },
          "scope": {
            "type": "string",
            "enum": [
              "ADDRESS",
              "POSTAL_AREA"
            ],
            "description": "What the verdict applies to.\n\n`ADDRESS` means the network placed the exact address and answered about that point.\n`POSTAL_AREA` means the network read the zip code alone, so the same answer applies to\nevery address in it.\n",
            "example": "ADDRESS"
          },
          "coverageLevel": {
            "type": "string",
            "enum": [
              "EXCELLENT",
              "GOOD",
              "FAIR",
              "POOR",
              "NO_COVERAGE"
            ],
            "description": "Overall network coverage quality at this location.\n\nAbsent when the network grades no signal. Do not read an absent grade as poor coverage:\nread `serviceable` instead.\n",
            "example": "GOOD"
          },
          "coordinates": {
            "$ref": "#/components/schemas/Coordinates",
            "description": "Resolved coordinates for the address, if available."
          },
          "networkProviderId": {
            "type": "string",
            "description": "Which network this coverage data applies to.",
            "example": "tmobile-us"
          },
          "coverage": {
            "type": "object",
            "description": "Coverage information per technology, if available.",
            "required": [
              "3g",
              "4g",
              "5g"
            ],
            "properties": {
              "3g": {
                "$ref": "#/components/schemas/TechnologyCoverage"
              },
              "4g": {
                "$ref": "#/components/schemas/TechnologyCoverage"
              },
              "5g": {
                "$ref": "#/components/schemas/TechnologyCoverage"
              }
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/TechnologyCoverage"
            }
          },
          "roamingStatus": {
            "type": "string",
            "description": "The roaming status at this location, if reported by the network provider (e.g., whether the location is served by the home network or a roaming partner).",
            "example": "HOME"
          }
        }
      },
      "NumberType": {
        "type": "string",
        "enum": [
          "CELL",
          "FIXED",
          "DATA",
          "M2M"
        ],
        "description": "The service class of a phone number, determining what kind of subscription it can be used for.\n\n- CELL: Mobile number for voice, SMS, and data subscriptions\n- FIXED: Fixed-line (landline) number\n- DATA: Number for data-only subscriptions\n- M2M: Number for machine-to-machine/IoT subscriptions\n",
        "example": "CELL"
      },
      "LeaseNumbersRequest": {
        "type": "object",
        "description": "Request to lease phone numbers for use in orders.",
        "required": [
          "types",
          "count"
        ],
        "additionalProperties": false,
        "properties": {
          "types": {
            "type": "array",
            "minItems": 1,
            "description": "Types of numbers to lease.",
            "items": {
              "$ref": "#/components/schemas/NumberType"
            },
            "example": [
              "CELL"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "description": "Number of phone numbers to lease.",
            "example": 2
          }
        }
      },
      "LeasedNumber": {
        "type": "object",
        "description": "A phone number that has been leased for use in orders.",
        "required": [
          "msisdn",
          "type",
          "grade",
          "expiresAt"
        ],
        "properties": {
          "msisdn": {
            "type": "string",
            "format": "phone",
            "description": "The leased phone number.",
            "example": "+15551234567"
          },
          "type": {
            "$ref": "#/components/schemas/NumberType"
          },
          "grade": {
            "type": "integer",
            "description": "The grade of the number in the number pool. 30 is the standard grade, and a lower grade is a premium number.",
            "example": 30
          },
          "availableAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this number became available for leasing.",
            "example": "2024-01-15T10:00:00Z"
          },
          "leasedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this number was leased.",
            "example": "2024-01-15T10:30:00Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this lease expires if not used in an order.",
            "example": "2024-01-15T11:30:00Z"
          },
          "metadata": {
            "type": "object",
            "description": "Additional number metadata.",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "region": "New York",
              "areaCode": "555"
            }
          }
        }
      },
      "NumberLeaseResult": {
        "type": "object",
        "description": "Result of a number leasing request.",
        "required": [
          "numbers",
          "leaseToken",
          "expiresAt"
        ],
        "properties": {
          "numbers": {
            "type": "array",
            "description": "The leased phone numbers.",
            "items": {
              "$ref": "#/components/schemas/LeasedNumber"
            }
          },
          "leaseToken": {
            "type": "string",
            "description": "Token to use when creating subscription line items with these numbers.\n\nProvide this token in the `leaseToken` field when ordering or creating a subscription\nalong with the chosen `msisdn` from the leased numbers.\n",
            "example": "lease_abc123def456"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this lease expires if not used in an order.",
            "example": "2024-01-15T11:30:00Z"
          }
        }
      },
      "SimStatus": {
        "type": "string",
        "description": "Current lifecycle status of the SIM card in inventory.\n\n- AVAILABLE: In stock and free to be assigned to a subscription\n- IN_USE: Currently assigned to an active subscription\n- RESERVED: Held for a pending order or activation\n- CONSUMED: Used up and no longer assignable (for example a single-use eSIM profile)\n- BRAND_RESERVED: Set aside for a specific brand and not generally assignable\n",
        "enum": [
          "AVAILABLE",
          "IN_USE",
          "RESERVED",
          "CONSUMED",
          "BRAND_RESERVED"
        ]
      },
      "EsimProfile": {
        "type": "object",
        "description": "Live eSIM profile status from the network operator.\nShows whether the eSIM has been downloaded, installed, or enabled on a device.\n",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/EsimInstallationStatus"
          },
          "eid": {
            "type": "string",
            "description": "The EID (eSIM Identifier) assigned to the device. Empty until the eSIM is activated.",
            "example": "89049032004008882600009B40002780"
          },
          "lastOperationAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the last eUICC operation occurred for this profile.",
            "example": "2024-06-15T14:30:00Z"
          },
          "installedCount": {
            "type": "integer",
            "description": "The number of times a device installed this profile. Absent when the network operator sets no limit.",
            "example": 3
          },
          "maxCount": {
            "type": "integer",
            "description": "The maximum number of times a device can install this profile. Absent when the network operator sets no limit.",
            "example": 5
          }
        }
      },
      "InventorySim": {
        "type": "object",
        "description": "A SIM card from inventory. For eSIM cards, the response may include live installation\nstatus from the network operator when the SIM is linked to a subscription.\n",
        "required": [
          "iccid",
          "type",
          "status"
        ],
        "properties": {
          "iccid": {
            "x-pii": "KIND_SIM_ID",
            "type": "string",
            "description": "The ICCID (Integrated Circuit Card Identifier) of the SIM card.",
            "example": "8946200508271016579"
          },
          "imsi": {
            "x-pii": "KIND_SIM_ID",
            "type": "string",
            "description": "The IMSI (International Mobile Subscriber Identity) of the SIM.",
            "example": "310150000000001"
          },
          "type": {
            "$ref": "#/components/schemas/SimType"
          },
          "status": {
            "$ref": "#/components/schemas/SimStatus"
          },
          "lpa": {
            "type": "string",
            "description": "Local Profile Assistant address for eSIM activation.",
            "example": "1$rsp.example.com$ABCD1234"
          },
          "esimProfile": {
            "$ref": "#/components/schemas/EsimProfile"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the SIM was added to inventory.",
            "example": "2024-01-10T08:00:00Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the SIM was last updated in inventory.",
            "example": "2024-06-15T14:30:00Z"
          }
        }
      },
      "EmbeddedWorkflowTask": {
        "type": "object",
        "description": "Essential workflow task information for tracking webhook-triggered workflow executions.",
        "required": [
          "workflowTaskId",
          "name",
          "createdAt"
        ],
        "properties": {
          "workflowTaskId": {
            "type": "string",
            "description": "The unique identifier for the workflow task.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "name": {
            "type": "string",
            "description": "The name of the workflow that was triggered.",
            "example": "Process Customer Order"
          },
          "description": {
            "type": "string",
            "description": "A description of what the workflow task does.",
            "example": "Processes new customer orders and initiates fulfillment"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the workflow task was created.",
            "example": "2024-01-15T10:30:00Z"
          }
        }
      },
      "ReportRunStatus": {
        "type": "string",
        "description": "The current stage of a report run in its lifecycle.",
        "enum": [
          "QUEUED",
          "RUNNING",
          "SUCCEEDED",
          "FAILED"
        ]
      },
      "ReportRun": {
        "type": "object",
        "description": "A generated report and its current state. When the report has finished generating, a time-limited download link is provided so the file can be fetched directly.",
        "required": [
          "reportRunId",
          "reportKey",
          "status",
          "downloadUrl",
          "createdAt",
          "completedAt"
        ],
        "properties": {
          "reportRunId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier for this report run.",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "reportKey": {
            "type": "string",
            "description": "Identifies which report was generated.",
            "example": "subscriber_base_and_revenue"
          },
          "status": {
            "$ref": "#/components/schemas/ReportRunStatus"
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A time-limited link to download the generated file. Present only once the report has succeeded; null while it is still generating or if it failed.",
            "example": "https://example-bucket.s3.amazonaws.com/reports/f47ac10b.csv?X-Amz-Signature=..."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the report run was requested."
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the report run finished generating. Null while it is still in progress."
          }
        }
      },
      "EventEnvelope": {
        "type": "object",
        "description": "The common wrapper around every webhook delivery. Each webhook POST body contains this envelope:\na stable event identifier for deduplication, the event type to dispatch on, when the change\nhappened, and the event-specific payload in `data`.\n",
        "required": [
          "eventId",
          "type",
          "occurredAt",
          "apiRevision",
          "data"
        ],
        "properties": {
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for this event (stable for the logical event; multiple delivery attempts reuse the same id). Use for idempotency.",
            "example": "b3a2d5c4-1f2e-4a6b-9c7d-1234567890ab"
          },
          "type": {
            "type": "string",
            "description": "Event type identifier (dot namespaced, e.g. subscription.created).",
            "example": "subscription.created"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "RFC 3339 timestamp when the underlying change occurred.",
            "example": "2024-01-15T10:30:00Z"
          },
          "apiRevision": {
            "type": "string",
            "description": "The API revision that this payload is in. A delivery carries no API key, so the revision comes from the webhook setting of your account and not from a request. Admin \u003e Advanced \u003e Webhooks in the portal shows it and moves it.",
            "example": "2026-08-21.auk"
          },
          "data": {
            "description": "Event-specific payload; structure depends on event type."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request was malformed or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "The request body is invalid.",
              "code": "bad_request",
              "details": [
                {
                  "message": "Email format is invalid.",
                  "code": "invalid_email",
                  "property": "contact.email"
                }
              ],
              "hint": "Check the request payload and correct the highlighted fields."
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Too many requests have been sent in a given amount of time.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "Too many requests. Please slow down.",
              "code": "too_many_requests",
              "hint": "Retry after the number of seconds indicated in the Retry-After header."
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected error occurred on the server.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "An unexpected error occurred on the server.",
              "code": "internal_server_error",
              "hint": "Retry the request later. If the problem persists, contact support."
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Authentication is required to access this resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "Authentication is required to access this resource.",
              "code": "unauthorized",
              "hint": "Provide a valid API key in the X-Api-Key header."
            }
          }
        }
      },
      "Forbidden": {
        "description": "Access to this resource is forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "You do not have permission to perform this action.",
              "code": "forbidden",
              "hint": "Ensure your API key or user has the required permissions."
            }
          }
        }
      },
      "NotFound": {
        "description": "The requested resource was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "The requested customer could not be found.",
              "code": "not_found",
              "hint": "Verify the customerId and try again."
            }
          }
        }
      },
      "Conflict": {
        "description": "The request conflicts with the current state of the resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "The request conflicts with the current state of the resource.",
              "code": "conflict",
              "hint": "Reload the resource to get its latest state before retrying."
            }
          }
        }
      },
      "PreconditionFailed": {
        "description": "A precondition for this request was not met.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "A precondition given in the request headers was not met.",
              "code": "precondition_failed",
              "hint": "Fetch the current resource and retry with an up-to-date precondition."
            }
          }
        }
      },
      "NotImplemented": {
        "description": "This endpoint is not available for this brand. The network it asks cannot\nanswer the question, so no request will succeed until the brand is configured\nwith a network that can.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "This endpoint is not available in this environment.",
              "code": "not_implemented",
              "hint": "The network behind this brand cannot answer this request."
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The network this endpoint asks could not answer. The request was correct and\nthe endpoint is available for this brand, so the same request can succeed\nlater. Retry after a short delay.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "The service is temporarily unavailable. Please try again.",
              "code": "unavailable",
              "hint": "The network behind this brand did not answer. Try again in a moment."
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "The request is valid, but the current state of the brand or the resource refuses it. The `reason` names the condition.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "ManualChargeOnce tags are turned off on this environment.",
              "code": "failed_precondition",
              "reason": "tag_type_disabled"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "The request body is larger than the endpoint accepts.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "message": "Request body is larger than 1 MiB.",
              "code": "payload_too_large",
              "hint": "Send a smaller payload, or send the data in more than one request."
            }
          }
        }
      }
    },
    "parameters": {
      "Limit": {
        "in": "query",
        "name": "limit",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 100
        },
        "description": "The maximum number of items to return."
      },
      "Cursor": {
        "in": "query",
        "name": "cursor",
        "schema": {
          "x-pii": "KIND_NONE",
          "type": "string"
        },
        "description": "Opaque pagination token from a previous response's nextCursor."
      },
      "IdempotencyKey": {
        "in": "header",
        "name": "X-Idempotency-Key",
        "required": false,
        "description": "A unique key to ensure idempotency of requests. If a request with the same key has already been processed, the same result will be returned.\nThe key must be unique for each distinct operation. Keys are expired after 24 hours, but we recommend using a new key for each request.\n\nModified requests with the same idempotency keys are rejected with a `409 Conflict` status code.\n",
        "schema": {
          "x-pii": "KIND_NONE",
          "type": "string",
          "maxLength": 256
        }
      }
    }
  }
}
