Skip to main content
PATCH
/
billing
/
org
/
v1
/
subscriptions
/
{id}
Partially update a Subscription
curl --request PATCH \
  --url https://api.gcore.com/billing/org/v1/subscriptions/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "calc_rule_type": "commit",
  "price": {
    "unit": 123,
    "default_value": "<string>",
    "type": "FlatPrice",
    "money_value": "<string>",
    "steps": [
      {
        "threshold": "<string>",
        "money_value": "<string>"
      }
    ]
  },
  "active_from": "2023-11-07T05:31:56Z",
  "active_to": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "comment": "<string>"
}'
{
  "id": 123,
  "client_id": 123,
  "client": {
    "id": 2,
    "company_name": "<string>"
  },
  "feature": {
    "id": 123,
    "name": "<string>",
    "erp_sku_id": "<string>"
  },
  "metric_ext_name": "<string>",
  "calc_rule_type": "<string>",
  "active_range": {
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z"
  },
  "price": "<string>",
  "product": {
    "id": 123,
    "name": "<string>",
    "internal_name": "<string>"
  },
  "product_category": {
    "id": 123,
    "name": "<string>"
  },
  "regions": [
    {
      "id": 123,
      "name": "<string>",
      "external_name": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "comment": "<string>"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

id
integer
required

Body

Partial update support for model serializers. It enriches the serializer data with the instance data if it exists.

calc_rule_type
enum<string>

Calculation rule type for the subscription. Can be one of: commit, overcommit.

* commit - commit * overcommit - overcommit * stepped - stepped * staged - staged * unit - unit * post_invoice - post_invoice

Available options:
commit,
overcommit,
stepped,
staged,
unit,
post_invoice
price
object

Price details for the subscription.

active_from
string<date-time>

Subscription start date in YYYY-MM-DD format.

active_to
string<date-time> | null

Subscription end date in YYYY-MM-DD format. Can be null for indefinite subscriptions.

description
string
Required string length: 1 - 255
comment
string
Required string length: 1 - 255

Response

id
integer
required
client_id
integer
required

The ID of the client

client
object
required

The client associated with the subscription.

feature
object
required

The feature associated with the subscription.

metric_ext_name
string
required

Metric code of the feature associated with the subscription.

calc_rule_type
string
required

The calculation rule type for the subscription.

active_range
object
required

The time range during which the subscription is active. Date-time range with start and end fields.

price
string
required

The price details associated with the subscription.

product
object
required

The product associated with the feature of the subscription.

product_category
object
required

The product category associated with the feature of the subscription.

regions
object[]
required

List of statistic regions associated with the feature of the subscription.

created_at
string<date-time>
required

The date and time when the subscription was created.

description
string | null
required

Description for internal use

comment
string | null
required

Public comment