Commet
  • Precios
Iniciar SesiónRegistrarse
Activate add-on POSTCreate add-on POSTDeactivate add-on DELETEDelete add-on DELETEGet add-on GETList active add-ons GETList add-ons GETUpdate add-on PUT
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Create add-on

Create a new add-on linked to a feature. Each feature can only be assigned to one add-on.

POST
/addons

Create a new add-on linked to a feature. Each feature can only be assigned to one add-on.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
description?string
basePrice*integer
featureId*string
consumptionModel*string
includedUnits?integer
overageRate?integer
creditCost?integer

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/addons" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "basePrice": 0,    "featureId": "string",    "consumptionModel": "boolean"  }'
{  "success": true,  "data": {    "id": "string",    "name": "string",    "slug": "string",    "description": "string",    "basePrice": -9007199254740991,    "consumptionModel": "boolean",    "featureCode": "string",    "featureName": "string",    "includedUnits": -9007199254740991,    "overageRate": -9007199254740991,    "creditCost": -9007199254740991,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "object": "addon",    "livemode": true  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "success": false,  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Activate add-on POST

Activate an add-on on a subscription. Charges a prorated amount for the current billing period.

Deactivate add-on DELETE

Deactivate an add-on from a subscription.