{
  "openapi": "3.1.0",
  "info": {
    "title": "Dynamic Monetization APIs",
    "description": "APIs to perform Dynamic Monetization activity.",
    "version": "v1.1"
  },
  "servers": [
    {
      "url": "https://{siteID}.flexnetoperations.{domainExtension}/dynamicmonetization",
      "description": "Dynamic Monetization API URL",
      "variables": {
        "siteID": {
          "default": "siteID",
          "description": "Site ID for your Dynamic Monetization instance."
        },
        "domainExtension": {
          "default": "com",
          "description": "Domain extension for your Dynamic Monetization instance."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Authorization",
      "description": "APIs to manage authorization keys.",
      "x-displayName": "Authorization"
    },
    {
      "name": "Instances",
      "description": "APIs to manage Dynamic Monetization instances, which host the line items belonging to customers.",
      "x-displayName": "Instances"
    },
    {
      "name": "Rate Tables",
      "description": "APIs to manage rate tables. Rate tables are used to define the rate of items (how many tokens are charged per item).",
      "x-displayName": "Rate Tables"
    },
    {
      "name": "Line Items",
      "description": "APIs to manage line items mapped to an instance.",
      "x-displayName": "Line Items"
    },
    {
      "name": "Rules of Access",
      "description": "APIs to manage rules of access for Dynamic Monetization instances. Rules of access are used to control the way the counts of an elastic line item are used in an access request.",
      "x-displayName": "Rules of Access"
    },
    {
      "name": "Consumption Limits",
      "description": "APIs to manage Consumption Limits for end customers to control the rate  at which individual requesters can consume tokens. This helps customers to  limit excess consumption by any one individual, and pace consumption over  the duration of a line item. Once a limit is configured, it will be applied  to all requesters immediately, but any consumption before application of the  limit will not be taken into account.  When a limit is reached by a requester within the configured time period, no  further consumption by that requester will be allowed until the next reset date has been reached.",
      "x-displayName": "Consumption Limits"
    },
    {
      "name": "Sessions",
      "description": "APIs for elastic access within the context of a session.",
      "x-displayName": "Sessions"
    },
    {
      "name": "Non-Session Access Request",
      "description": "APIs for elastic access without a session.",
      "x-displayName": "Non-Session Access Request"
    },
    {
      "name": "Configuration",
      "description": "APIs for managing configuration values that control how customers can access and consume line items.",
      "x-displayName": "Configuration"
    }
  ],
  "paths": {
    "/api/v1.1/administration-keys": {
      "put": {
        "tags": [
          "Authorization"
        ],
        "operationId": "producer-admin-key-upload",
        "summary": "Save a producer administration key",
        "description": "Adds or updates a public key which can be used by a producer user to make Dynamic Monetization API requests.",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "requestBody": {
          "description": "The request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/200"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        }
      }
    },
    "/api/v1.1/administration-keys/{keyId}": {
      "delete": {
        "tags": [
          "Authorization"
        ],
        "operationId": "delete-producer-admin-key",
        "summary": "Delete a producer administration key",
        "description": "Deletes a specified producer administration key. Pass the ID of the key that you want to delete as a path parameter. It may take up to 10 minutes for the key to be fully removed after calling the API.",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/KeyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "description": "Forbidden. It is not possible to delete the last administration key. There must always be at least one key present."
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/api/v1.1/client-keys": {
      "put": {
        "tags": [
          "Authorization"
        ],
        "operationId": "client-key-upload",
        "summary": "Save a client key",
        "description": "Adds or updates a public key which can be used by a client user to make Dynamic Monetization API requests.",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "requestBody": {
          "description": "The request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/200"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        }
      }
    },
    "/api/v1.1/client-keys/{keyId}": {
      "delete": {
        "tags": [
          "Authorization"
        ],
        "operationId": "delete-client-key",
        "summary": "Delete a client key",
        "description": "Deletes a specified client key. Pass the ID of the key that you want to delete as a path parameter. It may take up to 10 minutes for the key to be fully removed after calling the API.",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/KeyId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/200"
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/api/v1.1/public-keys": {
      "get": {
        "tags": [
          "Authorization"
        ],
        "operationId": "get-public-keys",
        "summary": "Get a list of public keys",
        "description": "Gets a list of administration and client public keys.",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "name": "next",
            "in": "query",
            "description": "Enter the next page value returned by the response to the previous GET /public-keys request to get the next batch of public keys.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Number of keys to fetch.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyPageInfoResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        }
      }
    },
    "/elastic/api/v1.1/instances/{instanceId}/access-request": {
      "post": {
        "summary": "Access request for elastic tokens",
        "description": "API to request products, features or other items that will be charged for using elastic tokens.",
        "operationId": "postAccessRequest",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "tags": [
          "Non-Session Access Request"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK The request succeeded in its entirety",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/provisioning/api/v1.1/instances/{instanceId}/line-items": {
      "get": {
        "tags": [
          "Line Items"
        ],
        "summary": "Get a list of line items",
        "description": "Returns a list of line items mapped to instances owned by a producer's customer accounts.",
        "operationId": "getActivationsForInstance",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of line items for the instance ID.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProvisionedLineItem"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Line Items"
        ],
        "summary": "Map a line item to an instance",
        "description": "Maps a line item to an instance. The first time\nthis API is called, the payload details will be stored, \nand reported in a GET line-item\nrequest. If the line item is already mapped, then the details stored\nwill be entirely replaced.\n\nThis method is intended for use if you do not use FlexNet Operations as your back office, \nso that you can configure your upstream system (e.g. a CRM or back office) \nto create line items in Dynamic Monetization for your end customers. \n(If you use FlexNet Operations as your back office, but use this method directly \nto provision line items that do not exist in FlexNet Operations, then those line items \nwill not be reflected in FlexNet Operations.)\n",
        "operationId": "addActivation",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProvisionedLineItem"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returned when a line item is successfully updated."
          },
          "201": {
            "description": "Returned when a line item is successfully created."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/provisioning/api/v1.1/instances/{instanceId}/line-items/{lineItemId}": {
      "get": {
        "tags": [
          "Line Items"
        ],
        "summary": "Get a specific line item by ID",
        "description": "Returns information about a specific line item. Pass the line item ID for which you require information as a path parameter.",
        "operationId": "getLineItemById",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "responses": {
          "200": {
            "description": "The requested line item was found and returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisionedLineItem"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Line Items"
        ],
        "summary": "Delete a line item by its ID",
        "description": "Deletes a line item given its ID.\n\nThis method is intended for use if you do not use FlexNet Operations as your back office, \nso that you can manage line items in Dynamic Monetization for your end customers. \n(If you use FlexNet Operations as your back office, but use this method directly to remove \nline items that exist in FlexNet Operations, then those line items' representation in \nFlexNet Operations will not be affected.)\n",
        "operationId": "deleteLineItem",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "responses": {
          "204": {
            "description": "Line item was successfully un-mapped from the instance."
          },
          "403": {
            "description": "Forbidden. Line item must be in an OBSOLETE state before it can be deleted."
          },
          "404": {
            "description": "Line item is either not mapped to the instance, the instance does not exist, or the line item itself does not exist."
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/line-items/{lineItemId}/actions": {
      "post": {
        "tags": [
          "Rules of Access"
        ],
        "summary": "Create a list of actions and allocations for a line item",
        "description": "Creates an ordered list of actions to be taken when a condition is met.",
        "operationId": "createActions",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Action"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A list of actions that were created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Action"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Rules of Access"
        ],
        "summary": "Delete all actions on a line item",
        "description": "Deletes all actions on a line item.",
        "operationId": "deleteActions",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "responses": {
          "204": {
            "description": "Actions for the requested line item were successfully deleted."
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "description": "Actions not found or are empty for the requested line item."
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Rules of Access"
        ],
        "summary": "Get actions and allocations for a line item",
        "description": "Returns a list of actions to be taken when condition is met.\n",
        "operationId": "getActions",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of actions was returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Action"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "put": {
        "tags": [
          "Rules of Access"
        ],
        "summary": "Modify actions for a line item",
        "description": "Modifies the list of actions for a line item. The existing actions can be re-ordered, modified or omitted, and new actions can be added to the list. If an action is omitted, it will be completely removed and the current counts for a related allocation will be lost; therefore, care should be taken when making any changes.",
        "operationId": "putActions",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actions": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Action"
                        }
                      ],
                      "properties": {
                        "id": {
                          "readOnly": false
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The replacement list of actions that has been saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Action"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/line-items/actions": {
      "get": {
        "tags": [
          "Rules of Access"
        ],
        "summary": "Get all actions for all Elastic Access line items of the instance",
        "description": "API to fetch all actions for all Elastic Access line items of the instance.",
        "operationId": "getLineItemActions",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "name": "next",
            "in": "query",
            "description": "The pagination cursor returned from the previous GET request. Use it to fetch the next set of line items, along with their associated actions. \nIf there are no more line items, the returned cursor value is 0.\nIf not provided in the request, the cursor defaults to 0.\n",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of actions was returned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PageInfoActionsResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/provisioning/api/v1.1/instances": {
      "get": {
        "tags": [
          "Instances"
        ],
        "summary": "Get a list of instances",
        "description": "Returns information about instances owned by a producer's customer accounts.  \nEach customer account may have one or more instances, and each instance serves \nexactly one customer account.\n",
        "operationId": "listInstances",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "name": "next",
            "in": "query",
            "description": "Enter the next page value returned by the response to the previous GET /instances request to get the next page of instances.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Enter the number of items to return. (This number of items is not guaranteed.)",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "accountId",
            "in": "query",
            "description": "Find instances belonging to this account ID. This query parameter must be used in combination with the 'default' query parameter.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "default",
            "in": "query",
            "description": "Find the default instance for the given account ID. Must be set to 'true'.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of instances was successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageInfoResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "post": {
        "tags": [
          "Instances"
        ],
        "summary": "Create an instance",
        "description": "Creates a new instance. Each customer account may have one or more instances, \nand each instance serves exactly one customer account.\n\nThis method is intended for use if you do not use FlexNet Operations as your back office, \nso that you can configure your upstream system (e.g. a CRM) to create instances for your accounts.\n",
        "operationId": "addInstance",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Instance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully created an instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instance"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/provisioning/api/v1.1/instances/{instanceId}": {
      "get": {
        "tags": [
          "Instances"
        ],
        "summary": "Get instance by instance ID",
        "description": "Returns information about a specific instance. Pass the instance ID for which you require information as a path parameter.\n",
        "operationId": "getInstanceById",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "responses": {
          "200": {
            "description": "The instance was retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        }
      }
    },
    "/provisioning/api/v1.1/rate-tables": {
      "post": {
        "tags": [
          "Rate Tables"
        ],
        "summary": "Create a rate table",
        "description": "Creates a new rate table.\n",
        "operationId": "postRateTables",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateTable"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Rate table was successfully saved.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "409": {
            "description": "Another rate table with the same version and series exists.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Rate Tables"
        ],
        "summary": "Get all rate tables",
        "description": "Gets all the rate tables, whether the effective time of the rate table has been reached or not.\n",
        "operationId": "getRateTables",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "name": "series",
            "in": "query",
            "required": false,
            "description": "Filter rate tables by series name. If provided, only rate tables matching this series will be returned. An empty string will match rate tables with an empty series value.\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latest",
            "in": "query",
            "required": false,
            "description": "If set to 'true', returns the latest effective rate table. If set to 'false' or not provided, returns all matching rate tables.\n",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rate tables with all their details were successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RateTableResponse"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Rate Tables"
        ],
        "summary": "Delete a rate table",
        "description": "Deletes a rate table that hasn't come into effect yet.\n\nNote: Rate tables that are already in effect cannot be deleted.\n",
        "operationId": "deleteRateTables",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "parameters": [
          {
            "name": "series",
            "in": "query",
            "description": "The series of the rate table. If not specified, only a rate table with no series would be deleted.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "The version of the rate table.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Rate table was successfully deleted."
          },
          "404": {
            "description": "Rate table does not exist."
          },
          "409": {
            "description": "Rate table is already in effect."
          }
        }
      }
    },
    "/provisioning/api/v1.1/configuration": {
      "get": {
        "tags": [
          "Configuration"
        ],
        "summary": "All configuration",
        "description": "Returns all configured values. If a configuration has been modified, the response includes the date of modification and the token key ID that was used to change configuration.\n",
        "operationId": "getTenantConfigurations",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "responses": {
          "200": {
            "description": "Configuration was successfully returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "tags": [
          "Configuration"
        ],
        "summary": "Update configuration",
        "description": "Update one or more configuration values.\n\nNote:</b> Configuration changes may take up to <b>5 minutes</b> to take effect. \n    Allow for this before making dependent requests to ensure updated values have been applied.\n\n\nAccepted values:\n\n- <b>timezone.tolerant</b>\n\n  Allows a line item to be used up to 12 hours before its start date (UTC) and up to 12 hours after its end date (UTC), therefore making it tolerant to all time zones.\n    - Supported values: true (enabled) and false (disabled).\n    - Default: false\n\n- <b>session.charge.period</b>\n\n  Defines the automatic charge interval for a session. Consult the user guide for more information about session automatic charging.\n    - Supported values: ISO-8601 duration in the form `PTnH`, `PTnM`, or `PTnHnM`. Seconds are not supported.\n      - Examples:\n        - `PT1H` is every hour\n        - `PT30M` is every 30 minutes\n        - `PT1H30M` is every 90 minutes\n      - Minimum: 10 minutes\n      - Maximum: 24 hours\n    - Default: `PT1H` (every hour)\n\n- <b>safe.repeat.request.enabled</b>\n\n  Controls the safe retry mechanism for request processing.<br>\n  When enabled, clients can safely retry a request using the same correlationId, typically when the original request has timed out. The system detects repeated requests with \n  the same `correlationId` header value and treats them as duplicate submissions, preventing reprocessing.<br>\n  Duplicate request identifiers are retained for up to one hour; during this period, requests with the same `correlationId` are recognised as duplicates. After this period, the request is treated as new.<br>\n  When disabled, repeated requests are processed as new requests without duplicate detection.\n    - Supported values: true (enabled) and false (disabled).\n    - Default: false\n\n- <b>evaluation.apis.enabled</b>\n\n  Controls whether the evaluation APIs are enabled for the tenant.<br>\n  When enabled, access requests can be evaluated with `/estimation`,`/reproduction` and `/recalculation` REST APIs.<br>\n  When disabled, the evaluation APIs will return a 403 Forbidden response.\n    - Supported values: true (enabled) and false (disabled).\n    - Default: false\n",
        "operationId": "patchTenantConfigurations",
        "security": [
          {
            "AdministrationAccess": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigList"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Configuration was saved successfully."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/conditions": {
      "get": {
        "tags": [
          "Rules of Access"
        ],
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "summary": "Get all defined conditions",
        "description": "API to fetch conditions.",
        "operationId": "getConditionsOfAccess",
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionReadOnlyId"
                },
                "examples": {
                  "sampleResponse": {
                    "$ref": "#/components/examples/sampleConditionResp"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Rules of Access"
        ],
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "summary": "Create conditions",
        "description": "API to create conditions.",
        "operationId": "postConditionsOfAccess",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conditions": {
                    "$ref": "#/components/schemas/ConditionReadOnlyId"
                  }
                }
              },
              "examples": {
                "sampleResponse": {
                  "$ref": "#/components/examples/sampleConditionRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety. The response body contains a list of the conditions that were created, existing conditions are not returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionReadOnlyId"
                },
                "examples": {
                  "sampleResponse": {
                    "$ref": "#/components/examples/sampleConditionResp"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "patch": {
        "tags": [
          "Rules of Access"
        ],
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "summary": "Update conditions",
        "description": "Update existing and add new conditions to an instance.",
        "operationId": "patchConditions",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conditions": {
                    "$ref": "#/components/schemas/ConditionOptionalId"
                  }
                }
              },
              "examples": {
                "sampleRequest": {
                  "$ref": "#/components/examples/sampleConditionRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety. The response body contains a list of the conditions that were created or updated, but unchanged conditions are not returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConditionReadOnlyId"
                },
                "examples": {
                  "sampleResponse": {
                    "$ref": "#/components/examples/sampleConditionResp"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Rules of Access"
        ],
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "summary": "Delete conditions",
        "description": "Delete all conditions configured on the instance.",
        "operationId": "deleteConditionsOfAccess",
        "responses": {
          "204": {
            "description": "Conditions for requested Dynamic Monetization instance were successfully deleted."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "description": "Forbidden. Conditions cannot be deleted while being referenced by actions."
          },
          "404": {
            "description": "Conditions not found or are empty for the requested instance."
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/conditions/{conditionId}": {
      "delete": {
        "tags": [
          "Rules of Access"
        ],
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/ConditionId"
          }
        ],
        "summary": "Delete a condition by ID",
        "description": "API to delete a specific condition configured on the instance.",
        "operationId": "deleteConditionById",
        "responses": {
          "204": {
            "description": "Specified condition was successfully deleted."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "description": "Forbidden. Specified condition cannot be deleted while being referenced by actions."
          },
          "404": {
            "description": "Specified condition not found for the requested instance."
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/sessions": {
      "post": {
        "summary": "Request a new session",
        "description": "Creates a new session for elastic access.",
        "tags": [
          "Sessions"
        ],
        "operationId": "createSession",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-instance-id",
            "description": "UUID of the instance to create the session on. Required by requests that use a ClientAccess token.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitSessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "description": "Internal Server Error. The session state will be set to FAILED. To resolve this, the client should initiate a new session. If you need to contact support, please include the reference number provided in the response."
          }
        }
      },
      "get": {
        "summary": "Fetch IDLE and ACTIVE sessions",
        "description": "Returns up to 100 live sessions, sorted in descending order of creation time.",
        "tags": [
          "Sessions"
        ],
        "operationId": "getAllSessionsForInstance",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "instanceId",
            "description": "Filter sessions based on Instance UUID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LiveSessionResponse"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/sessions/{sessionId}": {
      "get": {
        "summary": "Fetch session details",
        "description": "Returns session details for the specified session ID.",
        "operationId": "getSession",
        "tags": [
          "Sessions"
        ],
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-instance-id",
            "description": "UUID of the instance the session is linked to. Required by requests that use a ClientAccess token.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sessionId",
            "description": "UUID of the session to fetch.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "summary": "Close a session",
        "description": "Closes a specified session for elastic access.",
        "operationId": "closeSession",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-instance-id",
            "description": "UUID of the instance the session is linked to. Required by requests that use a ClientAccess token.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sessionId",
            "description": "UUID of the session to be closed.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409-session"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "503": {
            "description": "API is temporarily unavailable. Try again later."
          }
        }
      },
      "put": {
        "summary": "Elastic access request in the context of a session",
        "description": "Makes an elastic access request in the context of a session.",
        "operationId": "putSessionAccessRequest",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-instance-id",
            "description": "UUID of the instance the session is linked to. Required by requests that use a ClientAccess token.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          },
          {
            "in": "path",
            "name": "sessionId",
            "description": "UUID of the session where the access request is being made.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionAccessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. The request succeeded in its entirety.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400",
            "description": "Bad Request. This error code is returned when the request contained an invalid instance ID or session ID, the instance ID is missing in the query parameter, or for an invalid request payload."
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessResponse"
                }
              }
            },
            "description": "The body may show how some item requests could have succeeded, but were not granted because the whole request had to be denied because it was an atomic request.\n"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409-session"
          },
          "500": {
            "description": "Internal Server Error. The session state will be set to FAILED. To resolve this, the client should initiate a new session. If you need to contact support, please include the reference number provided in the response."
          },
          "503": {
            "$ref": "#/components/responses/503"
          }
        }
      }
    },
    "/api/v1.1/sessions/{sessionId}/heartbeat": {
      "get": {
        "summary": "Send heartbeat",
        "description": "Sends a heartbeat for a session to keep it active.",
        "operationId": "getHeartBeat",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "x-instance-id",
            "description": "UUID of the instance the session is linked to. Required by requests that use a ClientAccess token.",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "sessionId",
            "description": "UUID of the session to keep active.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OK. The request succeeded."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "409": {
            "$ref": "#/components/responses/409-session"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/consumption-limits": {
      "put": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Create or update consumption limits for an instance",
        "description": "API to create or update consumption limits for an instance.\n",
        "operationId": "putInstanceConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consumptionLimits": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/InstanceConsumptionLimit"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully persisted consumption limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "consumptionLimits": {
                      "description": "The list of consumption limits that were successfully persisted for the instance.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstanceConsumptionLimit"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Retrieve consumption limits applied to a specific instance",
        "description": "API to retrieve the consumption limits applied to a specified instance.\n",
        "operationId": "getInstanceConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the consumption limits that are applied to the specified instance.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "consumptionLimits": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstanceConsumptionLimit"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Remove consumption limits from an instance",
        "description": "Delete all consumption limits applied to the specified instance.\nAfter this operation, consumption for the instance will no longer be restricted.\nBoth the consumed figures and the requesters with limits will be discarded.\n",
        "operationId": "deleteInstanceConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted the consumption limits."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/consumption-limits/{consumptionLimitId}/requesters": {
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Report requesters consumption for an instance's consumption limits",
        "description": "Retrieves a list of all requesters being tracked against an instance's consumption limits, along with their respective consumption amounts.\n",
        "operationId": "getInstanceRequesterConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          },
          {
            "name": "next",
            "in": "query",
            "description": "The cursor for pagination. Use the value returned in the `next` field from the previous response to get the next page of results. Use 0 for the first page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The maximum number of requesters to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 500,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the requesters consumption for the specified instance.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A paginated response containing requesters and their consumption amounts.",
                  "properties": {
                    "requesters": {
                      "type": "array",
                      "description": "List of requesters and their consumption amounts for the current page.",
                      "items": {
                        "$ref": "#/components/schemas/RequesterConsumption"
                      }
                    },
                    "next": {
                      "type": "integer",
                      "description": "The cursor for the next page of results. Use this value in the `next` query parameter to retrieve the next page. A value of 0 or null indicates there are no more pages.\n"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/line-items/{lineItemId}/consumption-limits": {
      "put": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Create or update consumption limits for a line item",
        "description": "API to create or update consumption limits for a line item.\n",
        "operationId": "putLineItemConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "consumptionLimits": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ConsumptionLimit"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully persisted consumption limits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "consumptionLimits": {
                      "description": "The list of consumption limits that were successfully persisted for the line item.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConsumptionLimit"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Retrieve consumption limits applied to a specific line item",
        "description": "API to retrieve the consumption limits applied to a specified line item.\n",
        "operationId": "getLineItemConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the consumption limits that are applied to the specified line item.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "consumptionLimits": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConsumptionLimit"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Remove consumption limits from a line item",
        "description": "Delete all consumption limits applied to the specified line item.\nAfter this operation, consumption for the line item will no longer be restricted.\nBoth the consumed figures and the requesters with limits will be discarded.\n",
        "operationId": "deleteLineItemConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted the consumption limits."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/line-items/{lineItemId}/consumption-limits/{consumptionLimitId}/requesters": {
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Report requesters consumption for a line item's consumption limits",
        "description": "Retrieves a list of all requesters being tracked against a line item's consumption limits, along with their respective consumption amounts.\n",
        "operationId": "getLineItemRequesterConsumptionLimits",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          },
          {
            "name": "next",
            "in": "query",
            "description": "The cursor for pagination. Use the value returned in the `next` field from the previous response to get the next page of results. Use 0 for the first page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The maximum number of requesters to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 500,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the requesters consumption for the specified line item.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A paginated response containing requesters and their consumption amounts.",
                  "properties": {
                    "requesters": {
                      "type": "array",
                      "description": "List of requesters and their consumption amounts for the current page.",
                      "items": {
                        "$ref": "#/components/schemas/RequesterConsumption"
                      }
                    },
                    "next": {
                      "type": "integer",
                      "description": "The cursor for the next page of results. Use this value in the `next` query parameter to retrieve the next page. A value of 0 or null indicates there are no more pages.\n"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/consumption-limits/{consumptionLimitId}/notifications": {
      "put": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Create or replace notifications for a consumption limit",
        "description": "API to create or replace notifications for a consumption limit\n\n Notifications are generated when consumption reaches one or more configured threshold percentages of the consumption limit, allowing consumers to be alerted before the limit is fully exhausted.\n",
        "operationId": "putInstanceConsumptionLimitNotifications",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notifications": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ConsumptionLimitNotification"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully persisted consumption limit notifications."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Get notifications for an instance consumption limit",
        "description": "API to get notifications that have been set on an instance consumption limit",
        "operationId": "getInstanceConsumptionLimitNotifications",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved consumption limit notifications.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsumptionLimitNotification"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Delete notifications of an instance consumption limit",
        "description": "API to delete notifications that have been configured for requesters on an instance consumption limit",
        "operationId": "deleteInstanceConsumptionLimitNotifications",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted consumption limit notifications."
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/line-items/{lineItemId}/consumption-limits/{consumptionLimitId}/notifications": {
      "put": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Create or replace notifications for a line item's consumption limit",
        "description": "API to create or replace notifications for a line item's consumption limit\n\n Notifications are generated when consumption reaches one or more configured threshold percentages of the consumption limit, allowing consumers to be alerted before the limit is fully exhausted.\n",
        "operationId": "putLineItemConsumptionLimitNotifications",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notifications": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ConsumptionLimitNotification"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully persisted consumption limit notifications."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Get notifications for a line item's consumption limit",
        "description": "API to get notifications that have been set on a line item's consumption limit",
        "operationId": "getLineItemConsumptionLimitNotifications",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved consumption limit notifications.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsumptionLimitNotification"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Delete notifications of a line item's consumption limit",
        "description": "API to delete notifications that have been configured for requesters on a line item's consumption limit",
        "operationId": "deleteLineItemConsumptionLimitNotifications",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/LineItemId"
          },
          {
            "$ref": "#/components/parameters/ConsumptionLimitId"
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted consumption limit notifications."
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/requester-groups": {
      "put": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Create or update a requester group for an instance",
        "description": "Creates a requester group for the instance, or updates an existing requester group when its `id` is supplied. A requester group is a named set of requesters that can be used when setting consumption limits.\n",
        "operationId": "putInstanceRequesterGroup",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          }
        ],
        "requestBody": {
          "description": "The information required in the request payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The unique identifier of the requester group. If a requester group with this id exists it is updated, otherwise a new requester group is created with this id. Leave it out to create a new requester group with a generated id.\n"
                  },
                  "groupName": {
                    "type": "string",
                    "description": "Display name of the requester group.",
                    "example": "engineering"
                  },
                  "requesters": {
                    "type": "array",
                    "description": "The requesters that belong to the group. A requester group must contain at least one requester.",
                    "items": {
                      "$ref": "#/components/schemas/BasicRequester"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully persisted the requester group.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The unique identifier of the created or updated requester group."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Retrieve all requester groups configured for an instance",
        "description": "Retrieves a paged list of requester groups defined for the instance, ordered by creation date. Only identification fields are returned.\n",
        "operationId": "getInstanceRequesterGroups",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "name": "next",
            "in": "query",
            "description": "The cursor for pagination. Use the value returned in the `next` field from the previous response to get the next page of results. Use 0 for the first page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The maximum number of requester groups to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 500,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the requester groups.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "A paginated response containing the requester groups of the instance.",
                  "properties": {
                    "requesterGroups": {
                      "type": "array",
                      "description": "List of requester groups for the current page.",
                      "items": {
                        "$ref": "#/components/schemas/RequesterGroup"
                      }
                    },
                    "next": {
                      "type": "integer",
                      "description": "The cursor for the next page of results. Use this value in the `next` query parameter to retrieve the next page. A value of 0 indicates there are no more pages.\n"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    },
    "/api/v1.1/instances/{instanceId}/requester-groups/{requesterGroupId}": {
      "get": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Retrieve a requester group with its requesters",
        "description": "Retrieves a requester group and a paginated list of its requesters in their defined order.\n",
        "operationId": "getInstanceRequesterGroup",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/RequesterGroupId"
          },
          {
            "name": "next",
            "in": "query",
            "description": "The cursor for pagination. Use the value returned in the `next` field from the previous response to get the next page of results. Use 0 for the first page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The maximum number of requesters to return per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 500,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved the requester group.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "The requester group with a page of its requesters.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RequesterGroup"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "created": {
                          "type": "integer",
                          "format": "int64",
                          "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the requester group was created.",
                          "example": 1704067200000
                        },
                        "modified": {
                          "type": "integer",
                          "format": "int64",
                          "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the requester group was last modified.",
                          "example": 1704067200000
                        },
                        "requesters": {
                          "type": "array",
                          "description": "The requesters of the group for the current page.",
                          "items": {
                            "$ref": "#/components/schemas/BasicRequester"
                          }
                        },
                        "next": {
                          "type": "integer",
                          "description": "The cursor for the next page of requesters. Use this value in the `next` query parameter to retrieve the next page. A value of 0 indicates there are no more pages.\n"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      },
      "delete": {
        "tags": [
          "Consumption Limits"
        ],
        "summary": "Delete a requester group from an instance",
        "description": "Deletes the specified requester group of the instance.\n",
        "operationId": "deleteInstanceRequesterGroup",
        "security": [
          {
            "AdministrationAccess": []
          },
          {
            "ClientAccess": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstanceId"
          },
          {
            "$ref": "#/components/parameters/RequesterGroupId"
          }
        ],
        "responses": {
          "204": {
            "description": "Successfully deleted the requester group."
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AdministrationAccess": {
        "description": "A JWT token signed using a private key corresponding to a named producer admin public key. May be used by a producer user for elevated API access.\nRequired claims:\n  - iss: The URI of the issuing server.\n  - nbf: The time this token is valid after, in seconds since the epoch.\n  - exp: The time this token is valid until, in seconds since the epoch.\n  - iat: The time this token was issued, in seconds since the epoch.\n  - cnf: A JSON object that contains public key identity information.\n    - kid: The ID of the public key that should be used to verify this JWT.\n    - kty: The key type, must be \"ADMIN\".\n\nExample payload\n  ```\n  {\n    \"nbf\": 1691663772,\n    \"exp\": 1699652520,\n    \"iat\": 1691663773,\n    \"iss\": \"producer.org\",\n    \"cnf\": {\n              \"jwk\" : {\n                \"kid\": \"xyz-key-id\",\n                \"kty\": \"ADMIN\"\n              }\n          }\n  }\n  ```\n",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "ClientAccess": {
        "description": "A JWT token signed using a private key corresponding to a named client\npublic key.\nMay be used by a client, or customer user to access APIs.\n\nRequired claims:\n  - iss: The URI of the issuing server.\n  - nbf: The time this token is valid after, in seconds since the epoch.\n  - exp: The time this token is valid until, in seconds since the epoch.\n  - iat: The time this token was issued, in seconds since the epoch.\n  - aud: A list of instance IDs that this token will allow access to.\n  - cnf: A JSON object that contains public key identity information.\n    - kid: The ID of the public key that should be used to verify this JWT.\n    - kty: The key type, must be \"CLIENT\".\n\nExample payload\n  ```\n  {\n    \"nbf\": 1691663772,\n    \"exp\": 1699652520,\n    \"iat\": 1691663773,\n    \"iss\": \"producer.org\",\n    \"aud\":[\"47c173d4-a262-44ba-992c-63b0436fecc5\"],\n    \"cnf\": {\n              \"jwk\" : {\n                \"kid\": \"xyz-key-id\",\n                \"kty\": \"CLIENT\"\n              }\n          }\n  }\n  ```\n",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "AuthKeyItem": {
        "description": "A named public key.",
        "type": "object",
        "properties": {
          "publicKey": {
            "description": "A public key in PEM format.",
            "type": "string",
            "example": "-----BEGIN PUBLIC KEY-----\\nMIIBgjAcBgoqhkiG9w0BD...\\n-----END PUBLIC KEY-----"
          },
          "id": {
            "description": "Your identifier for the key. This identifier must be added as a claim in a JWT token signed with the corresponding private key, in order to indicate which public key should be used to verify the JWT is valid.",
            "type": "string",
            "example": "xyz"
          }
        }
      },
      "AuthKeyRequest": {
        "description": "Array of public keys.",
        "type": "array",
        "minimum": 1,
        "maximum": 20,
        "items": {
          "$ref": "#/components/schemas/AuthKeyItem"
        }
      },
      "PublicKey": {
        "type": "object",
        "description": "A public key",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifies the public key."
          },
          "type": {
            "type": "string",
            "description": "Type of the public key (administration-key or client-key)."
          },
          "publicKey": {
            "type": "string",
            "description": "A public key in PEM format."
          },
          "created": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the key was created.",
            "format": "int64"
          },
          "modified": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the key was last modified.",
            "format": "int64"
          }
        }
      },
      "KeyPageInfoResponse": {
        "type": "object",
        "description": "A page of public keys.",
        "properties": {
          "keys": {
            "type": "array",
            "description": "The public keys.",
            "items": {
              "$ref": "#/components/schemas/PublicKey"
            }
          },
          "next": {
            "type": "integer",
            "description": "Use this page value in your next GET /public-keys request to fetch the next batch of public keys."
          }
        }
      },
      "BasicRequester": {
        "description": "Requester details",
        "type": "object",
        "properties": {
          "type": {
            "description": "Type of the requester.",
            "type": "string"
          },
          "value": {
            "description": "Unique identifier for the requester.",
            "type": "string"
          }
        }
      },
      "Requester": {
        "description": "Requester details",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasicRequester",
            "properties": {
              "dictionary": {
                "description": "Dictionary of additional information about the requester. Will be used to evaluate actions defined on line items.",
                "type": "object"
              }
            },
            "required": [
              "type",
              "value"
            ]
          }
        ]
      },
      "metaData": {
        "description": "(Optional) For sending custom data with the request, which will be sent to the data warehouse with the usage information to assist with analyzing access activity. The meta data content must be a valid JSON object.",
        "type": "object"
      },
      "RequestedItemRequest": {
        "description": "The details of a requested item.",
        "type": "object",
        "properties": {
          "item": {
            "description": "The requested item.",
            "type": "string"
          },
          "version": {
            "description": "The version of the item requested. This field may only be omitted or left blank if the intention is to access an item in a rate table with an empty or unspecified version.",
            "type": "string"
          },
          "count": {
            "description": "Number of instances of the requested item required. The value can be fractional.",
            "type": "number",
            "format": "double"
          },
          "variables": {
            "type": "object",
            "description": "A collection of named input values used for evaluating formula-based token consumption in an access request. Each key represents a variable identifier referenced in the configured rate table formula, and the corresponding value is the numeric input used to evaluate the formula.\n\nThe `variables` field is mutually exclusive with the `count` field. Requests must include either `count` (for fixed-rate) or `variables` (for formula-based), but not both.\n\n- At least one variable must be provided.\n- Variable names must match those defined in the formula.\n- Variable values must be numeric.\n"
          },
          "metaData": {
            "$ref": "#/components/schemas/metaData"
          }
        }
      },
      "AccessRequest": {
        "description": "Body of access request.",
        "type": "object",
        "properties": {
          "requester": {
            "description": "Requester details.",
            "type": "object",
            "$ref": "#/components/schemas/Requester"
          },
          "requestedItems": {
            "description": "A list of requested items.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestedItemRequest"
            }
          }
        },
        "required": [
          "requester",
          "requestedItems"
        ]
      },
      "LineItem": {
        "type": "object",
        "properties": {
          "rate": {
            "description": "Rate applied. The value can be fractional.",
            "type": "number",
            "format": "double"
          },
          "formula": {
            "description": "The formula used to calculate the charge for this line item. This field is only applicable if the line item was charged based on a formula. If the charge was based on a fixed rate, this field will be absent.",
            "type": "string"
          },
          "activationId": {
            "description": "Activation ID of line item charged to fulfill the request.",
            "type": "string"
          },
          "tokensCharged": {
            "description": "Number of tokens charged. The value can be fractional.",
            "type": "number",
            "format": "double"
          },
          "actionId": {
            "description": "Unique identifier of the action and allocation used if the access request was fulfilled from an allocation within the line item.",
            "type": "string",
            "format": "uuid"
          },
          "consumptionLimitId": {
            "description": "Unique identifier of the consumption limit used when the access request was fulfilled from a consumption limit on the line item.",
            "type": "string",
            "example": "autoTracked"
          }
        }
      },
      "status": {
        "type": "object",
        "description": "The response status to the request for the specific item.",
        "properties": {
          "code": {
            "description": "Possible values\n* 1001 (Successfully checked out)\n* 1002 (No Status)\n* 2001 (Item not found in any effective rate table)\n* 3001 (No valid active line items)\n* 3006 (Insufficient count available)\n* 3007 (Requester consumption limit exceeded)\n* 4001 (Failed due to internal server error) There was an internal error processing the request. If you need to contact support, please include the correlationId provided in the response.\n",
            "type": "string"
          },
          "description": {
            "description": "A user-readable message explaining the status code.",
            "type": "string",
            "example": "Successfully checked out."
          }
        }
      },
      "RequestedItem": {
        "type": "object",
        "properties": {
          "count": {
            "description": "Number of instances of the requested item granted. The value can be fractional.",
            "type": "number",
            "format": "double"
          },
          "variables": {
            "type": "object",
            "description": "The variables associated with the requested item that were used to calculate tokens required based on formula.\nResponse will have either `count` or `variables` depending on what was sent in the request."
          },
          "item": {
            "description": "The name of a requested item.",
            "type": "string"
          },
          "version": {
            "description": "The version of a requested item.",
            "type": "string"
          },
          "totalTokensCharged": {
            "description": "Total number of tokens charged across all line items. The value can be fractional.",
            "type": "number",
            "format": "double"
          },
          "lineItems": {
            "description": "List of line items charged to fulfill this request.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            }
          },
          "status": {
            "$ref": "#/components/schemas/status"
          }
        }
      },
      "ConsumptionLimitNotificationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier of the consumption limit that triggered the notification.",
            "type": "string",
            "example": "autoTracked"
          },
          "message": {
            "description": "Notification message describing the configured consumption threshold that was crossed and the current consumption percentage of the consumption limit after the access request was processed.",
            "type": "string",
            "example": "Requester usage has exceeded the 25% consumption limit threshold. Usage is currently at 25.5%."
          }
        }
      },
      "CorrelationId": {
        "description": "An ID which allows correlation of the request with usage information obtained from the data warehouse.\n",
        "type": "string"
      },
      "AccessResponse": {
        "description": "The response to the access request.",
        "type": "object",
        "properties": {
          "requestedItems": {
            "description": "List of requested items.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestedItem"
            }
          },
          "instanceConsumptionLimitId": {
            "description": "Unique identifier of the consumption limit used when the access request was fulfilled from a consumption limit on the instance.",
            "type": "string",
            "example": "autoTracked"
          },
          "notifications": {
            "description": "Notification details for this access request when a consumption limit is\nconfigured with `notificationId` set to `accessResponseBody` and consumption\ncrosses a configured threshold percentage of the consumption limit.\n\nIf multiple thresholds are crossed while processing the request, the\nresponse includes only the highest threshold crossed.\n\nThe same threshold can appear again in a later response if consumption drops\nbelow that threshold and subsequently crosses it again.\n",
            "type": "object",
            "properties": {
              "instanceConsumptionLimit": {
                "description": "Notification details for the instance consumption limit.",
                "$ref": "#/components/schemas/ConsumptionLimitNotificationResponse"
              },
              "lineItemConsumptionLimit": {
                "description": "Notification details for line item consumption limits.",
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ConsumptionLimitNotificationResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "activationId": {
                          "description": "Activation ID associated with the consumption limit.",
                          "type": "string",
                          "example": "act1"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "requester": {
            "description": "The details of the requester making the access request.",
            "type": "object",
            "$ref": "#/components/schemas/Requester"
          },
          "correlationId": {
            "$ref": "#/components/schemas/CorrelationId"
          }
        }
      },
      "LineItemState": {
        "type": "string",
        "description": "The line item state. Valid states are:\n  - DEPLOYED\n  - INACTIVE\n  - OBSOLETE\n\nINACTIVE and OBSOLETE can only be set when the line item already exists.<br>\nAn OBSOLETE line item cannot be set to INACTIVE or DEPLOYED.\n"
      },
      "Attributes": {
        "type": "object",
        "description": "The properties that determine how the service will respond to access requests.",
        "properties": {
          "elastic": {
            "type": "boolean",
            "description": "Indicates whether the line item is elastic.",
            "default": false
          },
          "rateTableSeries": {
            "type": "string",
            "description": "The rate table series used to determine the rate applied to Elastic access requests against this line item. An empty string indicates that the rate is determined by the latest version of a table with no series.",
            "default": ""
          },
          "overdraftLimit": {
            "type": "integer",
            "description": "Allow requests to continue consuming tokens from this line item after the entitled quantity has been fully consumed, up to the overdraft limit. \nThe overdraftType field must be set to \"Number\" if an overdraft limit is provided.\nTo consume tokens from this line item indefinitely, set the overdraftType to \"Unlimited\", and an overdraft limit is not required.\nIf an overdraft limit is not set, requests can only consume from this line item until the entitled quantity is reached.\n"
          },
          "overdraftType": {
            "type": "string",
            "description": "The type of overdraft. Valid types are: \n- Unlimited\n- Number\n"
          },
          "resetFrequency": {
            "type": "string",
            "description": "Specifies how often the line item’s used count is reset. The reset schedule is applied relative to the line item start date and determines when consumption totals are set back to zero.\nThe value must be an ISO-8601 duration using exactly one of the following formats:\n- PnD — days\n- PnW — weeks\n- PnM — months\n- PnY — years\n\n<b>Note:</b>\n- Mixed or compound durations such as P1Y2M, P2M10D, or P1W3D are not allowed.\n- The shortest permitted interval is one day (P1D) and the longest is one year (P1Y).\n- Day-based durations are treated literally and are not converted into months or years. For example, use P1M for a monthly reset rather than P30D or P31D.\n- When a reset frequency is first applied, the next reset point is calculated from the line item start date. Setting or changing the reset frequency does not immediately reset consumption; it only affects the calculation of the next reset boundary.\n- When the reset frequency property is removed from a line item, upcoming scheduled reset will not take place. Consumption will not reset automatically until a new reset frequency is applied, and existing usage counts remain unchanged.\n",
            "example": "P1M"
          }
        }
      },
      "ProvisionedLineItem": {
        "required": [
          "activationId",
          "state",
          "attributes",
          "start",
          "end",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "activationId": {
            "type": "string",
            "description": "The activation ID of a line item that should be mapped to the instance.\n"
          },
          "state": {
            "$ref": "#/components/schemas/LineItemState"
          },
          "quantity": {
            "minimum": 1,
            "type": "integer",
            "description": "The quantity from the line item to map to the instance.\n",
            "format": "int64"
          },
          "start": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the line item starts.",
            "format": "int64"
          },
          "end": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the line item ends.",
            "format": "int64"
          },
          "used": {
            "type": "number",
            "description": "The count from the line item quantity used by access requests. The value can be fractional.",
            "format": "double",
            "readOnly": true
          },
          "attributes": {
            "$ref": "#/components/schemas/Attributes"
          }
        },
        "description": "Defines the properties of a line item.\n"
      },
      "Action": {
        "description": "An action to be taken when a condition is met.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "A generated identifier to uniquely identify the action.",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "A human readable name to help a user identify the action. The same name may be re-used in other line items."
          },
          "conditionId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the condition that triggers this action.\n\nRequired, unless defining a default action. Only one default action may be defined per line item.\n"
          },
          "action": {
            "type": "string",
            "description": "The action to take when the condition is met.",
            "enum": [
              "ALLOW",
              "DENY"
            ]
          },
          "allocation": {
            "type": "number",
            "description": "The maximum number of tokens that may be consumed from the stated line item by requests satisfying the condition.\n\nRequired for ALLOW, but may be omitted at most once per line item to create a default ALLOW action.\nNot used for DENY.\n",
            "format": "number",
            "example": 1000
          },
          "used": {
            "type": "number",
            "description": "The total count that has been consumed from the allocation by access requests.\n\nThis field is only present for actions which have an allocation.\n",
            "format": "double",
            "readOnly": true
          }
        },
        "required": [
          "action"
        ]
      },
      "ActivationActions": {
        "type": "object",
        "properties": {
          "lineItemId": {
            "type": "string",
            "description": "The activation ID of the line item."
          },
          "actions": {
            "type": "array",
            "description": "The list of actions for the line item.",
            "items": {
              "$ref": "#/components/schemas/Action"
            }
          }
        },
        "description": "An ordered list of actions that are defined for the line-item.\n"
      },
      "PageInfoActionsResponse": {
        "type": "object",
        "properties": {
          "lineItems": {
            "type": "array",
            "description": "The list of instances.",
            "items": {
              "$ref": "#/components/schemas/ActivationActions"
            }
          },
          "next": {
            "type": "integer",
            "description": "If there are more actions to get, this value will be non-zero and can be used in a subsequent GET request to retrieve the next page of actions."
          }
        },
        "description": "A page of line items with actions."
      },
      "Instance": {
        "required": [
          "accountId",
          "shortName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the instance.",
            "readOnly": true
          },
          "shortName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "User-defined name of the instance."
          },
          "accountId": {
            "type": "string",
            "description": "ID of the customer account owning the instance.",
            "minLength": 1
          },
          "defaultInstance": {
            "type": "boolean",
            "description": "Indicates whether this is the default instance for an account. If\nset to true, auto-provisioned line items will be mapped to this\ninstance.\n",
            "readOnly": true
          },
          "created": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the instance was created.",
            "format": "int64",
            "readOnly": true
          },
          "modified": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the instance was last modified.",
            "format": "int64",
            "readOnly": true
          }
        },
        "description": "An instance"
      },
      "PageInfoResponse": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "description": "The list of instances.",
            "items": {
              "$ref": "#/components/schemas/Instance"
            }
          },
          "next": {
            "type": "integer",
            "description": "Use this page value in your next GET /instances request to fetch the next page of instances."
          }
        },
        "description": "A page of instances."
      },
      "RateTableItemResponse": {
        "description": "An item that has a rate defined in a rate table.",
        "required": [
          "name",
          "rate"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the item.",
            "minLength": 1,
            "maxLength": 100
          },
          "version": {
            "type": "string",
            "description": "Version of the item."
          },
          "rate": {
            "type": "number",
            "description": "Rate of the item. The value can be fractional.",
            "format": "double",
            "minimum": 0
          },
          "formula": {
            "type": "string",
            "description": "A spreadsheet-style formula used to calculate the number of elastic tokens required for this item.\n"
          }
        }
      },
      "RateTableResponse": {
        "description": "Rate table defining the cost of using each item detailed.",
        "type": "object",
        "properties": {
          "created": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the rate table was created.",
            "format": "int64",
            "readOnly": true
          },
          "effectiveFrom": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the rate table starts to take effect.",
            "format": "int64"
          },
          "series": {
            "type": "string",
            "description": "A means of grouping similar rate tables of different versions."
          },
          "version": {
            "type": "string",
            "description": "The version of this rate table."
          },
          "items": {
            "type": "array",
            "description": "List of rate table items.",
            "items": {
              "$ref": "#/components/schemas/RateTableItemResponse"
            }
          }
        }
      },
      "RateTableItem": {
        "description": "An item that has a rate defined in a rate table.",
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the item.",
            "minLength": 1,
            "maxLength": 100
          },
          "version": {
            "type": "string",
            "description": "Version of the item."
          },
          "rate": {
            "type": "number",
            "description": "Rate of the item. The value can be fractional. Do not specify a rate when using a formula.",
            "format": "double",
            "minimum": 0
          },
          "formula": {
            "type": "string",
            "description": "A spreadsheet-style formula that can be used instead of a rate. Each item must have either a rate or a formula, but not both.\n\nSupported functions:`FLOOR.MATH(x)`, `CEILING.MATH(x)`, `POWER(x,y)`, `PRODUCT(x,y)`, `SUM(x,y)`, `ABS(x)`, `MIN(x,y)`, `MAX(x,y)`, `ROUND(x,precision)` Supported operators: `+`,`-`, `*`, `/`, `^` (power).\n\nParentheses can be used to override operator precedence.  Variables are case-insensitive and are replaced at evaluation time with values supplied in the access request.  Numeric literals (integers and decimals) and negative numbers are supported.\n\nExamples:\n  - FLOOR.MATH(1.6423169)\n  - POWER(3, 9.57) + quantity\n  - load * quantity\n  - (baseRate + surcharge) * discount\n"
          }
        }
      },
      "RateTable": {
        "description": "Rate table defining the cost of using each item detailed.",
        "type": "object",
        "properties": {
          "created": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the rate table was created.",
            "format": "int64",
            "readOnly": true
          },
          "effectiveFrom": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the rate table starts to take effect.",
            "format": "int64"
          },
          "series": {
            "type": "string",
            "description": "A means of grouping similar rate tables of different versions."
          },
          "version": {
            "type": "string",
            "description": "The version of this rate table."
          },
          "items": {
            "type": "array",
            "description": "List of rate table items.",
            "items": {
              "$ref": "#/components/schemas/RateTableItem"
            }
          }
        }
      },
      "ConfigItem": {
        "description": "Details of the configuration.",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the configuration, one of:\n- timezone.tolerant\n- session.charge.period\n- safe.repeat.request.enabled\n- evaluation.apis.enabled\n"
          },
          "value": {
            "type": "string",
            "description": "The value of the configuration."
          },
          "modified": {
            "type": "number",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the configuration was last modified. This field is returned only if the configuration has been changed from its default value.",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "description": "Public key identifier of the JWT token that was used to update this configuration. This key ID allows you to identify the user or users who are authorized to make this change. This field is returned only if the configuration has been changed from its default value.",
            "readOnly": true
          }
        }
      },
      "ConfigList": {
        "description": "List of configurations.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ConfigItem"
        }
      },
      "AttributeCondition": {
        "type": "object",
        "properties": {
          "operator": {
            "description": "The logical operator to apply.",
            "type": "string",
            "enum": [
              "IN"
            ]
          },
          "property": {
            "description": "The dictionary key.",
            "type": "string"
          },
          "values": {
            "description": "The different values to match.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "operator",
          "property",
          "values"
        ]
      },
      "CompositeCondition": {
        "type": "object",
        "properties": {
          "operator": {
            "description": "The logical operator to apply.",
            "type": "string",
            "enum": [
              "AND",
              "OR"
            ]
          },
          "conditions": {
            "description": "Conditions to apply according to the logical operator.\nNote: The nesting depth is limited to 3 levels.\n",
            "type": "array",
            "minItems": 2,
            "maxItems": 4,
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AttributeCondition"
                },
                {
                  "$ref": "#/components/schemas/CompositeCondition"
                },
                {
                  "$ref": "#/components/schemas/UnaryCondition"
                }
              ]
            }
          }
        },
        "required": [
          "operator",
          "conditions"
        ]
      },
      "UnaryCondition": {
        "type": "object",
        "properties": {
          "operator": {
            "description": "The logical operator to apply.",
            "type": "string",
            "enum": [
              "NOT"
            ]
          },
          "condition": {
            "description": "Condition to apply according to the logical operator.\nNote: The nesting depth is limited to 3 levels.\n",
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/AttributeCondition"
              },
              {
                "$ref": "#/components/schemas/CompositeCondition"
              },
              {
                "$ref": "#/components/schemas/UnaryCondition"
              }
            ]
          }
        },
        "required": [
          "operator",
          "condition"
        ]
      },
      "Condition": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "A human readable name to help a user identify the condition. Not required to be unique."
          }
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/AttributeCondition"
          },
          {
            "$ref": "#/components/schemas/CompositeCondition"
          },
          {
            "$ref": "#/components/schemas/UnaryCondition"
          }
        ]
      },
      "ConditionReadOnlyId": {
        "description": "List of conditions",
        "type": "array",
        "items": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "description": "A generated identifier to uniquely identify the condition.",
                  "type": "string",
                  "format": "uuid",
                  "readOnly": true
                }
              }
            },
            {
              "$ref": "#/components/schemas/Condition"
            }
          ]
        }
      },
      "ConditionOptionalId": {
        "description": "List of conditions",
        "type": "array",
        "items": {
          "allOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "description": "The identifier of a condition to be modified. If an identifier is not provided, a new condition will be created with a generated identifier.",
                  "type": "string",
                  "format": "uuid"
                }
              }
            },
            {
              "$ref": "#/components/schemas/Condition"
            }
          ]
        }
      },
      "LiveSessionResponse": {
        "description": "The response to the live session request.",
        "type": "object",
        "properties": {
          "sessionId": {
            "description": "UUID of the session.",
            "type": "string",
            "format": "uuid"
          },
          "instanceId": {
            "description": "UUID of the instance that this session operates on.",
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "description": "Current state of this session.",
            "type": "string",
            "enum": [
              "IDLE",
              "ACTIVE"
            ]
          },
          "chargedUntil": {
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, of the last scheduled automatic charge.",
            "type": "integer"
          },
          "lastHeartBeat": {
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the last heartbeat was received.",
            "type": "integer"
          },
          "lastAccessRequest": {
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the last access request was received for the session.",
            "type": "integer"
          }
        }
      },
      "SessionRequest": {
        "description": "Body of session request",
        "type": "object",
        "properties": {
          "instanceId": {
            "description": "UUID of the instance, used while creating a new session.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "instanceId"
        ]
      },
      "InitSessionResponse": {
        "description": "The response to the session request.",
        "type": "object",
        "properties": {
          "sessionId": {
            "description": "UUID of the session created.",
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SessionItem": {
        "description": "Item used in the session.",
        "type": "object",
        "properties": {
          "item": {
            "description": "The name of an item.",
            "type": "string"
          },
          "version": {
            "description": "The version of an item.\nMust match the item version in the rate table exactly.\nIf empty, it will only match an item in the rate table with an empty version field.\nWild cards are not supported.\n",
            "type": "string"
          },
          "count": {
            "description": "Number of instances of the requested item being used in the session. The value can be fractional.",
            "type": "number",
            "format": "double"
          },
          "variables": {
            "type": "object",
            "description": "A collection of named input values used for evaluating formula-based token consumption in an access request. The session item will have either `count` or `variables` depending on what was sent in the request."
          }
        }
      },
      "SessionResponse": {
        "description": "The response to the session request.",
        "type": "object",
        "properties": {
          "sessionId": {
            "description": "UUID of the session.",
            "type": "string",
            "format": "uuid"
          },
          "instanceId": {
            "description": "UUID of the instance linked to this session.",
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "description": "Current state of this session.",
            "type": "string",
            "enum": [
              "IDLE",
              "ACTIVE",
              "TERMINATED",
              "FAILED"
            ]
          },
          "items": {
            "uniqueItems": true,
            "type": "array",
            "description": "The items in this session.",
            "items": {
              "$ref": "#/components/schemas/SessionItem"
            }
          }
        }
      },
      "SessionAccessRequest": {
        "description": "Body of access request",
        "type": "object",
        "properties": {
          "requester": {
            "description": "Requester details",
            "type": "object",
            "$ref": "#/components/schemas/Requester"
          },
          "rollbackOnDeny": {
            "description": "When true, if the request cannot be granted the session will revert to the combination of items it was charging for before the request was made. When false, if the request cannot be granted the session will refund all items it was charging for before the request was made, and the session state will be set to TERMINATED. The amount refunded will be calculated using the time of the denied request up until the end of the period that has been charged for.",
            "type": "boolean"
          },
          "requestedItems": {
            "description": "A list of requested items. Provide an empty list to stop using all items.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestedItemRequest"
            }
          }
        },
        "required": [
          "requester",
          "rollbackOnDeny",
          "requestedItems"
        ]
      },
      "InstanceConsumptionLimit": {
        "description": "Consumption limits applied to the instance.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the consumption limit.\n",
            "readOnly": true,
            "example": "autoTracked"
          },
          "limit": {
            "type": "integer",
            "description": "The maximum number of elastic tokens that a requester can consume from the specified instance before the next reset date. The instance consumption limit will be applied before any line item consumption limits. If the instance consumption limit is reached,  all requests to consume elastic tokens from the instance will be rejected until the next reset date,  even if the line item consumption limit has not been reached.\n",
            "format": "int64",
            "example": 1000
          },
          "resetFrequency": {
            "type": "string",
            "description": "Specifies how often the consumption limit resets. The value must be an ISO 8601 duration using exactly one of the following formats:\n- `PnD` (days)\n- `PnW` (weeks)\n- `PnM` (months)\n- `PnY` (years)\n\nwhere `n` is a whole number.\n\nExamples of valid values: `P1D`, `P1W`, `P1M`, `P1Y`. Mixed values such as `P1Y2M` or `P2M10D` are not allowed.\n\nNotes:\n- The shortest interval permitted is one day (`P1D`) and the longest is one year (`P1Y`).\n- A given number of days will be treated literally, and not converted to months. So if one month is required, use P1M and not P31D.\n",
            "example": "P1M"
          },
          "firstResetDate": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the consumption limit will first reset. Important: Avoid setting this limit too close to the current time. Doing so can cause the request to be rejected due to insufficient processing time.\n",
            "format": "int64",
            "example": 1704067200000
          },
          "overdraft": {
            "type": "integer",
            "minimum": 0,
            "description": "Optional. The number of elastic tokens that a requester can consume beyond the specified limit before the next reset date.\n",
            "format": "int64",
            "example": 100
          },
          "created": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the consumption limit was created.\n",
            "format": "int64",
            "readOnly": true,
            "example": 1704067200000
          },
          "modified": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the consumption limit was last modified.\n",
            "format": "int64",
            "readOnly": true,
            "example": 1704067200000
          }
        }
      },
      "RequesterConsumption": {
        "type": "object",
        "description": "Represents a requester's consumption information.",
        "required": [
          "value",
          "type",
          "consumed"
        ],
        "properties": {
          "value": {
            "type": "string",
            "description": "The identifier value of the requester"
          },
          "type": {
            "type": "string",
            "description": "The type of requester identifier."
          },
          "consumed": {
            "type": "number",
            "description": "The amount consumed by this requester."
          }
        }
      },
      "ConsumptionLimit": {
        "description": "Consumption limits applied to the line item.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the consumption limit.\n",
            "readOnly": true,
            "example": "autoTracked"
          },
          "limit": {
            "type": "integer",
            "description": "The maximum number of elastic tokens that a requester can consume from the specified line item before the next reset date\n",
            "format": "int64",
            "example": 1000
          },
          "resetFrequency": {
            "type": "string",
            "description": "Specifies how often the consumption limit resets. The value must be an ISO 8601 duration using exactly one of the following formats:\n- `PnD` (days)\n- `PnW` (weeks)\n- `PnM` (months)\n- `PnY` (years)\n\nwhere `n` is a whole number.\n\nExamples of valid values: `P1D`, `P1W`, `P1M`, `P1Y`. Mixed values such as `P1Y2M` or `P2M10D` are not allowed.\n\nNotes:\n- The shortest interval permitted is one day (`P1D`) and the longest is one year (`P1Y`).\n- A given number of days will be treated literally, and not converted to months. So if one month is required, use P1M and not P31D.\n",
            "example": "P1M"
          },
          "firstResetDate": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the consumption limit will first reset. Important: Avoid setting this limit too close to the current time. Doing so can cause the request to be rejected due to insufficient processing time.\n",
            "format": "int64",
            "example": 1704067200000
          },
          "overdraft": {
            "type": "integer",
            "minimum": 0,
            "description": "Optional. The number of elastic tokens that a requester can consume beyond the specified limit before the next reset date.\n",
            "format": "int64",
            "example": 100
          },
          "created": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00 UTC, when the consumption limit was created.\n",
            "format": "int64",
            "readOnly": true,
            "example": 1704067200000
          },
          "modified": {
            "type": "integer",
            "description": "The date and time, in milliseconds since 1970-01-01 00:00, when the consumption limit was last modified.\n",
            "format": "int64",
            "readOnly": true,
            "example": 1704067200000
          }
        }
      },
      "ConsumptionLimitNotification": {
        "description": "Notification details specifying thresholds and notification id.",
        "type": "object",
        "properties": {
          "notificationId": {
            "type": "string",
            "description": "The ID of the notification to trigger when the threshold is reached.\n\nCurrently, 'accessResponseBody' is the only supported notification ID. When configured, notification details are included in the access request response body.\n",
            "example": "accessResponseBody"
          },
          "notifyAt": {
            "type": "array",
            "description": "The consumption thresholds, expressed as percentages of the consumption limit (excluding any overdraft), at which notifications should be triggered.\n\n- Up to 10 threshold values can be specified.\n- Each value must be between 1 and 100 (inclusive).\n\nFor example, if the consumption limit is 1,000 and notifyAt is [50, 75], notifications will be triggered when consumption reaches 500 and 750, respectively.\n",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "minItems": 1,
            "maxItems": 10,
            "example": [
              50,
              75
            ]
          }
        }
      },
      "RequesterGroup": {
        "type": "object",
        "description": "Requester group details.",
        "required": [
          "id",
          "groupName"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier assigned to the requester group when it is created.",
            "readOnly": true
          },
          "groupName": {
            "type": "string",
            "description": "Display name of the requester group.",
            "example": "engineering"
          }
        }
      }
    },
    "responses": {
      "200": {
        "description": "OK. The request succeeded in its entirety."
      },
      "400": {
        "description": "Bad Request. Check the request for any errors in the input."
      },
      "401": {
        "description": "Unauthorized. Check authentication details."
      },
      "403": {
        "description": "Forbidden. The user is forbidden from performing this operation. Check user permissions."
      },
      "404": {
        "description": "Resource not found. The requested resource is not available."
      },
      "500": {
        "description": "Internal Server Error. There was an internal error processing the request. If you need to contact support, please include the reference number provided in the response."
      },
      "503": {
        "description": "API is temporarily unavailable. Try again later."
      },
      "409-session": {
        "description": "Returned when the session is in one of the following states: FAILED, TERMINATED, or DISCONNECTED. In these cases, initiate a new session. If the session is LOCKED due to a resource conflict, retry the request. Sessions in a locked state typically become available shortly.",
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "KeyId": {
        "name": "keyId",
        "in": "path",
        "description": "Public key ID.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "InstanceId": {
        "name": "instanceId",
        "in": "path",
        "description": "The UUID of the Dynamic Monetization instance.",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CorrelationIdHeader": {
        "name": "correlationId",
        "in": "header",
        "description": "An optional identifier for the request. If provided, it is recommended to use a UUID format to minimise the risk of reusing the same correlationId.\n\nThis field can be used to support safe retries, typically when the request has timed out. The safe retry configuration option must be enabled first,\nrefer to the Configuration section for more information on how to enable this.\n\nIf no correlationId is supplied, Dynamic Monetization will generate one automatically.\n",
        "schema": {
          "type": "string"
        }
      },
      "LineItemId": {
        "name": "lineItemId",
        "in": "path",
        "description": "Line item ID. \nNote: This is also known as the activation ID.\n",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ConditionId": {
        "name": "conditionId",
        "in": "path",
        "description": "The unique identifier of the condition.\nThis is a UUID that is generated by Dynamic Monetization.\n",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ConsumptionLimitId": {
        "name": "consumptionLimitId",
        "in": "path",
        "description": "The identifier of the consumption limit.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "RequesterGroupId": {
        "name": "requesterGroupId",
        "in": "path",
        "description": "The unique identifier of the requester group.\n",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "examples": {
      "sampleConditionResp": {
        "summary": "Example JSON of conditions",
        "description": "A sample list of conditions.",
        "value": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174004",
            "name": "compositeCondition",
            "operator": "AND",
            "conditions": [
              {
                "operator": "IN",
                "property": "status",
                "values": [
                  "active",
                  "pending"
                ]
              },
              {
                "operator": "NOT",
                "condition": {
                  "operator": "IN",
                  "property": "category",
                  "values": [
                    "restricted"
                  ]
                }
              }
            ]
          },
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "name": "simpleCondition",
            "operator": "IN",
            "property": "category",
            "values": [
              "gold",
              "silver"
            ]
          }
        ]
      },
      "sampleConditionRequest": {
        "summary": "Example JSON of conditions request body",
        "description": "A sample list of conditions.",
        "value": {
          "conditions": [
            {
              "name": "compositeCondition",
              "operator": "AND",
              "conditions": [
                {
                  "operator": "IN",
                  "property": "status",
                  "values": [
                    "active",
                    "pending"
                  ]
                },
                {
                  "operator": "NOT",
                  "condition": {
                    "operator": "IN",
                    "property": "category",
                    "values": [
                      "restricted"
                    ]
                  }
                }
              ]
            },
            {
              "name": "simpleCondition",
              "operator": "IN",
              "property": "category",
              "values": [
                "gold",
                "silver"
              ]
            }
          ]
        }
      }
    }
  }
}