{ "openapi": "3.1.0", "info": { "title": " Apiable Platform API", "description": "\n## Introduction\n\nThe Apiable Platform API is a RESTful API that allows you to manage your portal, teams, users, and subscriptions. The API is designed to be simple and easy to use, with a focus on security and performance. \nThe Platform API is designed to be used by developers to build custom integrations and applications that interact with the Apiable Portal. The included endpoints allow you to manage, including, but not limited to, your portal products, plans, teams, users, and subscriptions.\n\n## Authentication\nThe authentication is done using a Bearer token, that must be included in all requests.\n \n## Errors\nThe API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, the response body will contain a JSON object with an error message.\n\n## Rate Limiting\n\n## Pagination and Filtering\nCalls that return multiple items will be paginated to 10 items by default. You can specify further pages with the `page` parameter. For most such resources, you can also set a custom page size up to 100 with the `size` parameter. Requests that return multiple items also include `search` parameter to filter the results.\n\n## Versioning\nThe API is versioned using the `X-API-Version` header. The API responses always with latest version, if not set otherwise.\n\n\n## Glossary of Terms\n### Product\nThe product object represents a high-level abstraction of your API products. It is used to group plans together and to provide a high-level overview of the product. A product can have multiple plans associated with it. Products are typically used to group plans together that are related to a specific API or service.\n\n### Plan\nThe plan object represents a subscription plan that can be associated with a product. A plan can have multiple APIs associated with it. Plans can be free or paid, and can have different pricing models.\n\n### Subscription \nThe subscription object represents a subscription to a plan. Subscriptions, both paid and free, are associated with a team, and a single user as the primary owner of the subscription. The owner of the subscription is considered to be the one responsible for the billing of the subscription.\nDepending on the permissions within a team, API key and billing information can be viewed managed by not just the subscription owner, but other members of the team as well.\n\n### Team\nThe team object represents a group of users that work together. A team can have multiple members and can be associated with a company. Teams are a way to group users together and manage permissions and roles within a group.\n\n### Company \nThe company object represents a group of teams. A company can have multiple teams associated with it. Companies are a way to manage multiple teams and users together. Companies do not have roles and permissions, nor are subscriptions shared between different teams under the same company.\n\n### User\nThe user object represents a user of the platform. A user can be a member of one or more teams and can have different roles and permissions within each team. Users can be invited to join a team, and can be assigned different roles and permissions within a team.\n\n### Invitation\nThe invitation object represents an invitation to join a team. Invitations are typically sent by team members to new users, and can be accepted or ignored by the invitee. Invitations can be sent to users that are not yet registered on the platform, and can be used to invite new users to join the platform and team of the inviter.\n\n### Webhook\nThe webhook object represents a webhook that can be used to receive notifications about events that occur on the platform. Webhooks can be used to trigger actions in external systems based on events that occur on the platform. Webhooks can be configured to send notifications for specific events, such as when a new subscription is created, or when a subscription is updated.\n\n\n### API Key Tutorial\n\nTo interact with the API, you will need to obtain an JWT Access Token. Follow these steps to obtain and use the Token:\n\n1. **Navigate to the Subscription Details Page**: Log in to your account and go to the Subscription Details page.\n2. **Locate the client_id/client_secret**: You will find it in the subscription details. The client_id and client_secret are unique to your account and will allow you to authenticate requests to the API.\n3. **Prefill the client_id and client_secret**: If you click the eye icon next to the client_id or client_secret, it will be revealed and automatically prefilled when you proceed to the documentation section.\n4. **Using the JWT Token**: Once you have your obtained your JWT token, you will need to include it in your request headers as follows:\n\n```\n'Authorization': 'Bearer YOUR_JWT_TOKEN_HERE'\n```\n\nMake sure to replace `YOUR_JWT_TOKEN_HERE` with the actual JWT token you obtained.", "contact": { "name": "Apiable Team", "url": "https://apiable.io", "email": "support@apiable.io" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "v2" }, "servers": [ { "url": "https://developer.apiable.io" } ], "tags": [ { "name": "Companies", "description": "Companies, similar to teams are a way to group users together. Companies are a way to manage multiple teams and users together. An example being a company that has teams for different departments, such as backend and frontend development teams.Multiple teams can be part of the same company, and unlike teams, companies do not have roles and permissions, nor are subscriptions shared between different teams under the same company." }, { "name": "Custom Properties", "description": "Custom properties are additional fields that can be used to store extra information about the subscription." }, { "name": "Docs", "description": "Docs are a way to store documentation in the system. The documentation can be used to store API and Plan level API documentations in the system.A documentation entry is always associated with either plan directly, or with an API, which is associated with a plan.The only exception to this, is the Full API Reference, which is a special case, and is not associated with any plan. But with the portal itself." }, { "name": "Files", "description": "Files are a way to store files in the system. All uploaded files are stored in an S3 bucket." }, { "name": "Invitations", "description": "Invitations are a way to invite new users to join the platform and team of the inviter. Invitations are typically sent by team members to new users, and can be accepted or ignored by the invitee." }, { "name": "Plans", "description": "Plans are a way to group APIs and their documentation." }, { "name": "Products", "description": "Products are a high-level abstraction of your API products, they are used to group plans together and to provide a high level overview of the product." }, { "name": "Serverinfo", "description": "Serverinfo is a way to get information about the server." }, { "name": "Subscriptions", "description": "Operations related to managing subscriptions, including retrieval, update, approval, rejection, and refreshing the status of connected monetization. For security reasons, API keys, secrets, and other sensitive information included in the subscriptions are not returned in the response." }, { "name": "Teams", "description": "Teams are a way to group users together. Teams are used to manage team-based access to subscriptions on the platform with internal roles and permissions. Teams typically consist of one to a handful of users." }, { "name": "Users", "description": "Users are the people who use the platform. Users can be invited to join the platform by an admin or they can sign up themselves. Users can be assigned to teams and have roles and permissions within those teams. Each user has the possibility to be part of one or more teams, each with their separate roles, permissions and subscriptions." }, { "name": "Webhooks", "description": "# How Webhooks Work\n\nWebhooks are a way for services to communicate with each other in real time. When an event occurs, the Webhook sends an HTTP POST request to the URL that you've configured. The Webhook itself is unaware of any specific authorization mechanisms like the Apiable Lambda authorizer, and the Webhook URL can be any endpoint capable of receiving HTTP POST requests.\n\nOptionally, you can include custom headers in the request. These headers will be appended automatically by the Webhook to the HTTP POST request, adding any additional information required for the endpoint.\n\n ## Testing a Webhook before posting\n\nYou can test a Webhook by sending a POST request to the Webhook URL manually. Here’s an example curl command that simulates the Webhook sending a POST request:\n\n```bash\ncurl -X POST https:/apiable.example.io/webhook \\\n -H \"Content-Type: application/json\" \\\n -H \"api-key: MY-API-KEY\" \\\n -H \"Custom-Header-1: value1\" \\\n -H \"Custom-Header-2: value2\" \\\n -d '{\n \"id\": \"67040bcb1eb964694d999a68\",\n \"events\": [\n \"SUBSCRIPTION_CREATED\"\n ],\n \"whsec\": \"whsec_CoX***pc=\"\n }'\n```\n\n## Example Webhook Configuration\n\nIn the following example, a Webhook is configured to send an HTTP POST request to a URL upon the occurrence of a `SUBSCRIPTION_CREATED` event. The parameters \"whsec\" and \"headers\" are optional.\n\n```json\n{\n \"id\": \"67040bcb1eb964694d999a68\",\n \"events\": [\n \"SUBSCRIPTION_CREATED\"\n ],\n \"url\": \"https:/apiable.example.io/webhook\",\n \"headers\": {\n \"api-key\": \"MY-API-KEY\",\n \"Custom-Header-1\": \"value1\",\n \"Custom-Header-2\": \"value2\"\n }\n}\n```\n \n " } ], "paths": { "/api/webhooks/{id}": { "get": { "tags": [ "Webhooks" ], "summary": "Retrieve a webhook by ID", "description": "Retrieve a specific webhook by its ID. This will return the webhook configuration including the events it is subscribed to, the URL, and the secret key.", "operationId": "getWebhookById", "parameters": [ { "name": "id", "in": "path", "description": "The id of the webhook to retrieve.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "67040bcb1eb964694d999a68" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the webhook.", "content": { "application/json": { "schema": { "description": "The webhook configuration", "properties": { "id": { "type": "string" }, "events": { "type": "array", "description": "The events the webhook is listening to", "items": { "type": "string", "description": "The events the webhook is listening to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The url of the webhook" }, "whsec": { "type": "string", "description": "The secret of the webhook" }, "authorization": { "type": "string", "description": "The authorization header of the webhook" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers of the webhook" }, "description": "The headers of the webhook" } } }, "examples": { "WebhookConf Example": { "description": "Example of a webhook configuration.", "value": { "id": "66f6b0f0ea99a34963977e55", "created": "2024-09-27T16:19:44.013", "updated": "2024-09-27T16:19:44.013", "name": "Webhook Example", "url": "https://example.com/webhook", "authType": "BASIC_AUTH", "authUsername": "user", "authPassword": "password", "events": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED" ], "whsec": "whsec_1234567890abcdef", "active": true, "version": 1 } } } } } }, "401": { "description": "Unauthorized for operation: getWebhookById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested webhook does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the webhook with the given ID is not found.", "value": "Webhook not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] }, "put": { "tags": [ "Webhooks" ], "summary": "Update webhook", "description": "Update a webhook subscription by providing the URL to send the webhook to, the events to subscribe to.The webhook secret key (whsec) is optional. If not provided, a random key will be generated.\nThe possible event types `SUBSCRIPTION_CREATED` and `SUBSCRIPTION_CANCELLED` are sent when a subscription is created or cancelled, respectively.", "operationId": "updateWebhook", "parameters": [ { "name": "id", "in": "path", "description": "The id of the webhook to be updated.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "67040bcb1eb964694d999a68" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "The expected request body for updating a webhook.", "content": { "application/json": { "schema": { "description": "Webhook Configuration update request", "properties": { "events": { "type": "array", "description": "The events to subscribe to", "items": { "type": "string", "description": "The events to subscribe to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The URL to send the webhook to" }, "whsec": { "type": "string", "description": "The webhook secret key" }, "authorization": { "type": "string", "description": "The authorization header" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers to send with the webhook" }, "description": "The headers to send with the webhook" } } }, "examples": { "WebhookConfUpdate": { "description": "WebhookConfUpdate", "value": "\n{\n \"url\": \"https://example.com/webhook\",\n \"events\": [\n \"SUBSCRIPTION_CREATED\",\n \"SUBSCRIPTION_CANCELLED\"\n ],\n \"whsec\": \"whsec_1234567890abcdef\",\n}\n" } } } }, "required": true }, "responses": { "200": { "description": "OK: Successfully updated the webhook.", "content": { "application/json": { "schema": { "description": "The webhook configuration", "properties": { "id": { "type": "string" }, "events": { "type": "array", "description": "The events the webhook is listening to", "items": { "type": "string", "description": "The events the webhook is listening to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The url of the webhook" }, "whsec": { "type": "string", "description": "The secret of the webhook" }, "authorization": { "type": "string", "description": "The authorization header of the webhook" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers of the webhook" }, "description": "The headers of the webhook" } } }, "examples": { "WebhookConf Example": { "description": "Example of an updated webhook configuration.", "value": { "id": "66f6b0f0ea99a34963977e55", "created": "2024-09-27T16:19:44.013", "updated": "2024-09-27T16:19:44.013", "name": "Webhook Example", "url": "https://example.com/webhook", "authType": "BASIC_AUTH", "authUsername": "user", "authPassword": "password", "events": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED" ], "whsec": "whsec_1234567890abcdef", "active": true, "version": 1 } } } } } }, "401": { "description": "Unauthorized for operation: updateWebhook", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The webhook to be updated does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the webhook with the given ID is not found.", "value": "Webhook not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] }, "delete": { "tags": [ "Webhooks" ], "summary": "Unregister a webhook", "description": "Unsubscribe from a webhook, record of the webhook will be deleted and deleted webhook will no longer receive events. Restoring a deleted webhook is not possible, instead you can create a new webhook with the same configuration.", "operationId": "unregisterWebhook", "parameters": [ { "name": "id", "in": "path", "description": "The id of the webhook to be unregistered.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "67040bcb1eb964694d999a68" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "204": { "description": "No Content: Successfully unregistered the webhook.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the webhook is successfully unregistered.", "value": "Webhook unregistered successfully" } } } } }, "401": { "description": "Unauthorized for operation: unregisterWebhook", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The webhook to be unregistered doesn't exit.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the webhook with the given ID is not found.", "value": "Webhook not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/users/{id}/roles": { "put": { "tags": [ "Users" ], "summary": "Update User Roles", "description": "Update the roles of a user. The roles are used to define the permissions of the user within the platform. The roles are defined by the platform admin and can be assigned to users by the platform admin or team admins.", "operationId": "updateUserRoles", "parameters": [ { "name": "id", "in": "path", "description": "The id of the user to be updated the team roles.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "List of roles that need to be assigned to the user.", "content": { "application/json": { "schema": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } }, "examples": { "Example roles": { "description": "User roles.", "value": "\n[\n {\n \"teamId\": \"66fbb93c4220cc7d307a5b0a\",\n \"accessDetails\": {\n \"roleName\": \"CUSTOM\"\n \"apiKeys\": \"FULL\",\n \"billing\": \"READ\",\n \"teams\": \"NONE\"\n }\n }\n]\n" } } } }, "required": true }, "responses": { "200": { "description": "The user object with the updated fields. The change of the roles will be reflected by the field 'roles' in user.metadata object.", "content": { "application/json": { "schema": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } }, "examples": { "Example user": { "description": "User object with updated roles.", "value": { "id": "6409edb91c6c14300fce1a3c", "created": "2023-03-09T16:31:21.829", "updated": "2023-09-25T14:45:54.602", "providerId": "VVNFUjpkMTllMjE3ZS02NDI0LTExZWQtOTMwOS0wNjZmNDNjODhjYjI=", "metadata": { "activeTeam": { "id": "6409edb91c6c14300fce1a3a" }, "isDeveloper": false, "agreesToReceiveEmail": false, "postRegistrationWizardComplete": true, "approval": "ACTIVE", "registrationEmailSent": true, "teamRoles": [ { "teamId": "6409edb91c6c14300fce1a3a", "accessDetails": { "roleName": "ADMIN", "apiKeys": "FULL", "billing": "FULL", "teams": "FULL" } } ] }, "givenName": "Alice", "familyName": "Piable", "email": "alice.piable@apiable.io", "name": "Alice Piable", "active": true, "company": "Apiable", "version": 32 } } } } } }, "400": { "description": "Bad Request: Invalid roles or operation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the roles update is not allowed for the user.", "value": "Invalid roles update" } } } } }, "401": { "description": "Unauthorized for operation: updateUserRoles", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The user to update roles does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the user to be updated is not found.", "value": "User not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/teams/{teamId}/users/{userId}": { "put": { "tags": [ "Teams" ], "summary": "Assign user into a team", "description": "Assign a user to a team. To update the team object, use the dedicated endpoint to patch the desired values. To assign roles to the user, use the users endpoint. /users/{userId}/roles", "operationId": "assignUserToTeam", "parameters": [ { "name": "teamId", "in": "path", "description": "ID of the team to be assigned the user to.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f279" }, { "name": "userId", "in": "path", "description": "ID of the user to be assigned into the team", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "Team object with the user assigned.", "content": { "application/json": { "schema": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } }, "examples": { "Example team": { "description": "Example output of a team object with the user assigned.", "value": { "id": "6268ec80a098ed05f047f279", "created": "2022-04-27T07:10:56.86", "updated": "2023-03-09T16:28:30.056", "name": "Shire-Hobbits", "users": [ { "id": "6268ec80a098ed05f047f278" } ], "internal": true, "version": 5 } } } } } }, "401": { "description": "Unauthorized for operation: assignUserToTeam", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The team or user does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the team or user to be assigned is not found.", "value": "Team or User not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "delete": { "tags": [ "Teams" ], "summary": "Remove user from team", "description": "Remove a user from a team. To update the team object, use the dedicated endpoint to patch the desired values. To remove roles from the user, use the users endpoint. /users/{userId}/roles", "operationId": "removeUserFromTeam", "parameters": [ { "name": "teamId", "in": "path", "description": "ID of the team to be remove the user from.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f279" }, { "name": "userId", "in": "path", "description": "ID of the user to be removed from the team", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "Team object with the user removed.", "content": { "application/json": { "schema": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } }, "examples": { "Example team": { "description": "Example output of a team object with the user removed.", "value": { "id": "6268ec80a098ed05f047f279", "created": "2022-04-27T07:10:56.86", "updated": "2023-03-09T16:28:30.056", "name": "Shire-Hobbits", "users": [ { "id": "6268ec80a098ed05f047f278" } ], "internal": true, "version": 5 } } } } } }, "401": { "description": "Unauthorized for operation: removeUserFromTeam", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The team or user does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the team or user to be removed is not found.", "value": "Team or User not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/{id}/custom-properties": { "put": { "tags": [ "Subscriptions" ], "summary": "Read/Write subscription custom properties", "description": "Reads and writes custom properties of a subscription. Custom properties are key-value pairs that can be used to store additional information about the subscription. The custom properties are returned in the response when the subscription is retrieved. The custom properties can be updated by providing a list of custom properties in the request body.", "operationId": "updateCustomProperties", "parameters": [ { "name": "id", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateCustomProperties.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "examples": { "Example custom property": { "description": "Custom property object with key-value pair.", "value": { "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } } } } }, "required": true }, "responses": { "200": { "description": "OK: Subscription updated successfully.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Updated subscription with all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "400": { "description": "Bad Request: Invalid update parameters or operation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the patch operation is not allowed for the subscription.", "value": "Bad Request" } } } } }, "401": { "description": "Unauthorized for operation: updateCustomProperties", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription to update does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription to be updated is not found.", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/webhooks": { "get": { "tags": [ "Webhooks" ], "summary": "Retrieve Registered Webhooks", "description": "Retrieve all registered webhooks for the platform. The response will include all webhooks that are currently registered.", "operationId": "findAllWebhooks", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of registered webhooks.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "The webhook configuration", "properties": { "id": { "type": "string" }, "events": { "type": "array", "description": "The events the webhook is listening to", "items": { "type": "string", "description": "The events the webhook is listening to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The url of the webhook" }, "whsec": { "type": "string", "description": "The secret of the webhook" }, "authorization": { "type": "string", "description": "The authorization header of the webhook" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers of the webhook" }, "description": "The headers of the webhook" } } } }, "examples": { "Example list of webhooks": { "description": "List of all registered webhooks on the platform.", "value": [ { "id": "66f6b0f0ea99a34963977e55", "created": "2024-09-27T16:19:44.013", "updated": "2024-09-27T16:19:44.013", "name": "Webhook Example", "url": "https://example.com/webhook", "authType": "BASIC_AUTH", "authUsername": "user", "authPassword": "password", "events": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED" ], "whsec": "whsec_1234567890abcdef", "active": true, "version": 1 } ] } } } } }, "401": { "description": "Unauthorized for operation: findAllWebhooks", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] }, "post": { "tags": [ "Webhooks" ], "summary": "Register a webhook", "description": "Subscribe to a webhook event by providing the URL to send the webhook to, the events to subscribe to.The webhook secret key (whsec) is optional. If not provided, a random key will be generated.\nThe possible event types `SUBSCRIPTION_CREATED` and `SUBSCRIPTION_CANCELLED` are sent when a subscription is created or cancelled, respectively.", "operationId": "registerWebhook", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "The expected request body for registering a webhook.", "content": { "application/json": { "schema": { "description": "Webhook Configuration create request", "properties": { "events": { "type": "array", "description": "The events to subscribe to", "items": { "type": "string", "description": "The events to subscribe to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The URL to send the webhook to" }, "whsec": { "type": "string", "description": "The webhook secret key" }, "authorization": { "type": "string", "description": "The authorization header" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers to send with the webhook" }, "description": "The headers to send with the webhook" } } }, "examples": { "WebhookConf": { "description": "Example of a webhook configuration to be registered.", "value": "\n {\n \"events\": [\"SUBSCRIPTION_CREATED\",\"SUBSCRIPTION_CANCELLED\"],\n \"url\": \"https://example.com/webhook\",\n \"whsec\": \"base64 encoded, prefixed with `whsec_` (Random. Between 24 bytes (192 bits) and 64 bytes (512 bits))\",\n \"authorization\": \"key/token - something we pass to a Authorization header e.g. 'Authorization: _bn6hgjds'\",\n }\n " } } } }, "required": true }, "responses": { "201": { "description": "Created: Successfully registered the webhook.", "content": { "application/json": { "schema": { "description": "The webhook configuration", "properties": { "id": { "type": "string" }, "events": { "type": "array", "description": "The events the webhook is listening to", "items": { "type": "string", "description": "The events the webhook is listening to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The url of the webhook" }, "whsec": { "type": "string", "description": "The secret of the webhook" }, "authorization": { "type": "string", "description": "The authorization header of the webhook" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers of the webhook" }, "description": "The headers of the webhook" } } }, "examples": { "WebhookConf Example": { "description": "Example of a registered webhook configuration.", "value": { "id": "66f6b0f0ea99a34963977e55", "created": "2024-09-27T16:19:44.013", "updated": "2024-09-27T16:19:44.013", "name": "Webhook Example", "url": "https://example.com/webhook", "authType": "BASIC_AUTH", "authUsername": "user", "authPassword": "password", "events": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED" ], "whsec": "whsec_1234567890abcdef", "active": true, "version": 1 } } } } } }, "401": { "description": "Unauthorized for operation: registerWebhook", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/users/{id}/reject": { "post": { "tags": [ "Users" ], "summary": "Reject User", "description": "Rejects a user from joining the platform when they have been invited or signed up, and approval process has been enabled on the platform. The approval process is controlled by the platform admin and must be enabled in the platform settings from the dashboard.", "operationId": "rejectUser", "parameters": [ { "name": "id", "in": "path", "description": "The id of the user to be rejected.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "The user object with the updated fields. The change of the approval will be reflected by the field 'approval' in user.metadata object.", "content": { "application/json": { "schema": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } }, "examples": { "Example user": { "description": "User object after rejection.", "value": { "id": "6409edb91c6c14300fce1a3c", "created": "2023-03-09T16:31:21.829", "updated": "2023-09-25T14:45:54.602", "providerId": "VVNFUjpkMTllMjE3ZS02NDI0LTExZWQtOTMwOS0wNjZmNDNjODhjYjI=", "metadata": { "activeTeam": { "id": "6409edb91c6c14300fce1a3a" }, "isDeveloper": false, "agreesToReceiveEmail": false, "postRegistrationWizardComplete": true, "approval": "ACTIVE", "registrationEmailSent": true, "teamRoles": [ { "teamId": "6409edb91c6c14300fce1a3a", "accessDetails": { "roleName": "ADMIN", "apiKeys": "FULL", "billing": "FULL", "teams": "FULL" } } ] }, "givenName": "Alice", "familyName": "Piable", "email": "alice.piable@apiable.io", "name": "Alice Piable", "active": true, "company": "Apiable", "version": 32 } } } } } }, "401": { "description": "Unauthorized for operation: rejectUser", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The user to reject does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the user to be rejected is not found.", "value": "User not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/users/{id}/approve": { "post": { "tags": [ "Users" ], "summary": "Approve User", "description": "Approve User to join the platform when they have been invited or signed up, and approval process has been enabled on the platform. The approval process is controlled by the platform admin and must be enabled in the platform settings from the dashboard.", "operationId": "approveUser", "parameters": [ { "name": "id", "in": "path", "description": "The id of the user to be approved.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "The user object with the updated fields. The change of the approval will be reflected by the field 'approval' in user.metadata object.", "content": { "application/json": { "schema": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } }, "examples": { "Example user": { "description": "User object after approval.", "value": { "id": "6409edb91c6c14300fce1a3c", "created": "2023-03-09T16:31:21.829", "updated": "2023-09-25T14:45:54.602", "providerId": "VVNFUjpkMTllMjE3ZS02NDI0LTExZWQtOTMwOS0wNjZmNDNjODhjYjI=", "metadata": { "activeTeam": { "id": "6409edb91c6c14300fce1a3a" }, "isDeveloper": false, "agreesToReceiveEmail": false, "postRegistrationWizardComplete": true, "approval": "ACTIVE", "registrationEmailSent": true, "teamRoles": [ { "teamId": "6409edb91c6c14300fce1a3a", "accessDetails": { "roleName": "ADMIN", "apiKeys": "FULL", "billing": "FULL", "teams": "FULL" } } ] }, "givenName": "Alice", "familyName": "Piable", "email": "alice.piable@apiable.io", "name": "Alice Piable", "active": true, "company": "Apiable", "version": 32 } } } } } }, "401": { "description": "Unauthorized for operation: approveUser", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The user to approve does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the user to be approved is not found.", "value": "User not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/teams": { "get": { "tags": [ "Teams" ], "summary": "Read Teams", "description": "List all teams on the platform that match the pagination and search criteria.", "operationId": "findAllTeams", "parameters": [ { "name": "page", "in": "query", "description": "The page number of the teams to be returned.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "The number of teams to be returned per page.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "The sorting criteria for the teams. The sorting criteria is a list of fields separated by commas.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name:DESC" ] }, { "name": "search", "in": "query", "description": "The search criteria for the teams.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name.like=engineering" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of teams.", "content": { "application/json": { "schema": { "description": "Response object for paginated team results", "properties": { "content": { "type": "array", "items": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example list of teams": { "description": "List of all teams that exist on the portal.", "value": { "content": [ { "id": "6268ec80a098ed05f047f279", "created": "2022-04-27T07:10:56.86", "updated": "2023-03-09T16:28:30.056", "name": "Shire-Hobbits", "users": [ { "id": "6268ec80a098ed05f047f278" } ], "internal": true, "version": 5 }, { "id": "62691aa099a7d17e2cac7664", "created": "2022-04-27T10:27:44.198", "updated": "2024-09-18T15:18:42.505", "name": "Isengard-Orcs", "users": [ { "id": "62691aa099a7d17e2cac7663" } ], "internal": false, "version": 10 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": true, "sorted": false, "unsorted": true }, "offset": 0, "unpaged": false, "paged": true }, "last": true, "totalElements": 2, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": true, "sorted": false, "unsorted": true }, "first": true, "numberOfElements": 2, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllTeams", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "post": { "tags": [ "Teams" ], "summary": "Create a new team", "description": "Creates a new team programmatically with the specified name, users, company, and domain settings. The team can be configured for domain-based joining and linked to a company.", "operationId": "createTeam", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: createTeam.", "content": { "application/json": { "schema": { "properties": { "name": { "type": "string" }, "users": { "type": "array", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "domainJoinEnabled": { "type": "boolean" } } }, "examples": { "Create team request": { "description": "Example request to create a new team with users and company association.", "value": { "name": "Engineering Team", "users": [ "6268ec80a098ed05f047f278" ], "internal": false, "company": "62691aa099a7d17e2cac7665", "domains": [ "example.com" ], "domainJoinEnabled": true } } } } }, "required": true }, "responses": { "200": { "description": "OK: Team created successfully.", "content": { "application/json": { "schema": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } }, "examples": { "Example response": { "description": "Created team with all details.", "value": { "id": "6268ec80a098ed05f047f279", "created": "2022-04-27T07:10:56.86", "updated": "2023-03-09T16:28:30.056", "name": "Shire-Hobbits", "users": [ { "id": "6268ec80a098ed05f047f278" } ], "internal": true, "version": 5 } } } } } }, "400": { "description": "Bad Request: Invalid input data.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Missing Required Field": { "description": "Error when required field (name) is missing from request", "value": { "error": "Bad Request", "message": "Team name is required" } }, "Blank Field": { "description": "Error when team name is provided but blank", "value": { "error": "Bad Request", "message": "Team name cannot be blank" } }, "Invalid Domain": { "description": "Error when domain format is invalid", "value": { "error": "Bad Request", "message": "Invalid domain format" } } } } } }, "401": { "description": "Unauthorized for operation: createTeam", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The company or user specified does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error when the company or user cannot be found", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions": { "get": { "tags": [ "Subscriptions" ], "summary": "Retrieve all subscriptions", "description": "Fetches a paginated, sortable, and filterable list of all subscriptions accessible to the user. Each subscription includes details such as ID, name, status, and other relevant metadata, while omitting sensitive information like API keys and secrets.", "operationId": "findAllSubscriptions", "parameters": [ { "name": "page", "in": "query", "description": "Zero-based page index for pagination in the findAllSubscriptions request query parameters.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "Number of subscriptions to return per page in the findAllSubscriptions request query parameters.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "Sorting criteria in the format: property,asc|desc. Example: created,desc in the findAllSubscriptions request query parameters", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "created,desc" ] }, { "name": "search", "in": "query", "description": "Search filter in the format: property.op=value in the findAllSubscriptions request query parameters. Multiple criteria can be separated by semicolons. Example: status.in=PENDING;PENDING_PAYMENT", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "status.in=PENDING;PENDING_PAYMENT" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } }, { "name": "resolve", "in": "query", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of subscriptions.", "content": { "application/json": { "schema": { "description": "Response object for paginated subscription results", "properties": { "content": { "type": "array", "items": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example response": { "description": "Example list of subscriptions matching the request.", "value": { "content": [ { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": false, "unsorted": false, "sorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": 1, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": false, "unsorted": false, "sorted": true }, "first": true, "numberOfElements": 1, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllSubscriptions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "post": { "tags": [ "Subscriptions" ], "summary": "Create a new subscription", "description": "Creates a new subscription programmatically with the specified plan, team, and owner. The subscription status will depend on the plan configuration: PENDING if approval is required, PENDING_PAYMENT if payment is required, or ACTIVE otherwise. \nFor migration scenarios, you can optionally provide an authIntegrationId to link the subscription to an existing API key/credential in your gateway. However, please note: Automatic retrieval of authorization details will depend on the security level of the authorization schema, and may not be possible with stricter security settings. For example in cases where the client secret cannot be retrieved after being initially generated.", "operationId": "createSubscription", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: createSubscription.", "content": { "application/json": { "schema": { "properties": { "name": { "type": "string" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "Optional email of the subscription owner, used to link the subscrpition to a specific user before they register." }, "customProperties": { "type": "array", "description": "Custom properties with only id and value required", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "authIntegrationId": { "type": "string", "description": "Optional auth integration ID if importing an existing subscription" } } }, "examples": { "Create subscription request": { "description": "Example request to create a new subscription with a custom property.", "value": "\n {\n \"name\": \"Programmatic subscription with custom properties\",\n \"plan\": \"68a4676693bf757a8141f824\",\n \"team\": \"62691aa099a7d17e2cac7664\",\n \"customProperties\": [\n {\n id: \"62691aa099a7d17e2cac7665\",\n value: \"custom property example value\",\n }\n ]\n }\n " }, "Create subscription with existing gateway auth": { "description": "Example request for migration scenarios where you want to link the subscription to an existing API key/credential in your gateway. The authIntegrationId should match the identifier of the existing credential in your gateway. Note: This is not supported when using Apiable Client Credentials, as secrets cannot be retrieved once generated.", "value": { "name": "Migrated subscription with existing auth", "plan": "68a4676693bf757a8141f824", "team": "62691aa099a7d17e2cac7664", "email": "user@example.com", "authIntegrationId": "abc123-existing-api-key-id" } } } } }, "required": true }, "responses": { "200": { "description": "OK: Subscription created successfully.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Created subscription with status and all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "400": { "description": "Bad Request: Invalid input data.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Blank Field": { "description": "Error when required field is provided but blank", "value": { "error": "Bad Request", "message": "Subscription name cannot be blank" } }, "Invalid Email": { "description": "Error when email format is invalid", "value": { "error": "Bad Request", "message": "Invalid email format: not-an-email" } }, "Owner or Email Required": { "description": "Error when neither owner nor email is provided", "value": { "error": "Bad Request", "message": "Either owner or email must be provided" } }, "Plan Not Found": { "description": "Error when the specified plan does not exist", "value": { "error": "Bad Request", "message": "Cannot create subscription, plan not found" } }, "Plan Limit Exceeded": { "description": "Error when team has reached the subscription limit for the plan", "value": { "error": "Bad Request", "message": "Subscription cannot be created. The team has already reached the maximum number of subscriptions allowed for this plan." } } } } } }, "401": { "description": "Unauthorized for operation: createSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The team or plan specified does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error when the team or plan cannot be found", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/{id}/reject": { "post": { "tags": [ "Subscriptions" ], "summary": "Reject a subscription", "description": "Rejects a subscription that has approval workflow enabled. The subscription status is updated to REJECTED.", "operationId": "rejectSubscription", "parameters": [ { "name": "id", "in": "path", "description": "Subscription ID", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Subscription rejected successfully.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Rejected subscription with updated status and all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "400": { "description": "Bad Request: Subscription cannot be rejected in its current state.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the subscription cannot be rejected due to status mismatch or other requirements.", "value": "Bad Request" } } } } }, "401": { "description": "Unauthorized for operation: rejectSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription to reject does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription to be rejected is not found.", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/{id}/refresh-billing": { "post": { "tags": [ "Subscriptions" ], "summary": "Refresh subscription billing status", "description": "Updates the subscription's billing status by querying the connected monetization platform.", "operationId": "refreshSubscriptionBillingStatus", "parameters": [ { "name": "id", "in": "path", "description": "Subscription ID in the refreshing subscription billing status request", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Billing status refreshed successfully.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Subscription with updated billing status and all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "401": { "description": "Unauthorized for operation: refreshSubscriptionBillingStatus", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription for billing refresh does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription for billing refresh is not found.", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/{id}/approve": { "post": { "tags": [ "Subscriptions" ], "summary": "Approve a subscription", "description": "Approves a subscription with approval workflow enabled. The subscription status changes to ACTIVE if no monetization is configured, or PENDING_PAYMENT if monetization is enabled.", "operationId": "approveSubscription", "parameters": [ { "name": "id", "in": "path", "description": "Subscription ID in approval subscription request", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Subscription approved successfully.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Approved subscription with updated status and all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "400": { "description": "Bad Request: Subscription cannot be approved in its current state.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Example response when subscription cannot be approved": { "description": "Error message when the subscription cannot be approved due to status mismatch.", "value": "Bad Request" } } } } }, "401": { "description": "Unauthorized for operation: approveSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription to approve does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription to be approved is not found.", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/usage": { "post": { "tags": [ "Subscriptions" ], "summary": "Meter usage for subscription billing", "description": "Meters usage for the subscription for billing purposes. To meter usage for subscription billing, include either the subscriptionId (the ID of the subscription on theportal) or the integrationId (the ID on the gateway), along with the quantity of usage in the request.", "operationId": "meterSubscriptionUsage", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: meterSubscriptionUsage.", "content": { "application/json": { "schema": { "type": "array", "items": { "properties": { "subscriptionId": { "type": "string" }, "integrationId": { "type": "string" }, "quantity": { "type": "integer", "format": "int32" }, "timestamp": { "type": "integer", "format": "int64", "description": "The timestamp for the usage event, in Unix seconds (UTC timezone). Defaults to current time if not provided." }, "lookupkey": { "type": "string" }, "action": { "type": "string" } } } }, "examples": { "Example subscription metering request using integration id": { "description": "Custom property object with key-value pair.", "value": { "integrationId": "lol4o90zl0a", "quantity": 1, "action": "increment", "timestamp": 1750812600 } }, "Example subscription metering request using subscription id": { "description": "Custom property object with key-value pair.", "value": { "subscriptionId": "685acdf14cca56585c6833c4", "quantity": 3, "action": "increment" } } } } }, "required": true }, "responses": { "200": { "description": "OK: Usage has been metered successfully", "content": { "application/json": { "schema": { "properties": { "subscriptionId": { "type": "string" }, "meterId": { "type": "string" }, "periodStartTime": { "type": "integer", "format": "int64" }, "periodEndTime": { "type": "integer", "format": "int64" }, "items": { "type": "array", "items": { "properties": { "aggregateSum": { "type": "integer", "format": "int32" }, "startTime": { "type": "integer", "format": "int64" }, "endTime": { "type": "integer", "format": "int64" } } } } } }, "examples": { "Example response": { "description": "Subscription usage metering response", "value": "\n{\n \"responseTimestamp\": 1750812600,\n \"usageReportId\": \"484177af-269e-4fe6-9ab6-7e24e2e2eee7\",\n \"subscriptionId\": \"66f69ac4ccc00456987e3df8\",\n \"integrationId\": \"abc12345\",\n \"usageData\": {\n \"quantity\": 1,\n \"timestamp\": 1750812600,\n \"lookupkey\": \"\",\n \"action\": \"increment\"\n },\n \"usageRecords\": {object}\n}\n" } } } } }, "401": { "description": "Unauthorized for operation: meterSubscriptionUsage", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription could not be found", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription could not be found", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/plans/{id}/docs": { "get": { "tags": [ "Plans" ], "summary": "Get the plan-level docs of the plan specified by the plan id", "description": "This endpoint will return the plan-level docs of the specified plan", "operationId": "getDocsOfPlanById_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "A list of plan-leve documentation for the specified plan", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "example": [ { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } ] } } }, "401": { "description": "Unauthorized for operation: getDocsOfPlanById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "post": { "tags": [ "Plans" ], "summary": "Create the plan-level doc to the plan", "description": "This endpoint will create the plan-level doc of the specified plan", "operationId": "createDocByPlanIntegrationId_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "requestBody": { "description": "The API documentation version to be created for the plan.", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "examples": { "Example API documentation creation": { "description": "API documentation version to be created for the specified plan.", "value": { "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "API", "apiIntegrationId": "cl4z2nr4p8" } } } } }, "required": true }, "responses": { "200": { "description": "The created documentation for the specified plan", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazingDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } } } }, "401": { "description": "Unauthorized for operation: createDocByPlanIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/plans/{id}/apis/{integrationId}/docs": { "get": { "tags": [ "Plans" ], "summary": "Get the api-level docs of all apis specified by the API integrationId in the plan", "description": "This endpoint will return the api-level docs of the specified api in the plan", "operationId": "getDocsOfApiByIntegrationIdAndPlanId_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "A list of api-level documentation for the specified APIs in the plan", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "example": [ { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } ] } } }, "401": { "description": "Unauthorized for operation: getDocsOfApiByIntegrationIdAndPlanId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "post": { "tags": [ "Plans" ], "summary": "Create the api-level doc to all apis specified by the API integrationId in the plan", "description": "This endpoint will create the api-level doc of the specified api in the plan", "operationId": "createDocByPlanIdAndApiIntegrationId_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "requestBody": { "description": "The API documentation version to be created for the plan.", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "examples": { "Example API documentation creation": { "description": "API documentation version to be created for the specified plan.", "value": { "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "API", "apiIntegrationId": "cl4z2nr4p8" } } } } }, "required": true }, "responses": { "200": { "description": "The created documentation for the specified APIs in the plan", "content": { "application/json": { "schema": { "description": "Details of a plan including documentation.", "properties": { "id": { "type": "string" }, "documentationLevel": { "type": "string", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean" }, "planLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "apiLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } } } }, "example": { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } } } }, "401": { "description": "Unauthorized for operation: createDocByPlanIdAndApiIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/plans/apis/{integrationId}/docs": { "get": { "tags": [ "Plans" ], "summary": "Get the api-level docs of all apis specified by the API integrationId of all plans", "description": "This endpoint will return the api-level docs of the specified api across all plans", "operationId": "getDocsOfApiByIntegrationId_1", "parameters": [ { "name": "integrationId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "A list of api-level documentation for the specified APIs across all plans", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "example": [ { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } ] } } }, "401": { "description": "Unauthorized for operation: getDocsOfApiByIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "post": { "tags": [ "Plans" ], "summary": "Create the api-level doc to all apis specified by the API integrationId", "description": "This endpoint will create the api-level doc of the specified api across all plans", "operationId": "createDocByApiIntegrationId_1", "parameters": [ { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "requestBody": { "description": "The API documentation version to be created for the plan.", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "examples": { "Example API documentation creation": { "description": "API documentation version to be created for the specified plan.", "value": { "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "API", "apiIntegrationId": "cl4z2nr4p8" } } } } }, "required": true }, "responses": { "200": { "description": "The created documentation for the specified APIs across all plans", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "example": [ { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } ] } } }, "401": { "description": "Unauthorized for operation: createDocByApiIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/invitations": { "get": { "tags": [ "Invitations" ], "summary": "Read Invitations", "description": "List all invitations on the platform that match the pagination and search criteria.", "operationId": "findAllInvitations", "parameters": [ { "name": "page", "in": "query", "description": "The page number of the invitations to be returned.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "The number of invitations to be returned per page.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "The sorting criteria for the invitations. The sorting criteria is a list of fields separated by commas.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "created,-email" ] }, { "name": "search", "in": "query", "description": "The search criteria for the invitations.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "email.like=example.gmail.com" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of invitations.", "content": { "application/json": { "schema": { "description": "Response object for paginated invitation results", "properties": { "content": { "type": "array", "items": { "description": "Invitation object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "expires": { "type": "string", "format": "date-time" }, "invitorEmail": { "type": "string", "description": "The email of the invitor" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "status": { "type": "string", "description": "The status of the invitation", "enum": [ "PENDING", "ACCEPTED", "ARCHIVED" ] }, "invitee": { "type": "string", "description": "The user that is invited" }, "invitor": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example list of invitations": { "description": "List of all invitations that exist on the portal.", "value": { "content": [ { "id": "6511731a61c9ae2efbbd8d9d", "created": "2023-09-25T14:46:34.34", "updated": "2023-09-25T14:46:34.34", "expires": "2023-10-25T14:46:34.34", "invitee": "anna.piable@apiable.io", "invitor": { "id": "6409edb91c6c14300fce1a3c" }, "accessDetails": { "roleName": "RESTRICTED", "apiKeys": "READ", "billing": "NONE", "teams": "NONE" }, "team": { "id": "6409edb91c6c14300fce1a3a" }, "status": "PENDING", "version": 0 }, { "id": "6511731a61c9ae2efbbd8d9d", "created": "2023-09-25T14:46:34.34", "updated": "2023-09-25T14:46:34.34", "expires": "2023-10-25T14:46:34.34", "invitee": "hilbert.piable@apiable.io", "invitor": { "id": "6409edb91c6c14300fce1a3c" }, "accessDetails": { "roleName": "RESTRICTED", "apiKeys": "NONE", "billing": "NONE", "teams": "FULL" }, "team": { "id": "6409edb91c6c14300fce1a3a" }, "status": "PENDING", "version": 0 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": false, "unsorted": false, "sorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": 2, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": false, "unsorted": false, "sorted": true }, "first": true, "numberOfElements": 2, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllInvitations", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "post": { "tags": [ "Invitations" ], "summary": "Create Invitation", "description": "Create a new invitation to invite a user to join a team. The invitation will be sent to the invitee's email address.", "operationId": "createInvitation", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "The invitation details", "content": { "application/json": { "schema": { "properties": { "invitee": { "type": "string" }, "origin": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "invitor": { "type": "string" }, "invitorEmail": { "type": "string" }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } }, "examples": { "Create invitation": { "description": "Example request body for creating an invitation", "value": { "invitee": "anna.piable@apiable.io", "team": "62691aa099a7d17e2cac7664", "accessDetails": { "apiKeys": "FULL", "billing": "READ", "teams": "FULL" } } } } } }, "required": true }, "responses": { "200": { "description": "OK: Successfully created the invitation.", "content": { "application/json": { "schema": { "description": "Invitation object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "expires": { "type": "string", "format": "date-time" }, "invitorEmail": { "type": "string", "description": "The email of the invitor" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "status": { "type": "string", "description": "The status of the invitation", "enum": [ "PENDING", "ACCEPTED", "ARCHIVED" ] }, "invitee": { "type": "string", "description": "The user that is invited" }, "invitor": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } }, "examples": { "Created invitation": { "description": "The newly created invitation object with all its details.", "value": { "id": "6511731a61c9ae2efbbd8d9d", "created": "2023-09-25T14:46:34.34", "updated": "2023-09-25T14:46:34.34", "expires": "2023-10-25T14:46:34.34", "invitee": "anna.piable@apiable.io", "invitor": { "id": "6409edb91c6c14300fce1a3c" }, "accessDetails": { "roleName": "RESTRICTED", "apiKeys": "READ", "billing": "NONE", "teams": "NONE" }, "team": { "id": "6409edb91c6c14300fce1a3a" }, "status": "PENDING", "version": 0 } } } } } }, "400": { "description": "Bad Request: Invalid invitation data provided.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the invitation data is invalid.", "value": { "timestamp": "2026-01-16T12:32:00.530+00:00", "status": 400, "error": "Bad Request", "message": "JSON parse error: Cannot construct instance of `io.apiable.domain.invitation.InvitationCreate`, problem: Invitee email was not a valid email address. Please double check the format and address used.", "path": "/api/invitations" } } } } } }, "401": { "description": "Unauthorized for operation: createInvitation", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/files/upload": { "post": { "tags": [ "Files" ], "summary": "Upload a file", "description": "Expecting the request to be a multipart/form-data", "operationId": "uploadFile", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: uploadFile.", "content": { "multipart/form-data": { "schema": { "type": "string", "format": "binary" }, "examples": { "FileUploadExample": { "description": "Example of a file upload using multipart/form-data.", "value": { "file": "(binary)" } } } } } }, "responses": { "202": { "description": "Accepted: The file has been successfully uploaded.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "FileUploadResponse": { "description": "Response containing the URL of the uploaded file.", "value": { "body": { "url": "https://apiable.s3.eu-central-1.amazonaws.com/your-file-key" } } } } } } }, "400": { "description": "Bad Request: The file size exceeds the limit or is invalid.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "FileSizeError": { "description": "Error message when the file size exceeds the limit.", "value": "File size exceeds the limit: 1MB" } } } } }, "401": { "description": "Unauthorized for operation: uploadFile", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/users/{id}": { "get": { "tags": [ "Users" ], "summary": "Read User", "description": "Retrieve a user by id. The user will be returned with all its details.", "operationId": "readUser", "parameters": [ { "name": "id", "in": "path", "description": "The id of the user to be retrieved.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the user.", "content": { "application/json": { "schema": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } }, "examples": { "Example user": { "description": "User object with all its details.", "value": "\n{\n \"id\": \"6268ec80a098ed05f047f278\",\n \"created\": \"2022-04-27T07:10:56.86\",\n \"updated\": \"2024-10-01T11:24:31.365\",\n \"providerId\": \"13843842-1001-707c-f74b-505ade4cf865\",\n \"metadata\": {\n \"activeTeam\": {\n \"id\": \"6268ec80a098ed05f047f279\"\n },\n \"isDeveloper\": true,\n \"agreesToReceiveEmail\": true,\n \"postRegistrationWizardComplete\": true,\n \"approval\": \"ACTIVE\",\n \"registrationEmailSent\": false,\n \"teamRoles\": [\n {\n \"teamId\": \"6268ec80a098ed05f047f279\",\n \"accessDetails\": {\n \"roleName\": \"ADMIN\",\n \"apiKeys\": \"FULL\",\n \"billing\": \"FULL\",\n \"teams\": \"FULL\"\n }\n },\n {\n \"teamId\": \"6304fac7b097dd1afb5273f3\",\n \"accessDetails\": {\n \"roleName\": \"ADMIN\",\n \"apiKeys\": \"FULL\",\n \"billing\": \"FULL\",\n \"teams\": \"FULL\"\n }\n },\n ]\n },\n \"givenName\": \"Alexander 2\",\n \"familyName\": \"Schamne\",\n \"email\": \"albert.piable@apiable.io\",\n \"name\": \"Albert Piable\",\n \"active\": true,\n \"company\": \"Apiable\",\n \"version\": 42\n}\n" } } } } }, "401": { "description": "Unauthorized for operation: readUser", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested user does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the user with the given ID is not found.", "value": "User not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "patch": { "tags": [ "Users" ], "summary": "Update User", "description": "Update values of the platform user. The response of the operation will be the updated user. The updates are applied through patch logic, which means that only the fields that are included in the request will be updated. The rest of the fields will remain unchanged.", "operationId": "updateUser", "parameters": [ { "name": "id", "in": "path", "description": "The id of the user to be updated.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateUser.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for user", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for User", "enum": [ "/email", "/givenName", "/familyName" ] }, "value": { "type": "string" } } } }, "examples": { "Example patch operations": { "description": "Patch operation to update the user.", "value": [ { "op": "replace", "path": "/email", "value": "alice.piable@apiable.io" } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: User updated successfully.", "content": { "application/json": { "schema": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } }, "examples": { "Example response": { "description": "Updated user object.", "value": "\n{\n \"id\": \"6268ec80a098ed05f047f278\",\n \"created\": \"2022-04-27T07:10:56.86\",\n \"updated\": \"2024-10-01T11:24:31.365\",\n \"providerId\": \"13843842-1001-707c-f74b-505ade4cf865\",\n \"metadata\": {\n \"activeTeam\": {\n \"id\": \"6268ec80a098ed05f047f279\"\n },\n \"isDeveloper\": true,\n \"agreesToReceiveEmail\": true,\n \"postRegistrationWizardComplete\": true,\n \"approval\": \"ACTIVE\",\n \"registrationEmailSent\": false,\n \"teamRoles\": [\n {\n \"teamId\": \"6268ec80a098ed05f047f279\",\n \"accessDetails\": {\n \"roleName\": \"ADMIN\",\n \"apiKeys\": \"FULL\",\n \"billing\": \"FULL\",\n \"teams\": \"FULL\"\n }\n },\n {\n \"teamId\": \"6304fac7b097dd1afb5273f3\",\n \"accessDetails\": {\n \"roleName\": \"ADMIN\",\n \"apiKeys\": \"FULL\",\n \"billing\": \"FULL\",\n \"teams\": \"FULL\"\n }\n },\n ]\n },\n \"givenName\": \"Alexander 2\",\n \"familyName\": \"Schamne\",\n \"email\": \"albert.piable@apiable.io\",\n \"name\": \"Albert Piable\",\n \"active\": true,\n \"company\": \"Apiable\",\n \"version\": 42\n}\n" } } } } }, "400": { "description": "Bad Request: Invalid update parameters or operation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the patch operation is not allowed for the user.", "value": "Bad Request" } } } } }, "401": { "description": "Unauthorized for operation: updateUser", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/teams/{id}": { "get": { "tags": [ "Teams" ], "summary": "Read Team", "description": "Retrieve a team by id. The team will be returned with all its details.", "operationId": "findTeamById", "parameters": [ { "name": "id", "in": "path", "description": "The id of the team to be retrieved.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the team.", "content": { "application/json": { "schema": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } }, "examples": { "Example team": { "description": "Team object with all its details.", "value": { "id": "6268ec80a098ed05f047f279", "created": "2022-04-27T07:10:56.86", "updated": "2023-03-09T16:28:30.056", "name": "Shire-Hobbits", "users": [ { "id": "6268ec80a098ed05f047f278" } ], "internal": true, "version": 5 } } } } } }, "401": { "description": "Unauthorized for operation: findTeamById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested team does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the team with the given ID is not found.", "value": "Team not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "patch": { "tags": [ "Teams" ], "summary": "Update Team", "description": "Update values of the platform team. The response of the operation will be the updated team. The updates are applied through patch logic, which means that only the fields that are included in the request will be updated. The rest of the fields will remain unchanged.", "operationId": "updateTeam", "parameters": [ { "name": "id", "in": "path", "description": "The id of the team to be updated.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6409edb91c6c14300fce1a3c" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateTeam.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for team", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Team", "enum": [ "/name", "/internal" ] }, "value": { "type": "string", "description": "Value to be patched, can be a boolean or a string depending on the path" } } } }, "examples": { "Example patch operations": { "description": "Patch operation to update the team.", "value": [ { "op": "replace", "path": "/name", "value": "Lothlorien-Elves" } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: Team updated successfully.", "content": { "application/json": { "schema": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } }, "examples": { "Example response": { "description": "Updated team object.", "value": { "id": "6268ec80a098ed05f047f279", "created": "2022-04-27T07:10:56.86", "updated": "2023-03-09T16:28:30.056", "name": "Shire-Hobbits", "users": [ { "id": "6268ec80a098ed05f047f278" } ], "internal": true, "version": 5 } } } } } }, "400": { "description": "Bad Request: Invalid update parameters or operation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the patch operation is not allowed for the team.", "value": "Bad Request" } } } } }, "401": { "description": "Unauthorized for operation: updateTeam", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/{subscriptionId}/custom-properties/{customPropertyId}": { "get": { "tags": [ "Custom Properties" ], "summary": "Get a specific custom property by id for the subscription", "description": "Retrieves and returns the specific custom property by id for a specific subscription.", "operationId": "getCustomPropertyForSubscription", "parameters": [ { "name": "subscriptionId", "in": "path", "description": "The id of the subscription.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "customPropertyId", "in": "path", "description": "The id of the custom property.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f174095cc1da3963b9a1d7" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the custom property for the subscription.", "content": { "application/json": { "schema": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } }, "examples": { "Example Custom Property": { "description": "Custom property object with all its details.", "value": { "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } } } } } }, "401": { "description": "Unauthorized for operation: getCustomPropertyForSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested custom property does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the custom property with the given ID is not found.", "value": "Custom Property not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] }, "patch": { "tags": [ "Custom Properties" ], "summary": "Update a specific custom property by id for the subscription", "description": "Updates a specific custom property by id for a specific subscription using a patch operation.", "operationId": "updateCustomPropertyForSubscription", "parameters": [ { "name": "subscriptionId", "in": "path", "description": "The id of the subscription.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "customPropertyId", "in": "path", "description": "The id of the custom property.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f174095cc1da3963b9a1d7" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateCustomPropertyForSubscription.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } } }, "examples": { "Subscription Patch Example": { "description": "Example of a patch operation to update the custom property for a subscription.", "value": [ { "op": "replace", "path": "/name", "value": "new name" } ] } } } }, "required": true }, "responses": { "204": { "description": "No Content: Successfully updated the custom property for the subscription.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the custom property is successfully updated.", "value": "Custom property updated successfully" } } } } }, "401": { "description": "Unauthorized for operation: updateCustomPropertyForSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested custom property does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the custom property with the given ID is not found.", "value": "Custom Property not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/subscriptions/{id}": { "get": { "tags": [ "Subscriptions" ], "summary": "Get subscription by ID", "description": "Fetches a specific subscription by its unique identifier. Returns the subscription details with all non-sensitive information.", "operationId": "findSubscriptionById", "parameters": [ { "name": "id", "in": "path", "description": "Subscription ID to be retrieved", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the subscription details.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Example subscription with all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "401": { "description": "Unauthorized for operation: findSubscriptionById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested subscription does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription with the given ID is not found.", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "delete": { "tags": [ "Subscriptions" ], "summary": "Cancel and revoke a subscription", "description": "Cancels and revokes a subscription at the specified timestamp. This operation will cancel the subscription in the billing system and revoke API access. The cancellation will take effect at the timestamp provided in the cancelAt field.", "operationId": "cancelAndRevokeSubscription", "parameters": [ { "name": "id", "in": "path", "description": "Subscription ID to cancel and revoke", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body containing the timestamp for when the subscription cancellation should take effect", "content": { "application/json": { "schema": { "properties": { "cancelAt": { "type": "integer", "format": "int64", "description": "The timestamp when the subscription should be cancelled, in Unix seconds (UTC timezone)" } } }, "examples": { "Cancel subscription request": { "description": "Example request to cancel and revoke a subscription. The cancelAt field is a Unix timestamp (epoch seconds UTC) indicating when the cancellation should take effect.", "value": { "cancelAt": 1704067200 } } } } }, "required": true }, "responses": { "200": { "description": "OK: Subscription canceled and revoked successfully.", "content": { "application/json": {} } }, "400": { "description": "Bad Request: Subscription cannot be canceled in its current state or invalid cancelAt timestamp.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Invalid State": { "description": "Error message when the subscription cannot be canceled due to its current state.", "value": { "timestamp": "2024-09-30T12:17:51.528+00:00", "status": 400, "error": "Bad Request", "message": "Subscription cannot be canceled in its current state", "path": "/api/subscriptions/6268ec80a098ed05f047f278" } } } } } }, "401": { "description": "Unauthorized for operation: cancelAndRevokeSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription to cancel does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Subscription Not Found": { "description": "Error message when the subscription to be canceled is not found.", "value": { "timestamp": "2024-09-30T10:45:55.018+00:00", "status": 404, "error": "Not Found", "message": "Entity with id 6268ec80a098ed05f047f278 not found", "path": "/api/subscriptions/6268ec80a098ed05f047f278" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "patch": { "tags": [ "Subscriptions" ], "summary": "Update a subscription", "description": "Updates a subscription with the provided fields using JSON patch operations. Allowed fields for modification: \"name\", \"expires\", \"stripeSubscriptionId\", \"priceIds\", \"usageMeter\", \"owner\", \"email\"", "operationId": "updateSubscription", "parameters": [ { "name": "id", "in": "path", "description": "Subscription ID in updating subscription request", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "JSON Patch operations to be performed on the subscription.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for subscription", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Subscription", "enum": [ "/name", "/expires", "/stripeSubscriptionId", "/priceIds", "/usageMeter", "/owner", "/email" ] }, "value": { "type": "string" } } } }, "examples": { "Example patch operations": { "description": "Patch operation to update the subscription name.", "value": [ { "op": "replace", "path": "/name", "value": "new name" } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: Subscription updated successfully.", "content": { "application/json": { "schema": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "examples": { "Example response": { "description": "Updated subscription with all non-sensitive information.", "value": { "id": "66f693e5c8ec2f3e25b2b854", "created": "2024-09-27T14:15:49.319", "updated": "2024-09-27T14:45:08.03", "name": "202409271415", "status": "ACTIVE", "approvalEmailSent": true, "plan": { "id": "66f174095cc1da3963b9a1d7" }, "team": { "id": "62691aa099a7d17e2cac7664" }, "integrationId": "xxxxxxxxxx", "auth": { "type": "INTERMEDIATE_CLIENT_CREDENTIAL", "id": "_apbl_###", "integrationId": "xxxxxxxxxx", "registrationClientUri": "https://dev.apiable.io/api/oauth2/oauth-token/_APBL_###", "redirectUri": "https://dev.apiable.io", "examples": { "curl": "###" } }, "checkoutSession": "cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "stripeSubscriptionId": "sub_xxxxxxxxxxxxxxxxxxxxxxxx", "priceIds": [ "price_xxxxxxxxxxxxxxxxxxxxxxxx" ], "owner": { "id": "62691aa099a7d17e2cac7663" }, "customProperties": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ], "version": 5 } } } } } }, "400": { "description": "Bad Request: Invalid update parameters or operation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the patch operation is not allowed for the subscription.", "value": "Bad Request" } } } } }, "401": { "description": "Unauthorized for operation: updateSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The subscription to update does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription to be updated is not found.", "value": "Not Found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/custom-properties/{customPropertyId}": { "patch": { "tags": [ "Custom Properties" ], "summary": "Update a specific custom property by id for all subscriptions", "description": "Updates a specific custom property by id for all subscriptions that have the custom property using a patch operation.", "operationId": "updateCustomPropertyForAllSubscription", "parameters": [ { "name": "customPropertyId", "in": "path", "description": "The id of the custom property.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f174095cc1da3963b9a1d7" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateCustomPropertyForAllSubscription.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } } }, "examples": { "Subscription Patch Example": { "description": "Example of a patch operation to update the custom property for all subscriptions.", "value": [ { "op": "replace", "path": "/name", "value": "new name" } ] } } } }, "required": true }, "responses": { "204": { "description": "No Content: Successfully updated the custom property for all subscriptions.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the custom property is successfully updated for all subscriptions.", "value": "Custom property updated successfully for all subscriptions" } } } } }, "401": { "description": "Unauthorized for operation: updateCustomPropertyForAllSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/plans/{id}/docs/{docId}": { "get": { "tags": [ "Plans" ], "summary": "Get the plan-level doc of the plan specified by the plan id", "description": "This endpoint will return the plan-level doc of the specified plan", "operationId": "getDocOfPlanById_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "The specified plan-level documentation for the specified plan", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazingDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } } } }, "401": { "description": "Unauthorized for operation: getDocOfPlanById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "delete": { "tags": [ "Plans" ], "summary": "Delete a plan level documentation from a plan", "description": "Delete a specific plan level documentation by its ID from the plan. This endpoint allows you to remove a documentation version that is associated with the plan.", "operationId": "deletePlanDocumentationByPlanId", "parameters": [ { "name": "id", "in": "path", "description": "The id of the plan from which the documentation will be deleted.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "docId", "in": "path", "description": "The id of the documentation to be deleted.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f174095cc1da3963b9a1d7" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "204": { "description": "No Content: Successfully deleted the plan documentation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the plan documentation is successfully deleted.", "value": "Plan documentation deleted successfully" } } } } }, "401": { "description": "Unauthorized for operation: deletePlanDocumentationByPlanId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested plan or documentation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the plan or documentation with the given ID is not found.", "value": "Plan or Documentation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "patch": { "tags": [ "Plans" ], "summary": "Patch the plan-level doc", "description": "The supported operation is replace, and the supported paths are url, version, name", "operationId": "patchDocByPlanId_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "requestBody": { "description": "Request body for operation: patchDocByPlanId_1.", "content": { "application/json": { "schema": { "type": "array", "description": "The patch body", "items": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } } }, "examples": { "Patch Example": { "description": "Example of a patch operation to update the documentation name.", "value": [ { "op": "replace", "path": "/name", "value": "new doc name" } ] } } } }, "required": true }, "responses": { "200": { "description": "The updated documentation", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazingDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } } } }, "401": { "description": "Unauthorized for operation: patchDocByPlanId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/plans/{id}/apis/{integrationId}/docs/{docId}": { "get": { "tags": [ "Plans" ], "summary": "Get the api-level doc of all apis specified by the API integrationId", "description": "This endpoint will return the api-level doc of the specified api in the plan", "operationId": "getDocOfApiByIntegrationIdAndPlanId_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "The specified documentation for the specified APIs in the plan", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } } } }, "401": { "description": "Unauthorized for operation: getDocOfApiByIntegrationIdAndPlanId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "delete": { "tags": [ "Plans" ], "summary": "Delete an API level documentation from a plan", "description": "Delete a specific API level documentation by its ID from the plan. This endpoint allows you to remove a documentation version that is associated with the plan and API.", "operationId": "deleteApiLevelDocumentationByPlanId", "parameters": [ { "name": "id", "in": "path", "description": "The id of the plan from which the API documentation will be deleted.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "docId", "in": "path", "description": "The id of the API documentation to be deleted.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f174095cc1da3963b9a1d7" }, { "name": "integrationId", "in": "path", "description": "The id of the API integration associated with the documentation.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "cl4z2nr4p8" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "204": { "description": "No Content: Successfully deleted the API level documentation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the API level documentation is successfully deleted.", "value": "API level documentation deleted successfully" } } } } }, "401": { "description": "Unauthorized for operation: deleteApiLevelDocumentationByPlanId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested plan or API documentation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the plan or API documentation with the given ID is not found.", "value": "Plan or API Documentation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "patch": { "tags": [ "Plans" ], "summary": "Patch the api-level doc", "description": "The supported operation is replace, and the supported paths are url, version, name", "operationId": "patchDocByPlanIdAndApiIntegrationId_1", "parameters": [ { "name": "id", "in": "path", "description": "The plan id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "requestBody": { "description": "Request body for operation: patchDocByPlanIdAndApiIntegrationId_1.", "content": { "application/json": { "schema": { "type": "array", "description": "The patch body", "items": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } } }, "examples": { "Patch Example": { "description": "Example of a patch operation to update the documentation name.", "value": [ { "op": "replace", "path": "/name", "value": "new doc name" } ] } } } }, "required": true }, "responses": { "200": { "description": "The updated documentation", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } } } }, "401": { "description": "Unauthorized for operation: patchDocByPlanIdAndApiIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/plans/apis/{integrationId}/docs/{docId}": { "get": { "tags": [ "Plans" ], "summary": "Get the api-level doc of all apis specified by the API integrationId", "description": "This endpoint will return the api-level doc of the specified api across all plans", "operationId": "getDocOfApiByIntegrationId_1", "parameters": [ { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "The specified documentation for the specified APIs across all plans", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } } } }, "401": { "description": "Unauthorized for operation: getDocOfApiByIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "delete": { "tags": [ "Plans" ], "summary": "Delete an api level documentation from a plan", "description": "Deletes an api-level documentation entry from the plans containing the specified API. ", "operationId": "deleteApiLevelDocumentation", "parameters": [ { "name": "docId", "in": "path", "description": "The id of the API documentation to be deleted.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f174095cc1da3963b9a1d7" }, { "name": "integrationId", "in": "path", "description": "The id of the API integration associated with the documentation.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "cl4z2nr4p8" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "204": { "description": "No Content: Successfully deleted the API level documentation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the API level documentation is successfully deleted.", "value": "API level documentation deleted successfully" } } } } }, "401": { "description": "Unauthorized for operation: deleteApiLevelDocumentation", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested plan or API documentation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the plan or API documentation with the given ID is not found.", "value": "Plan or API Documentation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] }, "patch": { "tags": [ "Plans" ], "summary": "Patch the api-level doc", "description": "The supported operation is replace, and the supported paths are url, version, name", "operationId": "patchDocByApiIntegrationId_1", "parameters": [ { "name": "integrationId", "in": "path", "description": "The API integrationId", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "requestBody": { "description": "Request body for operation: patchDocByApiIntegrationId_1.", "content": { "application/json": { "schema": { "type": "array", "description": "The patch body", "items": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } } }, "examples": { "Patch Example": { "description": "Example of a patch operation to update the documentation name.", "value": [ { "op": "replace", "path": "/name", "value": "new doc name" } ] } } } }, "required": true }, "responses": { "200": { "description": "The updated documentation", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "example": { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazonGatewayDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } } } }, "401": { "description": "Unauthorized for operation: patchDocByApiIntegrationId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/invitations/{id}": { "get": { "tags": [ "Invitations" ], "summary": "Read Invitation", "description": "Retrieve an invitation by id. The invitation will be returned with all its details.", "operationId": "findInvitationById", "parameters": [ { "name": "id", "in": "path", "description": "The id of the invitation to be retrieved.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the invitation.", "content": { "application/json": { "schema": { "description": "Invitation object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "expires": { "type": "string", "format": "date-time" }, "invitorEmail": { "type": "string", "description": "The email of the invitor" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "status": { "type": "string", "description": "The status of the invitation", "enum": [ "PENDING", "ACCEPTED", "ARCHIVED" ] }, "invitee": { "type": "string", "description": "The user that is invited" }, "invitor": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } }, "examples": { "Example invitation": { "description": "Invitation object with all its details.", "value": { "id": "6511731a61c9ae2efbbd8d9d", "created": "2023-09-25T14:46:34.34", "updated": "2023-09-25T14:46:34.34", "expires": "2023-10-25T14:46:34.34", "invitee": "anna.piable@apiable.io", "invitor": { "id": "6409edb91c6c14300fce1a3c" }, "accessDetails": { "roleName": "RESTRICTED", "apiKeys": "READ", "billing": "NONE", "teams": "NONE" }, "team": { "id": "6409edb91c6c14300fce1a3a" }, "status": "PENDING", "version": 0 } } } } } }, "401": { "description": "Unauthorized for operation: findInvitationById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested invitation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the invitation with the given ID is not found.", "value": "Invitation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "patch": { "tags": [ "Invitations" ], "summary": "Update an invitation", "description": "Update an existing invitation by its ID. The request body should contain the updated fields.", "operationId": "updateInvitation", "parameters": [ { "name": "id", "in": "path", "description": "Invitation ID", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateInvitation.", "content": { "application/json": { "schema": { "description": "Patch object for invitation", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Invitation", "enum": [ "/expires", "/invitee", "/invitor", "/invitorEmail", "/accessDetails", "/team", "/status" ] }, "value": { "type": "string" } } }, "examples": { "Example of patch": { "summary": "Example patch for updating an invitation.", "description": "Example patch for updating an invitation.", "value": [ { "op": "replace", "path": "/status", "value": "ARCHIVED" } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: Successfully updated the invitation.", "content": { "application/json": { "schema": { "description": "Invitation object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "expires": { "type": "string", "format": "date-time" }, "invitorEmail": { "type": "string", "description": "The email of the invitor" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "status": { "type": "string", "description": "The status of the invitation", "enum": [ "PENDING", "ACCEPTED", "ARCHIVED" ] }, "invitee": { "type": "string", "description": "The user that is invited" }, "invitor": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } }, "examples": { "Example invitation": { "description": "Updated invitation object with all its details.", "value": { "id": "6511731a61c9ae2efbbd8d9d", "created": "2023-09-25T14:46:34.34", "updated": "2023-09-25T14:46:34.34", "expires": "2023-10-25T14:46:34.34", "invitee": "hilbert.piable@apiable.io", "invitor": { "id": "6409edb91c6c14300fce1a3c" }, "accessDetails": { "roleName": "RESTRICTED", "apiKeys": "NONE", "billing": "NONE", "teams": "FULL" }, "team": { "id": "6409edb91c6c14300fce1a3a" }, "status": "ARCHIVED", "version": 1 } } } } } }, "401": { "description": "Unauthorized for operation: updateInvitation", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested invitation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the invitation with the given ID is not found.", "value": "Invitation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/docs/{docId}": { "get": { "tags": [ "Docs" ], "summary": "Get the doc by id", "description": "Retrieves and returns the specific API documentation by id.", "operationId": "findDocById", "parameters": [ { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f3c2be7903d41208214a7d" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the documentation.", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "examples": { "Example Documentation": { "description": "Documentation object with all its details.", "value": { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazingDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } } } } } }, "401": { "description": "Unauthorized for operation: findDocById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested documentation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the documentation with the given ID is not found.", "value": "Documentation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] }, "patch": { "tags": [ "Docs" ], "summary": "Patch the doc by id", "description": "Updates the API documentation by applying the specified patch operations.", "operationId": "patchDocById", "parameters": [ { "name": "docId", "in": "path", "description": "The documentation id", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "66f3c2be7903d41208214a7d" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: patchDocById.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } } }, "examples": { "Patch Example": { "description": "Example of a patch operation to update the documentation name.", "value": [ { "op": "replace", "path": "/name", "value": "new doc name" } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: Successfully updated the documentation.", "content": { "application/json": { "schema": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "examples": { "Updated Documentation": { "description": "Documentation object with updated details.", "value": { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/amazingDocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } } } } } }, "401": { "description": "Unauthorized for operation: patchDocById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested documentation does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the documentation with the given ID is not found.", "value": "Documentation not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/docs/full-api-doc": { "patch": { "tags": [ "Docs" ], "summary": "Update the Full API reference", "description": "Updates the Full API documentation configuration by applying the specified patch operations.", "operationId": "patchFullApiDocConfiguration", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: patchFullApiDocConfiguration.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for Full API Docs Configuration", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Full API Docs Configuration", "enum": [ "/url", "/public", "/name" ] }, "value": { "type": "string" } } } }, "examples": { "Full API Doc Patch Example": { "description": "Example of a patch operation to update the Full API documentation configuration.", "value": [ { "op": "replace", "path": "/url", "value": "https://example.apiable.io/full-api-ref.json" } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: Successfully updated the Full API documentation configuration.", "content": { "application/json": { "schema": { "description": "The full-api-doc configuration", "properties": { "url": { "type": "string" }, "public": { "type": "boolean" }, "name": { "type": "string" }, "published": { "type": "boolean" }, "cascade": { "type": "boolean" }, "customDescriptions": { "type": "array", "items": { "description": "The custom description reference configuration", "properties": { "operationId": { "type": "string" }, "method": { "type": "string" }, "path": { "type": "string" }, "description": { "type": "string" } } } }, "validationRulesetUrl": { "type": "string" }, "validationType": { "type": "string", "enum": [ "SPECTRAL" ] } } }, "examples": { "Updated Full API Doc Configuration": { "description": "Full API documentation configuration with updated details.", "value": { "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/hairygreenwombatrlhy7g/34a2b273-7d15-4ebb-a8bf-7873ded2c8ad", "public": true, "name": "example.yaml" } } } } } }, "401": { "description": "Unauthorized for operation: patchFullApiDocConfiguration", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested Full API documentation configuration does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the Full API documentation configuration with the given ID is not found.", "value": "Full API documentation configuration not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/companies/{id}": { "get": { "tags": [ "Companies" ], "summary": "Get company by ID", "description": "Fetches a specific company by its unique identifier.", "operationId": "findCompanyById", "parameters": [ { "name": "id", "in": "path", "description": "Company ID to retrieve", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the company details.", "content": { "application/json": { "schema": { "description": "Company", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "domain": { "type": "string", "description": "The domain name of the company. e.g: \"example.com\"" }, "name": { "type": "string", "description": "The name of the company, defaults to the domain name of the company." } } }, "examples": { "Example response": { "description": "Example company.", "value": { "id": "6697dd1e54d9ff2d372e135f", "created": "2024-07-17T17:02:54.005", "updated": "2024-07-17T17:02:54.005", "domain": "yahoo.com", "name": "Saruman Rings S.A.", "version": 0 } } } } } }, "401": { "description": "Unauthorized for operation: findCompanyById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested company does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the retrieved company is not found.", "value": "Company not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] }, "patch": { "tags": [ "Companies" ], "summary": "Update a company", "description": "Updates a company with the provided fields using JSON patch operations.", "operationId": "updateCompany", "parameters": [ { "name": "id", "in": "path", "description": "The ID of the company to be updated", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "requestBody": { "description": "Request body for operation: updateCompany.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Patch object for subscription", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Subscription", "enum": [ "/name", "/expires", "/stripeSubscriptionId", "/priceIds", "/usageMeter", "/owner", "/email" ] }, "value": { "type": "string" } } } }, "examples": { "Example patch operations": { "description": "Patch operation to update the company name.", "value": [ { "op": "replace", "path": "/name", "value": "Mordor Rings Inc." } ] } } } }, "required": true }, "responses": { "200": { "description": "OK: Company updated successfully.", "content": { "application/json": { "schema": { "description": "Company", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "domain": { "type": "string", "description": "The domain name of the company. e.g: \"example.com\"" }, "name": { "type": "string", "description": "The name of the company, defaults to the domain name of the company." } } }, "examples": { "Example response": { "description": "Updated company.", "value": { "id": "6697dd1e54d9ff2d372e135f", "created": "2024-07-17T17:02:54.005", "updated": "2024-07-17T17:02:54.005", "domain": "yahoo.com", "name": "Saruman Rings S.A.", "version": 0 } } } } } }, "400": { "description": "Bad Request: Invalid update parameters or operation.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "BadRequest": { "description": "Error message when the patch operation is not allowed for the company.", "value": "Invalid patch operation" } } } } }, "401": { "description": "Unauthorized for operation: updateCompany", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The company to be updated does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the company to be updated is not found.", "value": "Company not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/webhooks/{id}/test": { "get": { "tags": [ "Webhooks" ], "summary": "Test a webhook by ID", "description": "Send a test event to a specific webhook by its ID. This will simulate the webhook sending a POST request to the URL configured for the webhook.The test event will be sent using the same schema as actual events, but with a different event type (TEST_EVENT).", "operationId": "testWebhookById", "parameters": [ { "name": "id", "in": "path", "description": "The id of the webhook to be tested.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "67040bcb1eb964694d999a68" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully sent the test event to the webhook.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Success": { "description": "Confirmation message when the test event is successfully sent to the webhook.", "value": "Test event sent to: https: with response.status: OK " } } } } }, "401": { "description": "Unauthorized for operation: testWebhookById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The webhook to be tested does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the webhook with the given ID is not found.", "value": "Webhook not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/webhooks/{id}/history": { "get": { "tags": [ "Webhooks" ], "summary": "Retrieve the history of webhook results for the past 24 hours", "description": "Retrieve the history of webhook results for the past 24 hours. This includes all webhook events that were sent.", "operationId": "getWebhookHistory", "parameters": [ { "name": "id", "in": "path", "description": "The id of the webhook to retrieve the history for.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "67040bcb1eb964694d999a68" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the webhook history.", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } }, "examples": { "Webhook History Example": { "description": "List of webhook history entries for the specified webhook.", "value": [ "Webhook event with id 67993d1b70045616067c6629 sent successfully, with status 200 OK" ] } } } } }, "401": { "description": "Unauthorized for operation: getWebhookHistory", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The webhook does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the webhook with the given ID is not found.", "value": "Webhook not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/versions": { "get": { "tags": [ "Serverinfo" ], "summary": "Get versions of the API", "description": "This endpoint returns the versions of the API that are available. The versions are defined in the PlatformApiConfiguration class.", "operationId": "versions", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "List of API versions", "content": { "application/json": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized for operation: versions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/users": { "get": { "tags": [ "Users" ], "summary": "Read Users", "description": "List all users on the platform that match the pagination and search criteria.", "operationId": "findAllUsers", "parameters": [ { "name": "page", "in": "query", "description": "The page number of the users to be returned.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "The number of users to be returned per page.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "The sorting criteria for the users. The sorting criteria is a list of fields separated by commas.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name:DESC" ] }, { "name": "search", "in": "query", "description": "The search criteria for the users.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name.like=albert" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of users.", "content": { "application/json": { "schema": { "description": "Response object for paginated user results", "properties": { "content": { "type": "array", "items": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example list of users": { "description": "List of all users that exist on the portal.", "value": { "content": [ { "id": "6409edb91c6c14300fce1a3c", "created": "2023-03-09T16:31:21.829", "updated": "2023-09-25T14:45:54.602", "providerId": "VVNFUjpkMTllMjE3ZS02NDI0LTExZWQtOTMwOS0wNjZmNDNjODhjYjI=", "metadata": { "activeTeam": { "id": "6409edb91c6c14300fce1a3a" }, "isDeveloper": false, "agreesToReceiveEmail": false, "postRegistrationWizardComplete": true, "approval": "ACTIVE", "registrationEmailSent": true, "teamRoles": [ { "teamId": "6409edb91c6c14300fce1a3a", "accessDetails": { "roleName": "ADMIN", "apiKeys": "FULL", "billing": "FULL", "teams": "FULL" } } ] }, "givenName": "Alice", "familyName": "Piable", "email": "alice.piable@apiable.io", "name": "Alice Piable", "active": true, "company": "Apiable", "version": 32 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": false, "unsorted": false, "sorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": 1, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": false, "unsorted": false, "sorted": true }, "first": true, "numberOfElements": 1, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllUsers", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/subscriptions/{subscriptionId}/custom-properties": { "get": { "tags": [ "Custom Properties" ], "summary": "Get the custom properties for the subscription", "description": "Retrieves and returns all custom properties for a specific subscription.", "operationId": "getCustomPropertiesForSubscription", "parameters": [ { "name": "subscriptionId", "in": "path", "description": "The id of the subscription to retrieve custom properties for.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the custom properties for the subscription.", "content": { "application/json": { "schema": { "type": "array", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "examples": { "Example Custom Properties": { "description": "List of custom properties associated with the specified subscription.", "value": [ { "id": "66f69ac4ccc00456987e3df8", "display": "new display", "type": "STRING", "description": "string", "readOnly": true, "required": true, "includeInSubscriptionWizard": true, "value": "new value2" } ] } } } } }, "401": { "description": "Unauthorized for operation: getCustomPropertiesForSubscription", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested subscription does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the subscription with the given ID is not found.", "value": "Subscription not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/products": { "get": { "tags": [ "Products" ], "summary": "Read Products", "description": "List all products on the platform that match the pagination and search criteria.", "operationId": "findAllProducts", "parameters": [ { "name": "page", "in": "query", "description": "The page number of the products to be returned.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "The number of products to be returned per page.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "The sorting criteria for the products. The sorting criteria is a list of fields separated by commas.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name:DESC" ] }, { "name": "search", "in": "query", "description": "The search criteria for the products.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name.like=example" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of products.", "content": { "application/json": { "schema": { "description": "Response object for paginated product results", "properties": { "content": { "type": "array", "items": { "description": "Product", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string" }, "title": { "type": "string" }, "visibility": { "type": "string", "enum": [ "OPEN", "HIDDEN" ] }, "audience": { "type": "string", "enum": [ "PUBLIC", "MANUAL", "INTERNAL" ] }, "slug": { "type": "string", "description": "The url slug of the product" }, "active": { "type": "boolean" }, "marketings": { "type": "array", "description": "List of marketing feature references for this product.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "testimonials": { "type": "array", "description": "List of testimonials for this product.", "items": { "description": "A testimonial for a product", "properties": { "author": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" }, "avatar": { "type": "string" } } } }, "description": { "type": "string" }, "image": { "description": "Image object containing URL, name, width, height and size", "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "width": { "type": "integer", "format": "int32" }, "height": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" } } }, "menuItems": { "description": "Custom menu items for this product.", "properties": { "general": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "authorized": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "monetization": { "description": "The monetization configuration interface", "discriminator": { "propertyName": "type" }, "properties": { "invoiceAttentionRequiredNotificationEmails": { "type": "array", "items": { "type": "string" } }, "connected": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "type" ] } } }, "groupRefs": { "type": "array", "items": { "type": "string", "description": "Reference to an enterprise group that this product is associated with." } }, "productCategories": { "type": "array", "description": "List of product categories that this product has been associated with.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "icon": { "description": "The icon of the product", "properties": { "type": { "type": "string", "enum": [ "CUSTOM", "SYSTEM" ] }, "value": { "type": "string" } } }, "cardDisplay": { "type": "string", "enum": [ "ICON", "IMAGE" ] }, "markdocObjects": { "type": "array", "items": { "description": "A product markdoc object", "properties": { "name": { "type": "string" }, "status": { "type": "string" }, "description": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "partials": { "type": "array", "items": { "description": "A product markdoc partial", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "description": { "type": "string" } } } } } } }, "enableChangingPlans": { "type": "boolean", "description": "Flag to indicate if the product allows changing plans." } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example list of products": { "description": "List of all products that exist on the portal.", "value": { "content": [ { "id": "60950a160d4e8b26d3803d40", "created": "2022-08-10T12:07:22.551", "updated": "2022-08-10T12:07:22.551", "name": "Quote API", "title": "Quote API", "visibility": "OPEN", "audience": "PUBLIC", "slug": "bike-insurance-pricing-api", "active": true, "marketings": [ { "id": "62fbb264cd6d6013b2b8845f" }, { "id": "62fbb264cd6d6013b2b88461" } ], "testimonials": [ { "author": "Kitty (CEO)", "title": "What an amazing experience", "content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500", "avatar": "https://cdn.pixabay.com/photo/2015/11/16/14/43/cat-1045782__480.jpg" }, { "author": "Doggy (CTO)", "title": "What an amazing experience", "content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500", "avatar": "https://cdn.pixabay.com/photo/2015/11/17/13/13/bulldog-1047518__480.jpg" } ], "description": "Enables you to provide your customers with bike insurance pricing from your own user journey.", "image": { "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/98f14a79-63ca-4b6a-89bb-9951374ee442.jpeg", "name": "98f14a79-63ca-4b6a-89bb-9951374ee442.jpeg" }, "menuItems": { "general": {} }, "version": 42 }, { "id": "6368f3d9fb042b576f6cf279", "created": "2023-03-09T16:29:49.831", "updated": "2023-08-04T16:32:57.317", "name": "Cypress API - with Plan", "title": "Cypress API - with Plan", "visibility": "HIDDEN", "audience": "INTERNAL", "slug": "cypress-api-with-plan", "active": true, "marketings": [], "description": "", "image": { "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/4ce5d53d-8d67-40bb-8509-8a7b1f30bb8d.png", "name": "4ce5d53d-8d67-40bb-8509-8a7b1f30bb8d.png" }, "menuItems": { "general": {} }, "productCategories": [ { "id": "64ccfe08cf971679385f10f2" } ], "version": 6 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": false, "unsorted": false, "sorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": 2, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": false, "unsorted": false, "sorted": true }, "first": true, "numberOfElements": 2, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllProducts", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/products/{id}": { "get": { "tags": [ "Products" ], "summary": "Read Product", "description": "Retrieve a product by id. The product will be returned with all its details.", "operationId": "findProductById", "parameters": [ { "name": "id", "in": "path", "description": "The id of the product to be retrieved.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the product.", "content": { "application/json": { "schema": { "description": "Product", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string" }, "title": { "type": "string" }, "visibility": { "type": "string", "enum": [ "OPEN", "HIDDEN" ] }, "audience": { "type": "string", "enum": [ "PUBLIC", "MANUAL", "INTERNAL" ] }, "slug": { "type": "string", "description": "The url slug of the product" }, "active": { "type": "boolean" }, "marketings": { "type": "array", "description": "List of marketing feature references for this product.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "testimonials": { "type": "array", "description": "List of testimonials for this product.", "items": { "description": "A testimonial for a product", "properties": { "author": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" }, "avatar": { "type": "string" } } } }, "description": { "type": "string" }, "image": { "description": "Image object containing URL, name, width, height and size", "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "width": { "type": "integer", "format": "int32" }, "height": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" } } }, "menuItems": { "description": "Custom menu items for this product.", "properties": { "general": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "authorized": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "monetization": { "description": "The monetization configuration interface", "discriminator": { "propertyName": "type" }, "properties": { "invoiceAttentionRequiredNotificationEmails": { "type": "array", "items": { "type": "string" } }, "connected": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "type" ] } } }, "groupRefs": { "type": "array", "items": { "type": "string", "description": "Reference to an enterprise group that this product is associated with." } }, "productCategories": { "type": "array", "description": "List of product categories that this product has been associated with.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "icon": { "description": "The icon of the product", "properties": { "type": { "type": "string", "enum": [ "CUSTOM", "SYSTEM" ] }, "value": { "type": "string" } } }, "cardDisplay": { "type": "string", "enum": [ "ICON", "IMAGE" ] }, "markdocObjects": { "type": "array", "items": { "description": "A product markdoc object", "properties": { "name": { "type": "string" }, "status": { "type": "string" }, "description": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "partials": { "type": "array", "items": { "description": "A product markdoc partial", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "description": { "type": "string" } } } } } } }, "enableChangingPlans": { "type": "boolean", "description": "Flag to indicate if the product allows changing plans." } } }, "examples": { "Example product": { "description": "Product object with all its details.", "value": { "id": "60950a160d4e8b26d3803d40", "created": "2022-08-10T12:07:22.551", "updated": "2022-08-10T12:07:22.551", "name": "Quote API", "title": "Quote API", "visibility": "OPEN", "audience": "PUBLIC", "slug": "bike-insurance-pricing-api", "active": true, "marketings": [ { "id": "62fbb264cd6d6013b2b8845f" }, { "id": "62fbb264cd6d6013b2b88461" } ], "testimonials": [ { "author": "Kitty (CEO)", "title": "What an amazing experience", "content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500", "avatar": "https://cdn.pixabay.com/photo/2015/11/16/14/43/cat-1045782__480.jpg" }, { "author": "Doggy (CTO)", "title": "What an amazing experience", "content": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500", "avatar": "https://cdn.pixabay.com/photo/2015/11/17/13/13/bulldog-1047518__480.jpg" } ], "description": "Enables you to provide your customers with bike insurance pricing from your own user journey.", "image": { "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/98f14a79-63ca-4b6a-89bb-9951374ee442.jpeg", "name": "98f14a79-63ca-4b6a-89bb-9951374ee442.jpeg" }, "menuItems": { "general": {} }, "version": 42 } } } } } }, "401": { "description": "Unauthorized for operation: findProductById", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested product does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the product with the given ID is not found.", "value": "Product not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } }, "/api/plans": { "get": { "tags": [ "Plans" ], "summary": "Read Plans", "description": "List all plans on the platform that match the pagination and search criteria.", "operationId": "findAllPlans", "parameters": [ { "name": "page", "in": "query", "description": "The page number of the plans to be returned.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "The number of plans to be returned per page.", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "The sorting criteria for the plans. The sorting criteria is a list of fields separated by commas.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name:DESC" ] }, { "name": "search", "in": "query", "description": "The search criteria for the plans.", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "product.id.match=60950a160d4e8b26d3803d40", "name.like=example" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the list of plans.", "content": { "application/json": { "schema": { "description": "Response object for paginated plan results", "properties": { "content": { "type": "array", "items": { "description": "Plan object. A plan is a set of APIs and properties that can be subscribed to by users.", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "ancestorPlanId": { "type": "string" }, "approvalGroupIdRef": { "type": "string", "description": "The approval group ID reference for the plan." }, "apis": { "type": "array", "description": "List of APIs included in the plan.", "items": { "description": "API item", "discriminator": { "propertyName": "type" }, "properties": { "name": { "type": "string" }, "resources": { "type": "array", "items": { "description": "The Resource schema is used to represent a resource in the API gateway. It includes details such as the path, method, and the integration ID.", "properties": { "path": { "type": "string" }, "method": { "type": "string" }, "integrationId": { "type": "string" } } } }, "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] }, "url": { "type": "string" }, "integrationId": { "type": "string" }, "documentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "serviceIntegrationId": { "type": "string" } } } }, "propertiesDescription": { "type": "string", "description": "The description of the properties of the plan." }, "propertiesTabName": { "type": "string", "description": "The name of the tab to display the properties of the plan." }, "customProperties": { "type": "array", "description": "List of available custom properties of the plan.", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "description": { "type": "string", "description": "A brief, optional description of the plan to present to end user to help them select the correct plan." }, "documentationLevel": { "type": "string", "description": "The documentation level of the plan. Used to decide what level of documentation should be displayed on the portal.", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean", "description": "Whether the documentation is public or not." }, "documentations": { "type": "array", "description": "List of documentation versions for the plan.", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "customDocumentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "deprecation": { "type": "string", "format": "date-time" }, "duration": { "type": "integer", "format": "int32", "description": "The duration of the plan in days." }, "enableUsageEvents": { "type": "boolean", "description": "Flag to enable usage events for the plan." }, "features": { "type": "array", "description": "List of feature references for the plan.", "items": { "description": "Reference to a feature identifier with value for this plan.", "properties": { "ref": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "value": { "type": "string" } } } }, "gateway": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "integrationId": { "type": "string", "description": "Integration ID of the plan in the gateway. Used to identify the plan in the gateway. For example, with Amazon API Gateway, this would be the Usage Plan ID." }, "monetization": { "description": "Monetization configuration for the plan. Used to define how the plan is billed.", "properties": { "billProcessing": { "type": "string", "enum": [ "API_CALL", "TOKEN", "APIABLE_CREDIT", "CUSTOM" ] }, "unitLabel": { "type": "string" }, "cycle": { "type": "string", "enum": [ "MONTH", "YEAR", "MONTHLY", "YEARLY", "NONE" ] }, "revenueModel": { "type": "string", "enum": [ "ONETIME", "RECURRING", "FLAT_FEE", "GRADUATED", "VOLUME", "FREE", "CONTRACT", "FLAT_FEE_OVERAGE", "PREPAID_BURN_DOWN" ] }, "prices": { "type": "array", "items": { "description": "The price for a plan in the monetization service.", "properties": { "amount": { "type": "number", "format": "double" }, "currency": { "type": "string" }, "integrationId": { "type": "string" }, "overageIntegrationId": { "type": "string" }, "meterId": { "type": "string" }, "active": { "type": "boolean" }, "default": { "type": "boolean" }, "tiers": { "type": "array", "items": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } } }, "matchingCriteria": { "type": "array", "items": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } } }, "lookupKey": { "type": "string" }, "includesTax": { "type": "boolean" }, "labelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } } } } }, "defined": { "type": "boolean" }, "meteringBaseUrl": { "type": "string" } } }, "name": { "type": "string" }, "numberOfAllowedSubscriptions": { "type": "integer", "format": "int32", "description": "The number of allowed subscriptions allowed for the plan." }, "order": { "type": "integer", "format": "int32", "description": "The order of the plan in the list of plans for the product." }, "product": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "securityLevel": { "type": "string", "description": "The security level authorization type of the plan.", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "status": { "type": "string", "description": "The status of the plan", "enum": [ "INACTIVE", "ACTIVE", "ARCHIVED", "DEPRECATED", "DRAFT" ] }, "rateLimit": { "description": "Rate-limiting configuration for the plan. Used to define how many requests can be made to the APIs included in a given time period.", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] } } }, "planVersion": { "type": "string", "description": "The user defined version of the plan." }, "published": { "type": "string", "format": "date-time" }, "redirectUri": { "type": "string" } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example list of plans": { "description": "List of all plans that exist on the portal.", "value": { "content": [ { "id": "66f174095cc1da3963b9a1d7", "created": "2024-09-23T16:58:33.962", "updated": "2024-09-23T16:59:11.984", "name": "Example Plan", "order": 2, "status": "ACTIVE", "product": { "id": "66e803e91afc532cbde31cd1" }, "apis": [ { "type": "AMAZON", "name": "Jokes (Cognito) - prod", "url": "https://cl4z2nr4p8.execute-api.eu-central-1.amazonaws.com/prod", "integrationId": "cl4z2nr4p8", "serviceIntegrationId": "cl4z2nr4p8", "resources": [ { "path": "/programming", "method": "GET", "integrationId": "pb1jqo" } ], "stage": "prod", "environmentId": "w7rc9s", "compatibleWithGatewayAuthz": true } ], "gateway": { "id": "63527499bad1d32643c4f875" }, "integrationId": "inbwnw", "description": "Acquire test data, easily, fast, and safely!", "monetization": { "unitLabel": "call", "cycle": "MONTH", "revenueModel": "FLAT_FEE", "prices": [ { "amount": 10, "currency": "EUR", "integrationId": "price_1Q2CnF4C6YYiB1TPwz8oA5wZ", "active": true, "default": false, "tiers": [ { "min": 1, "max": 100, "perCall": 0, "flatFee": 2 }, { "min": 101, "max": -1, "perCall": 0, "flatFee": 1 } ], "lookupKey": "Example", "labelOverrides": { "leadingText": "", "mainText": "", "trailingText": "", "detailsTitle": "", "detailsText": "", "ctaOverrideText": "", "ctaOverrideUrl": "" } } ], "defined": false }, "rateLimit": { "type": "AMAZON", "quoteLimit": 2147483647, "quotePeriod": "MONTH", "throttleBurstLimit": 2147483647, "throttleRateLimit": 2147483647 }, "documentationLevel": "PLAN", "documentationPublic": true, "documentations": [ { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/icannotbelieveitisdocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } ], "securityLevel": "INTERMEDIATE_CLIENT_CREDENTIAL", "enableUsageEvents": false, "propertiesTabName": "Properties", "customProperties": [], "version": 3 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": false, "unsorted": false, "sorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": 1, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": false, "unsorted": false, "sorted": true }, "first": true, "numberOfElements": 1, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllPlans", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/plans/{id}": { "get": { "tags": [ "Plans" ], "summary": "Get the plan by the plan id", "description": "This endpoint will return the plan details if the user has the authority to view the plan", "operationId": "findPlanById_1", "parameters": [ { "name": "id", "in": "path", "description": "The id of the plan to be retrieved.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25", "2023-01-01" ] } } ], "responses": { "200": { "description": "The details about the documentation on this plan", "content": { "application/json": { "schema": { "oneOf": [ { "description": "Details of a plan including documentation.", "properties": { "id": { "type": "string" }, "documentationLevel": { "type": "string", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean" }, "planLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "apiLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } } } }, { "description": "Plan object. A plan is a set of APIs and properties that can be subscribed to by users.", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "ancestorPlanId": { "type": "string" }, "approvalGroupIdRef": { "type": "string", "description": "The approval group ID reference for the plan." }, "apis": { "type": "array", "description": "List of APIs included in the plan.", "items": { "description": "API item", "discriminator": { "propertyName": "type" }, "properties": { "name": { "type": "string" }, "resources": { "type": "array", "items": { "description": "The Resource schema is used to represent a resource in the API gateway. It includes details such as the path, method, and the integration ID.", "properties": { "path": { "type": "string" }, "method": { "type": "string" }, "integrationId": { "type": "string" } } } }, "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] }, "url": { "type": "string" }, "integrationId": { "type": "string" }, "documentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "serviceIntegrationId": { "type": "string" } } } }, "propertiesDescription": { "type": "string", "description": "The description of the properties of the plan." }, "propertiesTabName": { "type": "string", "description": "The name of the tab to display the properties of the plan." }, "customProperties": { "type": "array", "description": "List of available custom properties of the plan.", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "description": { "type": "string", "description": "A brief, optional description of the plan to present to end user to help them select the correct plan." }, "documentationLevel": { "type": "string", "description": "The documentation level of the plan. Used to decide what level of documentation should be displayed on the portal.", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean", "description": "Whether the documentation is public or not." }, "documentations": { "type": "array", "description": "List of documentation versions for the plan.", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "customDocumentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "deprecation": { "type": "string", "format": "date-time" }, "duration": { "type": "integer", "format": "int32", "description": "The duration of the plan in days." }, "enableUsageEvents": { "type": "boolean", "description": "Flag to enable usage events for the plan." }, "features": { "type": "array", "description": "List of feature references for the plan.", "items": { "description": "Reference to a feature identifier with value for this plan.", "properties": { "ref": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "value": { "type": "string" } } } }, "gateway": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "integrationId": { "type": "string", "description": "Integration ID of the plan in the gateway. Used to identify the plan in the gateway. For example, with Amazon API Gateway, this would be the Usage Plan ID." }, "monetization": { "description": "Monetization configuration for the plan. Used to define how the plan is billed.", "properties": { "billProcessing": { "type": "string", "enum": [ "API_CALL", "TOKEN", "APIABLE_CREDIT", "CUSTOM" ] }, "unitLabel": { "type": "string" }, "cycle": { "type": "string", "enum": [ "MONTH", "YEAR", "MONTHLY", "YEARLY", "NONE" ] }, "revenueModel": { "type": "string", "enum": [ "ONETIME", "RECURRING", "FLAT_FEE", "GRADUATED", "VOLUME", "FREE", "CONTRACT", "FLAT_FEE_OVERAGE", "PREPAID_BURN_DOWN" ] }, "prices": { "type": "array", "items": { "description": "The price for a plan in the monetization service.", "properties": { "amount": { "type": "number", "format": "double" }, "currency": { "type": "string" }, "integrationId": { "type": "string" }, "overageIntegrationId": { "type": "string" }, "meterId": { "type": "string" }, "active": { "type": "boolean" }, "default": { "type": "boolean" }, "tiers": { "type": "array", "items": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } } }, "matchingCriteria": { "type": "array", "items": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } } }, "lookupKey": { "type": "string" }, "includesTax": { "type": "boolean" }, "labelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } } } } }, "defined": { "type": "boolean" }, "meteringBaseUrl": { "type": "string" } } }, "name": { "type": "string" }, "numberOfAllowedSubscriptions": { "type": "integer", "format": "int32", "description": "The number of allowed subscriptions allowed for the plan." }, "order": { "type": "integer", "format": "int32", "description": "The order of the plan in the list of plans for the product." }, "product": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "securityLevel": { "type": "string", "description": "The security level authorization type of the plan.", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "status": { "type": "string", "description": "The status of the plan", "enum": [ "INACTIVE", "ACTIVE", "ARCHIVED", "DEPRECATED", "DRAFT" ] }, "rateLimit": { "description": "Rate-limiting configuration for the plan. Used to define how many requests can be made to the APIs included in a given time period.", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] } } }, "planVersion": { "type": "string", "description": "The user defined version of the plan." }, "published": { "type": "string", "format": "date-time" }, "redirectUri": { "type": "string" } } } ] }, "examples": { "Example plan": { "description": "Plan object with all its details.", "value": { "id": "66f174095cc1da3963b9a1d7", "created": "2024-09-23T16:58:33.962", "updated": "2024-09-23T16:59:11.984", "name": "Example Plan", "order": 2, "status": "ACTIVE", "product": { "id": "66e803e91afc532cbde31cd1" }, "apis": [ { "type": "AMAZON", "name": "Jokes (Cognito) - prod", "url": "https://cl4z2nr4p8.execute-api.eu-central-1.amazonaws.com/prod", "integrationId": "cl4z2nr4p8", "serviceIntegrationId": "cl4z2nr4p8", "resources": [ { "path": "/programming", "method": "GET", "integrationId": "pb1jqo" } ], "stage": "prod", "environmentId": "w7rc9s", "compatibleWithGatewayAuthz": true } ], "gateway": { "id": "63527499bad1d32643c4f875" }, "integrationId": "inbwnw", "description": "Acquire test data, easily, fast, and safely!", "monetization": { "unitLabel": "call", "cycle": "MONTH", "revenueModel": "FLAT_FEE", "prices": [ { "amount": 10, "currency": "EUR", "integrationId": "price_1Q2CnF4C6YYiB1TPwz8oA5wZ", "active": true, "default": false, "tiers": [ { "min": 1, "max": 100, "perCall": 0, "flatFee": 2 }, { "min": 101, "max": -1, "perCall": 0, "flatFee": 1 } ], "lookupKey": "Example", "labelOverrides": { "leadingText": "", "mainText": "", "trailingText": "", "detailsTitle": "", "detailsText": "", "ctaOverrideText": "", "ctaOverrideUrl": "" } } ], "defined": false }, "rateLimit": { "type": "AMAZON", "quoteLimit": 2147483647, "quotePeriod": "MONTH", "throttleBurstLimit": 2147483647, "throttleRateLimit": 2147483647 }, "documentationLevel": "PLAN", "documentationPublic": true, "documentations": [ { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/icannotbelieveitisdocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" } ], "securityLevel": "INTERMEDIATE_CLIENT_CREDENTIAL", "enableUsageEvents": false, "propertiesTabName": "Properties", "customProperties": [], "version": 3 } } } } } }, "401": { "description": "Unauthorized: The user is not authorized to access this plan.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "Unauthorized": { "description": "Error message when the user is not authorized to access the plan.", "value": "Unauthorized" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/plans/{id}/docs/overview": { "get": { "tags": [ "Plans" ], "summary": "Get the plan documentation by the plan id", "description": "Retrieve the documentation associated with a specific plan by its ID. This endpoint returns the documentation versions that are linked to the plan, including their details.", "operationId": "findDocumentationByPlanId", "parameters": [ { "name": "id", "in": "path", "description": "The id of the plan to retrieve documentation for.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" }, "example": "6268ec80a098ed05f047f278" }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "OK: Successfully retrieved the documentation for the plan.", "content": { "application/json": { "schema": { "description": "Details of a plan including documentation.", "properties": { "id": { "type": "string" }, "documentationLevel": { "type": "string", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean" }, "planLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "apiLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } } } }, "examples": { "Example plan documentation": { "description": "List of documentation versions associated with the specified plan.", "value": { "id": "66f174095cc1da3963b9a1d7", "documentationLevel": "PLAN", "documentationPublic": true, "planLevelDocs": [ { "id": "66f172d43ee464553f9fe898", "order": 0, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/myfirstdocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "synced": "2024-09-23T13:58:22.665" }, { "id": "66f2a51f92b36f09825a4e30", "order": 1, "version": "1.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/myseconddocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json" } ], "apiLevelDocs": [ { "id": "66f3c2be7903d41208214a7d", "order": 0, "version": "2.0", "status": [], "active": true, "visible": true, "retrievalType": "GATEWAY", "url": "https://apiable.s3.eu-central-1.amazonaws.com/public/dev/mythirddocumentation.json", "name": "Jokes (Cognito) - prod-202481-v-1.0.json", "planId": "66f174095cc1da3963b9a1d7", "planDocLevel": "PLAN", "apiIntegrationId": "cl4z2nr4p8" } ] } } } } } }, "401": { "description": "Unauthorized for operation: findDocumentationByPlanId", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } }, "404": { "description": "Not Found: The requested plan does not exist.", "content": { "application/json": { "schema": { "type": "string" }, "examples": { "NotFound": { "description": "Error message when the plan with the given ID is not found.", "value": "Plan not found" } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform", "apiable/cicd" ] } ] } }, "/api/health": { "get": { "tags": [ "Serverinfo" ], "summary": "Get health of the server", "description": "This endpoint returns the health status of the server. If the server is running and healthy, it will return a status of OK.", "operationId": "health", "parameters": [ { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } } ], "responses": { "200": { "description": "Server is healthy", "content": { "application/json": { "schema": { "description": "Health of the server", "example": { "status": "OK" }, "properties": { "status": { "type": "string", "enum": [ "OK" ] } }, "title": "Health" } } } }, "401": { "description": "Unauthorized for operation: health", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/cicd", "apiable/platform" ] } ] } }, "/api/companies": { "get": { "tags": [ "Companies" ], "summary": "Get list of companies", "description": "Retrieves a paginated, sortable, and filterable list of all companies from the platform. Returns basic company information such as ID, name, and creation date. This operation supports pagination, sorting by various properties, and filtering using search parameters.", "operationId": "findAllCompanies", "parameters": [ { "name": "page", "in": "query", "description": "Zero-based page index for the findAllCompanies operation", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 0 }, { "name": "size", "in": "query", "description": "Number of companies per page in the findAllCompanies results", "required": false, "style": "form", "explode": true, "schema": { "type": "integer", "format": "int32" }, "example": 10 }, { "name": "sort", "in": "query", "description": "Sorting criteria for companies, in the format: property,asc|desc", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "created,desc" ] }, { "name": "search", "in": "query", "description": "Search filter for companies, in the format: property.op=value", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "example": [ "name.contains=example" ] }, { "name": "X-API-Version", "in": "header", "description": "API version to use.", "required": false, "style": "simple", "explode": false, "schema": { "type": "string", "enum": [ "2024-09-25" ] } }, { "name": "resolve", "in": "query", "required": false, "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "Successfully retrieved the list of companies that match the search and pagination criteria.", "content": { "application/json": { "schema": { "description": "Response object for paginated company results", "properties": { "content": { "type": "array", "items": { "description": "Company", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "domain": { "type": "string", "description": "The domain name of the company. e.g: \"example.com\"" }, "name": { "type": "string", "description": "The name of the company, defaults to the domain name of the company." } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "examples": { "Example response": { "description": "Example list of companies matching the request.", "value": { "content": [ { "id": "6697dd1e54d9ff2d372e135f", "created": "2024-07-17T17:02:54.005", "updated": "2024-07-17T17:02:54.005", "domain": "yahoo.com", "name": "Saruman Rings S.A.", "version": 0 }, { "id": "6697e00e54d9ff2d372e13d9", "created": "2024-07-17T17:15:26.776", "updated": "2024-07-17T17:15:26.776", "domain": "apiable.io", "name": "Gondor Rings Inc.", "version": 0 } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": false, "unsorted": false, "sorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalElements": 2, "totalPages": 1, "size": 10, "number": 0, "sort": { "empty": false, "unsorted": false, "sorted": true }, "first": true, "numberOfElements": 2, "empty": false } } } } } }, "401": { "description": "Unauthorized for operation: findAllCompanies", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "status": { "type": "string", "example": "401" } } } } } } }, "security": [ { "oauth-cc": [ "apiable/platform" ] } ] } } }, "components": { "schemas": { "WebhookConfUpdate": { "description": "Webhook Configuration update request", "properties": { "events": { "type": "array", "description": "The events to subscribe to", "items": { "type": "string", "description": "The events to subscribe to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The URL to send the webhook to" }, "whsec": { "type": "string", "description": "The webhook secret key" }, "authorization": { "type": "string", "description": "The authorization header" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers to send with the webhook" }, "description": "The headers to send with the webhook" } } }, "WebhookConf": { "description": "The webhook configuration", "properties": { "id": { "type": "string" }, "events": { "type": "array", "description": "The events the webhook is listening to", "items": { "type": "string", "description": "The events the webhook is listening to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The url of the webhook" }, "whsec": { "type": "string", "description": "The secret of the webhook" }, "authorization": { "type": "string", "description": "The authorization header of the webhook" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers of the webhook" }, "description": "The headers of the webhook" } } }, "TeamRole": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } }, "UserAccessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "IdentifiableObjectId": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "User": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } }, "UserMetadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "Team": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } }, "CustomProperty": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } }, "Auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "Subscription": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } }, "WebhookConfCreate": { "description": "Webhook Configuration create request", "properties": { "events": { "type": "array", "description": "The events to subscribe to", "items": { "type": "string", "description": "The events to subscribe to", "enum": [ "SUBSCRIPTION_CREATED", "SUBSCRIPTION_CANCELLED", "SUBSCRIPTION_AUTH_CHANGED", "SUBSCRIPTION_CHANGED", "INVOICE_ATTENTION_REQUIRED" ] } }, "url": { "type": "string", "description": "The URL to send the webhook to" }, "whsec": { "type": "string", "description": "The webhook secret key" }, "authorization": { "type": "string", "description": "The authorization header" }, "headers": { "type": "object", "additionalProperties": { "type": "string", "description": "The headers to send with the webhook" }, "description": "The headers to send with the webhook" } } }, "TeamCreate": { "properties": { "name": { "type": "string" }, "users": { "type": "array", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "domainJoinEnabled": { "type": "boolean" } } }, "SubscriptionCreate": { "properties": { "name": { "type": "string" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "Optional email of the subscription owner, used to link the subscrpition to a specific user before they register." }, "customProperties": { "type": "array", "description": "Custom properties with only id and value required", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "authIntegrationId": { "type": "string", "description": "Optional auth integration ID if importing an existing subscription" } } }, "MeterUsageRequest": { "properties": { "subscriptionId": { "type": "string" }, "integrationId": { "type": "string" }, "quantity": { "type": "integer", "format": "int32" }, "timestamp": { "type": "integer", "format": "int64", "description": "The timestamp for the usage event, in Unix seconds (UTC timezone). Defaults to current time if not provided." }, "lookupkey": { "type": "string" }, "action": { "type": "string" } } }, "SubscriptionUsageSummary": { "properties": { "subscriptionId": { "type": "string" }, "meterId": { "type": "string" }, "periodStartTime": { "type": "integer", "format": "int64" }, "periodEndTime": { "type": "integer", "format": "int64" }, "items": { "type": "array", "items": { "properties": { "aggregateSum": { "type": "integer", "format": "int32" }, "startTime": { "type": "integer", "format": "int64" }, "endTime": { "type": "integer", "format": "int64" } } } } } }, "SubscriptionUsageSummaryItem": { "properties": { "aggregateSum": { "type": "integer", "format": "int32" }, "startTime": { "type": "integer", "format": "int64" }, "endTime": { "type": "integer", "format": "int64" } } }, "DocumentationVersion": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } }, "SDK": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } }, "PlanDocDetails": { "description": "Details of a plan including documentation.", "properties": { "id": { "type": "string" }, "documentationLevel": { "type": "string", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean" }, "planLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "apiLevelDocs": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } } } }, "InvitationCreate": { "properties": { "invitee": { "type": "string" }, "origin": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "invitor": { "type": "string" }, "invitorEmail": { "type": "string" }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } }, "Invitation": { "description": "Invitation object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "expires": { "type": "string", "format": "date-time" }, "invitorEmail": { "type": "string", "description": "The email of the invitor" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "status": { "type": "string", "description": "The status of the invitation", "enum": [ "PENDING", "ACCEPTED", "ARCHIVED" ] }, "invitee": { "type": "string", "description": "The user that is invited" }, "invitor": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } }, "UserPatchObject": { "description": "Patch object for user", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for User", "enum": [ "/email", "/givenName", "/familyName" ] }, "value": { "type": "string" } } }, "TeamPatchObject": { "description": "Patch object for team", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Team", "enum": [ "/name", "/internal" ] }, "value": { "type": "string", "description": "Value to be patched, can be a boolean or a string depending on the path" } } }, "PatchObject": { "description": "Patch object for JSON Patch", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Path to the field to be patched" }, "value": { "type": "string", "description": "Value to be patched" } } }, "SubscriptionPatchObject": { "description": "Patch object for subscription", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Subscription", "enum": [ "/name", "/expires", "/stripeSubscriptionId", "/priceIds", "/usageMeter", "/owner", "/email" ] }, "value": { "type": "string" } } }, "InvitationPatchObject": { "description": "Patch object for invitation", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Invitation", "enum": [ "/expires", "/invitee", "/invitor", "/invitorEmail", "/accessDetails", "/team", "/status" ] }, "value": { "type": "string" } } }, "FullAPIDocsConfigurationObject": { "description": "Patch object for Full API Docs Configuration", "properties": { "op": { "type": "string", "description": "Supported patch operations", "enum": [ "replace" ] }, "path": { "type": "string", "description": "Supported patch paths for Full API Docs Configuration", "enum": [ "/url", "/public", "/name" ] }, "value": { "type": "string" } } }, "CustomDescription": { "description": "The custom description reference configuration", "properties": { "operationId": { "type": "string" }, "method": { "type": "string" }, "path": { "type": "string" }, "description": { "type": "string" } } }, "FullApiDocConf": { "description": "The full-api-doc configuration", "properties": { "url": { "type": "string" }, "public": { "type": "boolean" }, "name": { "type": "string" }, "published": { "type": "boolean" }, "cascade": { "type": "boolean" }, "customDescriptions": { "type": "array", "items": { "description": "The custom description reference configuration", "properties": { "operationId": { "type": "string" }, "method": { "type": "string" }, "path": { "type": "string" }, "description": { "type": "string" } } } }, "validationRulesetUrl": { "type": "string" }, "validationType": { "type": "string", "enum": [ "SPECTRAL" ] } } }, "Company": { "description": "Company", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "domain": { "type": "string", "description": "The domain name of the company. e.g: \"example.com\"" }, "name": { "type": "string", "description": "The name of the company, defaults to the domain name of the company." } } }, "PageUserResponse": { "description": "Response object for paginated user results", "properties": { "content": { "type": "array", "items": { "description": "User object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "providerId": { "type": "string", "description": "The provider id of the user" }, "metadata": { "description": "The metadata of the user", "properties": { "activeTeam": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "agreesToReceiveEmail": { "type": "boolean", "description": "Flag to indicate if the user has given consent to receive emails" }, "postRegistrationWizardComplete": { "type": "boolean", "description": "Flag to indicate if the user has completed the registration wizard" }, "approval": { "type": "string", "description": "Flag to indicate if the user has been approved, if approval process is in place", "enum": [ "PENDING", "ACTIVE", "REJECTED" ] }, "teams": { "type": "array", "description": "List of teams that the user is part of", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "stripeCustomerId": { "type": "string", "description": "The monetization integration ID of the user" }, "registrationEmailSent": { "type": "boolean", "description": "Flag to indicate if the user has been sent a registration email" }, "teamRoles": { "type": "array", "description": "List of roles that the user has in the teams that they are part of.", "items": { "description": "The role and permissions that a user has in a team", "properties": { "teamId": { "type": "string" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } } } } }, "registrationCustomProperties": { "type": "object", "additionalProperties": { "type": "string", "description": "Registration custom properties" }, "description": "Registration custom properties" }, "developer": { "type": "boolean" } } }, "givenName": { "type": "string", "description": "The first or given name of the user" }, "familyName": { "type": "string", "description": "The last or family name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "name": { "type": "string", "description": "The full name of the user, read only, constructed from the given and family name" }, "active": { "type": "boolean", "description": "Flag to indicate if the user is active" }, "company": { "type": "string", "description": "Name of the company the user is part of, by default it is the domain of the email" } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "PageableObject": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "SortObject": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "PageTeamResponse": { "description": "Response object for paginated team results", "properties": { "content": { "type": "array", "items": { "description": "Team", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the team" }, "users": { "type": "array", "description": "List of users in the team", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "internal": { "type": "boolean", "description": "The internal status of the team" }, "company": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "domains": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "allowDomainJoining": { "type": "boolean" } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "PageSubscriptionResponse": { "description": "Response object for paginated subscription results", "properties": { "content": { "type": "array", "items": { "description": "Subscription object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string", "description": "The name of the subscription" }, "status": { "type": "string", "description": "The status of the subscription", "enum": [ "PENDING_PAYMENT", "PAYMENT_FAILED", "PENDING", "ACTIVE", "REJECTED", "CANCELLED", "EXPIRED", "PENDING_CANCELLATION" ] }, "approvalEmailSent": { "type": "boolean", "description": "Flag to indicate if an email has been sent to the approval group for this subscription" }, "plan": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "expires": { "type": "string", "format": "date-time", "description": "The date the subscription will expire" }, "integrationId": { "type": "string", "description": "Integration ID of the subscription in the API Gateway" }, "auth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "lastAuth": { "description": "Authentication details for the subscription", "discriminator": { "propertyName": "type" }, "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "integrationId": { "type": "string" } } }, "cancelled": { "type": "string", "format": "date-time", "description": "The date the subscription was marked as cancelled" }, "checkoutSession": { "type": "string", "description": "Checkout session ID for the subscription, only used when the subscription is created through the checkout" }, "stripeSubscriptionId": { "type": "string", "description": "Integration ID of the subscription in the Monetization service provider" }, "priceIds": { "type": "array", "description": "The monetization service price IDs of the subscription", "items": { "type": "string", "description": "The monetization service price IDs of the subscription" } }, "usageMeter": { "type": "string", "description": "The monetization service usage meter ID of the subscription" }, "owner": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "email": { "type": "string", "description": "The email of the subscription owner" }, "customProperties": { "type": "array", "description": "The custom properties of the subscription", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "Conf": { "description": "Custom menu items for this product.", "properties": { "general": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "authorized": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "monetization": { "description": "The monetization configuration interface", "discriminator": { "propertyName": "type" }, "properties": { "invoiceAttentionRequiredNotificationEmails": { "type": "array", "items": { "type": "string" } }, "connected": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "type" ] } } }, "Image": { "description": "Image object containing URL, name, width, height and size", "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "width": { "type": "integer", "format": "int32" }, "height": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" } } }, "MarkdocPartialVariable": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } }, "MonetizationConf": { "description": "The monetization configuration interface", "discriminator": { "propertyName": "type" }, "properties": { "invoiceAttentionRequiredNotificationEmails": { "type": "array", "items": { "type": "string" } }, "connected": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "type" ] }, "PageProductResponse": { "description": "Response object for paginated product results", "properties": { "content": { "type": "array", "items": { "description": "Product", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string" }, "title": { "type": "string" }, "visibility": { "type": "string", "enum": [ "OPEN", "HIDDEN" ] }, "audience": { "type": "string", "enum": [ "PUBLIC", "MANUAL", "INTERNAL" ] }, "slug": { "type": "string", "description": "The url slug of the product" }, "active": { "type": "boolean" }, "marketings": { "type": "array", "description": "List of marketing feature references for this product.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "testimonials": { "type": "array", "description": "List of testimonials for this product.", "items": { "description": "A testimonial for a product", "properties": { "author": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" }, "avatar": { "type": "string" } } } }, "description": { "type": "string" }, "image": { "description": "Image object containing URL, name, width, height and size", "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "width": { "type": "integer", "format": "int32" }, "height": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" } } }, "menuItems": { "description": "Custom menu items for this product.", "properties": { "general": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "authorized": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "monetization": { "description": "The monetization configuration interface", "discriminator": { "propertyName": "type" }, "properties": { "invoiceAttentionRequiredNotificationEmails": { "type": "array", "items": { "type": "string" } }, "connected": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "type" ] } } }, "groupRefs": { "type": "array", "items": { "type": "string", "description": "Reference to an enterprise group that this product is associated with." } }, "productCategories": { "type": "array", "description": "List of product categories that this product has been associated with.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "icon": { "description": "The icon of the product", "properties": { "type": { "type": "string", "enum": [ "CUSTOM", "SYSTEM" ] }, "value": { "type": "string" } } }, "cardDisplay": { "type": "string", "enum": [ "ICON", "IMAGE" ] }, "markdocObjects": { "type": "array", "items": { "description": "A product markdoc object", "properties": { "name": { "type": "string" }, "status": { "type": "string" }, "description": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "partials": { "type": "array", "items": { "description": "A product markdoc partial", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "description": { "type": "string" } } } } } } }, "enableChangingPlans": { "type": "boolean", "description": "Flag to indicate if the product allows changing plans." } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "Product": { "description": "Product", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "name": { "type": "string" }, "title": { "type": "string" }, "visibility": { "type": "string", "enum": [ "OPEN", "HIDDEN" ] }, "audience": { "type": "string", "enum": [ "PUBLIC", "MANUAL", "INTERNAL" ] }, "slug": { "type": "string", "description": "The url slug of the product" }, "active": { "type": "boolean" }, "marketings": { "type": "array", "description": "List of marketing feature references for this product.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "testimonials": { "type": "array", "description": "List of testimonials for this product.", "items": { "description": "A testimonial for a product", "properties": { "author": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" }, "avatar": { "type": "string" } } } }, "description": { "type": "string" }, "image": { "description": "Image object containing URL, name, width, height and size", "properties": { "url": { "type": "string" }, "name": { "type": "string" }, "width": { "type": "integer", "format": "int32" }, "height": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" } } }, "menuItems": { "description": "Custom menu items for this product.", "properties": { "general": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "authorized": { "type": "object", "additionalProperties": { "type": "object" }, "properties": { "empty": { "type": "boolean" } } }, "monetization": { "description": "The monetization configuration interface", "discriminator": { "propertyName": "type" }, "properties": { "invoiceAttentionRequiredNotificationEmails": { "type": "array", "items": { "type": "string" } }, "connected": { "type": "boolean" }, "type": { "type": "string" } }, "required": [ "type" ] } } }, "groupRefs": { "type": "array", "items": { "type": "string", "description": "Reference to an enterprise group that this product is associated with." } }, "productCategories": { "type": "array", "description": "List of product categories that this product has been associated with.", "items": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } }, "icon": { "description": "The icon of the product", "properties": { "type": { "type": "string", "enum": [ "CUSTOM", "SYSTEM" ] }, "value": { "type": "string" } } }, "cardDisplay": { "type": "string", "enum": [ "ICON", "IMAGE" ] }, "markdocObjects": { "type": "array", "items": { "description": "A product markdoc object", "properties": { "name": { "type": "string" }, "status": { "type": "string" }, "description": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "partials": { "type": "array", "items": { "description": "A product markdoc partial", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "description": { "type": "string" } } } } } } }, "enableChangingPlans": { "type": "boolean", "description": "Flag to indicate if the product allows changing plans." } } }, "ProductIcon": { "description": "The icon of the product", "properties": { "type": { "type": "string", "enum": [ "CUSTOM", "SYSTEM" ] }, "value": { "type": "string" } } }, "ProductMarkdocObject": { "description": "A product markdoc object", "properties": { "name": { "type": "string" }, "status": { "type": "string" }, "description": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "partials": { "type": "array", "items": { "description": "A product markdoc partial", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "description": { "type": "string" } } } } } }, "ProductMarkdocPartial": { "description": "A product markdoc partial", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "variables": { "type": "array", "items": { "description": "The markdoc partial variable", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "value": { "type": "object" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } }, "description": { "type": "string" } } }, "Testimonial": { "description": "A testimonial for a product", "properties": { "author": { "type": "string" }, "title": { "type": "string" }, "content": { "type": "string" }, "avatar": { "type": "string" } } }, "Api": { "description": "API item", "discriminator": { "propertyName": "type" }, "properties": { "name": { "type": "string" }, "resources": { "type": "array", "items": { "description": "The Resource schema is used to represent a resource in the API gateway. It includes details such as the path, method, and the integration ID.", "properties": { "path": { "type": "string" }, "method": { "type": "string" }, "integrationId": { "type": "string" } } } }, "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] }, "url": { "type": "string" }, "integrationId": { "type": "string" }, "documentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "serviceIntegrationId": { "type": "string" } } }, "Criteria": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } }, "FeatureExpanded": { "description": "Reference to a feature identifier with value for this plan.", "properties": { "ref": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "value": { "type": "string" } } }, "LabelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } }, "MatchingCriteria": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } }, "Monetization": { "description": "Monetization configuration for the plan. Used to define how the plan is billed.", "properties": { "billProcessing": { "type": "string", "enum": [ "API_CALL", "TOKEN", "APIABLE_CREDIT", "CUSTOM" ] }, "unitLabel": { "type": "string" }, "cycle": { "type": "string", "enum": [ "MONTH", "YEAR", "MONTHLY", "YEARLY", "NONE" ] }, "revenueModel": { "type": "string", "enum": [ "ONETIME", "RECURRING", "FLAT_FEE", "GRADUATED", "VOLUME", "FREE", "CONTRACT", "FLAT_FEE_OVERAGE", "PREPAID_BURN_DOWN" ] }, "prices": { "type": "array", "items": { "description": "The price for a plan in the monetization service.", "properties": { "amount": { "type": "number", "format": "double" }, "currency": { "type": "string" }, "integrationId": { "type": "string" }, "overageIntegrationId": { "type": "string" }, "meterId": { "type": "string" }, "active": { "type": "boolean" }, "default": { "type": "boolean" }, "tiers": { "type": "array", "items": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } } }, "matchingCriteria": { "type": "array", "items": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } } }, "lookupKey": { "type": "string" }, "includesTax": { "type": "boolean" }, "labelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } } } } }, "defined": { "type": "boolean" }, "meteringBaseUrl": { "type": "string" } } }, "MonetizationVolumeTier": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } }, "PagePlanResponse": { "description": "Response object for paginated plan results", "properties": { "content": { "type": "array", "items": { "description": "Plan object. A plan is a set of APIs and properties that can be subscribed to by users.", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "ancestorPlanId": { "type": "string" }, "approvalGroupIdRef": { "type": "string", "description": "The approval group ID reference for the plan." }, "apis": { "type": "array", "description": "List of APIs included in the plan.", "items": { "description": "API item", "discriminator": { "propertyName": "type" }, "properties": { "name": { "type": "string" }, "resources": { "type": "array", "items": { "description": "The Resource schema is used to represent a resource in the API gateway. It includes details such as the path, method, and the integration ID.", "properties": { "path": { "type": "string" }, "method": { "type": "string" }, "integrationId": { "type": "string" } } } }, "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] }, "url": { "type": "string" }, "integrationId": { "type": "string" }, "documentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "serviceIntegrationId": { "type": "string" } } } }, "propertiesDescription": { "type": "string", "description": "The description of the properties of the plan." }, "propertiesTabName": { "type": "string", "description": "The name of the tab to display the properties of the plan." }, "customProperties": { "type": "array", "description": "List of available custom properties of the plan.", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "description": { "type": "string", "description": "A brief, optional description of the plan to present to end user to help them select the correct plan." }, "documentationLevel": { "type": "string", "description": "The documentation level of the plan. Used to decide what level of documentation should be displayed on the portal.", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean", "description": "Whether the documentation is public or not." }, "documentations": { "type": "array", "description": "List of documentation versions for the plan.", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "customDocumentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "deprecation": { "type": "string", "format": "date-time" }, "duration": { "type": "integer", "format": "int32", "description": "The duration of the plan in days." }, "enableUsageEvents": { "type": "boolean", "description": "Flag to enable usage events for the plan." }, "features": { "type": "array", "description": "List of feature references for the plan.", "items": { "description": "Reference to a feature identifier with value for this plan.", "properties": { "ref": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "value": { "type": "string" } } } }, "gateway": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "integrationId": { "type": "string", "description": "Integration ID of the plan in the gateway. Used to identify the plan in the gateway. For example, with Amazon API Gateway, this would be the Usage Plan ID." }, "monetization": { "description": "Monetization configuration for the plan. Used to define how the plan is billed.", "properties": { "billProcessing": { "type": "string", "enum": [ "API_CALL", "TOKEN", "APIABLE_CREDIT", "CUSTOM" ] }, "unitLabel": { "type": "string" }, "cycle": { "type": "string", "enum": [ "MONTH", "YEAR", "MONTHLY", "YEARLY", "NONE" ] }, "revenueModel": { "type": "string", "enum": [ "ONETIME", "RECURRING", "FLAT_FEE", "GRADUATED", "VOLUME", "FREE", "CONTRACT", "FLAT_FEE_OVERAGE", "PREPAID_BURN_DOWN" ] }, "prices": { "type": "array", "items": { "description": "The price for a plan in the monetization service.", "properties": { "amount": { "type": "number", "format": "double" }, "currency": { "type": "string" }, "integrationId": { "type": "string" }, "overageIntegrationId": { "type": "string" }, "meterId": { "type": "string" }, "active": { "type": "boolean" }, "default": { "type": "boolean" }, "tiers": { "type": "array", "items": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } } }, "matchingCriteria": { "type": "array", "items": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } } }, "lookupKey": { "type": "string" }, "includesTax": { "type": "boolean" }, "labelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } } } } }, "defined": { "type": "boolean" }, "meteringBaseUrl": { "type": "string" } } }, "name": { "type": "string" }, "numberOfAllowedSubscriptions": { "type": "integer", "format": "int32", "description": "The number of allowed subscriptions allowed for the plan." }, "order": { "type": "integer", "format": "int32", "description": "The order of the plan in the list of plans for the product." }, "product": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "securityLevel": { "type": "string", "description": "The security level authorization type of the plan.", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "status": { "type": "string", "description": "The status of the plan", "enum": [ "INACTIVE", "ACTIVE", "ARCHIVED", "DEPRECATED", "DRAFT" ] }, "rateLimit": { "description": "Rate-limiting configuration for the plan. Used to define how many requests can be made to the APIs included in a given time period.", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] } } }, "planVersion": { "type": "string", "description": "The user defined version of the plan." }, "published": { "type": "string", "format": "date-time" }, "redirectUri": { "type": "string" } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "Plan": { "description": "Plan object. A plan is a set of APIs and properties that can be subscribed to by users.", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "ancestorPlanId": { "type": "string" }, "approvalGroupIdRef": { "type": "string", "description": "The approval group ID reference for the plan." }, "apis": { "type": "array", "description": "List of APIs included in the plan.", "items": { "description": "API item", "discriminator": { "propertyName": "type" }, "properties": { "name": { "type": "string" }, "resources": { "type": "array", "items": { "description": "The Resource schema is used to represent a resource in the API gateway. It includes details such as the path, method, and the integration ID.", "properties": { "path": { "type": "string" }, "method": { "type": "string" }, "integrationId": { "type": "string" } } } }, "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] }, "url": { "type": "string" }, "integrationId": { "type": "string" }, "documentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "serviceIntegrationId": { "type": "string" } } } }, "propertiesDescription": { "type": "string", "description": "The description of the properties of the plan." }, "propertiesTabName": { "type": "string", "description": "The name of the tab to display the properties of the plan." }, "customProperties": { "type": "array", "description": "List of available custom properties of the plan.", "items": { "description": "Custom Property", "discriminator": { "propertyName": "type" }, "properties": { "readOnly": { "type": "boolean", "description": "Whether the custom property is read only" }, "id": { "type": "string" }, "type": { "type": "string", "description": "The type of the custom property", "enum": [ "STRING", "NUMBER", "BOOLEAN", "TEXT", "OPTIONS", "MULTI_OPTIONS" ] }, "description": { "type": "string", "description": "The description of the custom property" }, "includeInSubscriptionWizard": { "type": "boolean", "description": "Whether the custom property is included in the subscription wizard" }, "required": { "type": "boolean", "description": "Whether the custom property is required" }, "display": { "type": "string", "description": "The display name of the custom property" } } } }, "description": { "type": "string", "description": "A brief, optional description of the plan to present to end user to help them select the correct plan." }, "documentationLevel": { "type": "string", "description": "The documentation level of the plan. Used to decide what level of documentation should be displayed on the portal.", "enum": [ "PLAN", "API", "CUSTOM" ] }, "documentationPublic": { "type": "boolean", "description": "Whether the documentation is public or not." }, "documentations": { "type": "array", "description": "List of documentation versions for the plan.", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "customDocumentations": { "type": "array", "items": { "description": "The documentation version for a plan.", "properties": { "id": { "type": "string" }, "order": { "type": "integer", "format": "int32", "description": "The order of the documentation in the list of documentation for the plan." }, "version": { "type": "string", "description": "The version of the documentation." }, "status": { "type": "array", "description": "The status of the documentation.", "items": { "type": "string", "description": "The status of the documentation." } }, "active": { "type": "boolean", "description": "Flag to indicate if the documentation is active." }, "visible": { "type": "boolean", "description": "The visibility of the documentation." }, "retrievalType": { "type": "string", "description": "The retrieval type of the documentation.", "enum": [ "MANUAL", "GATEWAY", "CICD", "CATALOG" ] }, "url": { "type": "string", "description": "The URL of the documentation." }, "name": { "type": "string", "description": "The name of the documentation." }, "synced": { "type": "string", "format": "date-time", "description": "Timestamp of the last time the documentation was synchronized." }, "sdks": { "type": "array", "description": "List of SDKs associated with this documentation version.", "items": { "description": "SDK information for a documentation version.", "properties": { "language": { "type": "string", "description": "The programming language of the SDK." }, "downloadUrl": { "type": "string", "description": "The download URL of the SDK." }, "visibility": { "type": "string", "description": "The visibility of the SDK (PUBLIC, PRIVATE, SUBSCRIBERS).", "enum": [ "PUBLIC", "PRIVATE", "SUBSCRIBERS" ] } } } }, "catalogApi": { "type": "string" }, "planId": { "type": "string", "readOnly": true }, "planDocLevel": { "type": "string", "description": "Documentation level of the documentation.", "enum": [ "PLAN", "API", "CUSTOM" ], "readOnly": true }, "apiIntegrationId": { "type": "string", "description": "Reference to the API if the documentation is bound to an API object.", "readOnly": true }, "custom": { "type": "boolean" } } } }, "deprecation": { "type": "string", "format": "date-time" }, "duration": { "type": "integer", "format": "int32", "description": "The duration of the plan in days." }, "enableUsageEvents": { "type": "boolean", "description": "Flag to enable usage events for the plan." }, "features": { "type": "array", "description": "List of feature references for the plan.", "items": { "description": "Reference to a feature identifier with value for this plan.", "properties": { "ref": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "value": { "type": "string" } } } }, "gateway": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "integrationId": { "type": "string", "description": "Integration ID of the plan in the gateway. Used to identify the plan in the gateway. For example, with Amazon API Gateway, this would be the Usage Plan ID." }, "monetization": { "description": "Monetization configuration for the plan. Used to define how the plan is billed.", "properties": { "billProcessing": { "type": "string", "enum": [ "API_CALL", "TOKEN", "APIABLE_CREDIT", "CUSTOM" ] }, "unitLabel": { "type": "string" }, "cycle": { "type": "string", "enum": [ "MONTH", "YEAR", "MONTHLY", "YEARLY", "NONE" ] }, "revenueModel": { "type": "string", "enum": [ "ONETIME", "RECURRING", "FLAT_FEE", "GRADUATED", "VOLUME", "FREE", "CONTRACT", "FLAT_FEE_OVERAGE", "PREPAID_BURN_DOWN" ] }, "prices": { "type": "array", "items": { "description": "The price for a plan in the monetization service.", "properties": { "amount": { "type": "number", "format": "double" }, "currency": { "type": "string" }, "integrationId": { "type": "string" }, "overageIntegrationId": { "type": "string" }, "meterId": { "type": "string" }, "active": { "type": "boolean" }, "default": { "type": "boolean" }, "tiers": { "type": "array", "items": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } } }, "matchingCriteria": { "type": "array", "items": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } } }, "lookupKey": { "type": "string" }, "includesTax": { "type": "boolean" }, "labelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } } } } }, "defined": { "type": "boolean" }, "meteringBaseUrl": { "type": "string" } } }, "name": { "type": "string" }, "numberOfAllowedSubscriptions": { "type": "integer", "format": "int32", "description": "The number of allowed subscriptions allowed for the plan." }, "order": { "type": "integer", "format": "int32", "description": "The order of the plan in the list of plans for the product." }, "product": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "securityLevel": { "type": "string", "description": "The security level authorization type of the plan.", "enum": [ "BASIC_API_KEY", "INTERMEDIATE_JWT", "INTERMEDIATE_CLIENT_CREDENTIAL", "ADVANCED_CODE_FLOW", "EVOLVED_CENTRALIZED_CLAIMS" ] }, "status": { "type": "string", "description": "The status of the plan", "enum": [ "INACTIVE", "ACTIVE", "ARCHIVED", "DEPRECATED", "DRAFT" ] }, "rateLimit": { "description": "Rate-limiting configuration for the plan. Used to define how many requests can be made to the APIs included in a given time period.", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] } } }, "planVersion": { "type": "string", "description": "The user defined version of the plan." }, "published": { "type": "string", "format": "date-time" }, "redirectUri": { "type": "string" } } }, "PlanPrice": { "description": "The price for a plan in the monetization service.", "properties": { "amount": { "type": "number", "format": "double" }, "currency": { "type": "string" }, "integrationId": { "type": "string" }, "overageIntegrationId": { "type": "string" }, "meterId": { "type": "string" }, "active": { "type": "boolean" }, "default": { "type": "boolean" }, "tiers": { "type": "array", "items": { "description": "The MonetizationVolumeTier schema is used to represent a volume tier in monetization plans.", "properties": { "min": { "type": "number", "format": "double" }, "max": { "type": "number", "format": "double" }, "perCall": { "type": "number", "format": "double" }, "flatFee": { "type": "number", "format": "double" } } } }, "matchingCriteria": { "type": "array", "items": { "description": "The criteria that should be matched", "properties": { "api": { "type": "string" }, "criteria": { "type": "array", "items": { "description": "The criteria object", "discriminator": { "propertyName": "key" }, "properties": { "key": { "type": "string" }, "id": { "type": "string" } } } } } } }, "lookupKey": { "type": "string" }, "includesTax": { "type": "boolean" }, "labelOverrides": { "description": "The label overrides object.", "properties": { "leadingText": { "type": "string" }, "mainText": { "type": "string" }, "trailingText": { "type": "string" }, "detailsTitle": { "type": "string" }, "detailsText": { "type": "string" }, "ctaOverrideText": { "type": "string" }, "ctaOverrideUrl": { "type": "string" } } } } }, "RateLimit": { "description": "Rate-limiting configuration for the plan. Used to define how many requests can be made to the APIs included in a given time period.", "discriminator": { "propertyName": "type" }, "properties": { "type": { "type": "string", "enum": [ "KONG", "AMAZON", "AMAZONEE", "AZURE", "APIGEE" ] } } }, "Resource": { "description": "The Resource schema is used to represent a resource in the API gateway. It includes details such as the path, method, and the integration ID.", "properties": { "path": { "type": "string" }, "method": { "type": "string" }, "integrationId": { "type": "string" } } }, "PageInvitationResponse": { "description": "Response object for paginated invitation results", "properties": { "content": { "type": "array", "items": { "description": "Invitation object", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "expires": { "type": "string", "format": "date-time" }, "invitorEmail": { "type": "string", "description": "The email of the invitor" }, "accessDetails": { "description": "Access details and role that the invited user will have", "properties": { "roleName": { "type": "string", "enum": [ "ADMIN", "READ_ONLY", "RESTRICTED" ] }, "apiKeys": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "billing": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] }, "teams": { "type": "string", "enum": [ "NONE", "READ", "FULL" ] } } }, "team": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } }, "status": { "type": "string", "description": "The status of the invitation", "enum": [ "PENDING", "ACCEPTED", "ARCHIVED" ] }, "invitee": { "type": "string", "description": "The user that is invited" }, "invitor": { "description": "Unique identifier to an object", "properties": { "id": { "type": "string" } } } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "Health": { "description": "Health of the server", "example": { "status": "OK" }, "properties": { "status": { "type": "string", "enum": [ "OK" ] } }, "title": "Health" }, "PageCompanyResponse": { "description": "Response object for paginated company results", "properties": { "content": { "type": "array", "items": { "description": "Company", "properties": { "version": { "type": "integer", "format": "int32" }, "created": { "type": "string", "format": "date-time" }, "updated": { "type": "string", "format": "date-time" }, "id": { "type": "string" }, "domain": { "type": "string", "description": "The domain name of the company. e.g: \"example.com\"" }, "name": { "type": "string", "description": "The name of the company, defaults to the domain name of the company." } } } }, "pageable": { "description": "The PageableObject schema is used to represent pagination information for API responses. It includes details such as the current page number, size of the page, total number of pages, and total number of items available.", "properties": { "offset": { "type": "integer", "format": "int64" }, "pageNumber": { "type": "integer", "format": "int32" }, "pageSize": { "type": "integer", "format": "int32" }, "paged": { "type": "boolean" }, "unpaged": { "type": "boolean" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } } } }, "last": { "type": "boolean" }, "totalElements": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int32" }, "number": { "type": "integer", "format": "int32" }, "sort": { "description": "The SortObject schema is used to represent sorting information for API responses.", "properties": { "empty": { "type": "boolean" }, "sorted": { "type": "boolean" }, "unsorted": { "type": "boolean" } } }, "first": { "type": "boolean" }, "numberOfElements": { "type": "integer", "format": "int32" }, "empty": { "type": "boolean" } } }, "CancelAndRevokeSubscriptionRequestBody": { "properties": { "cancelAt": { "type": "integer", "format": "int64", "description": "The timestamp when the subscription should be cancelled, in Unix seconds (UTC timezone)" } } } }, "securitySchemes": { "oauth-cc": { "type": "oauth2", "description": "OAuth 2.0: Client Credentials", "flows": { "clientCredentials": { "tokenUrl": "https://developer.apiable.io/api/oauth2/token", "scopes": {} } }, "x-receive-token-in": "request-body", "x-client-id": "", "x-client-secret": "" } } } }