POST
/
companies
/
{company_id}
/
pricing
Create Product Pricing
curl --request POST \
  --url https://api.maplebilling.com/api/v1/companies/{company_id}/pricing \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "base_price": {
    "currency": "<string>",
    "value_in_cents": 123
  },
  "base_units": 1,
  "billing_frequency": {
    "count": 2,
    "frequency": "HOUR"
  },
  "carryover": true,
  "charge_type": "PRE_POST",
  "credit_price": {
    "amount": {
      "currency": "<string>",
      "value_in_cents": 123
    },
    "item_id": "<string>",
    "type": "AMOUNT",
    "units": 2
  },
  "currency": "<string>",
  "description": "<string>",
  "display_type": "<string>",
  "entitlements": [
    {
      "entitlement_id": "<string>",
      "value": "<any>"
    }
  ],
  "external_name": "<string>",
  "fixed_price": {
    "price_per_unit": "<string>"
  },
  "gradient_price": [
    {
      "end": 1,
      "flat_price": "<string>",
      "is_custom_tier": true,
      "price_per_unit": "<string>",
      "start": 1
    }
  ],
  "item_id": "<string>",
  "metadata": {},
  "metric_id": "<string>",
  "minimum_spend": {
    "currency": "<string>",
    "value_in_cents": 123
  },
  "minimum_spend_schedule": {
    "allow_pulling_forward": true,
    "amount_per_period": [
      "<string>"
    ],
    "minimum_spend_schedule_type": "<string>"
  },
  "name": "<string>",
  "pricing_type": "FIXED",
  "product_id": "<string>",
  "proration_type": "NONE",
  "recognition_schedule": {
    "amount_per_period": [
      "<string>"
    ],
    "recognition_schedule_type": "<string>"
  },
  "scheduled_price": {
    "price_per_unit_per_period": [
      "<string>"
    ]
  },
  "step_price": {
    "price_per_step": "<string>",
    "step_size": 1
  },
  "tags": [
    "<string>"
  ],
  "true_up_frequency": "<string>",
  "type": "<string>",
  "volume_price": [
    {
      "flat_price": "<string>",
      "is_custom_tier": true,
      "price_per_unit": "<string>",
      "total_units_end": 1,
      "total_units_start": 1
    }
  ]
}'
{
  "company_id": "<string>",
  "computed_entitlements": [
    {
      "entitlement_id": "<string>",
      "inherited_from_id": "<string>",
      "inherited_from_type": "<string>",
      "key": "<string>",
      "name": "<string>",
      "original_value": "<any>",
      "overridden": true,
      "type": "<string>",
      "value": "<any>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "description": "<string>",
  "external_name": "<string>",
  "id": "<string>",
  "metadata": {},
  "name": "<string>",
  "num_subs": 1,
  "override_entitlements": [
    {
      "entitlement_id": "<string>",
      "inherited_from_id": "<string>",
      "inherited_from_type": "<string>",
      "key": "<string>",
      "name": "<string>",
      "original_value": "<any>",
      "overridden": true,
      "type": "<string>",
      "value": "<any>"
    }
  ],
  "product_id": "<string>",
  "state": "<string>",
  "tags": [
    "<string>"
  ],
  "type": "<string>",
  "updated_at": "2023-11-07T05:31:56Z"
}
This API is in Alpha and is subject to change!

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

The idempotency key that will be used to ensure the request is only performed once

Path Parameters

company_id
string
required

Company ID. It should have a prefix 'cmp_'.

Body

application/json

Response

200 - application/json

OK

The response is of type object.