Organization API: Catalog & Services: Pricing
The 3 Organization API operations for pricing.
Part of Catalog & Services.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/products/{product_id}/pricing |
A product's plans, in their order |
| POST | /api/v1/orgs/{org_slug}/products/{product_id}/pricing |
Add a plan |
| PATCH | /api/v1/orgs/{org_slug}/products/{product_id}/pricing/{pricing_id} |
Change a plan: only the fields sent (null leaves one as it is) |
A product's plans, in their order
Section titled A product's plans, in their orderGET /api/v1/orgs/{org_slug}/products/{product_id}/pricing
A product's plans, in their order. 404 for another organization's product.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
product_id |
path | integer | yes | |
org_slug |
path | string | yes | |
active_only |
query | boolean | no | The plans on sale. false adds the retired ones (is_active: false), which keep their services. Default: True. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
A 200 response is a list; each item has these fields:
| Field | Type |
|---|---|
[].id |
integer |
[].org_product_id |
integer |
[].name |
string |
[].billing_cycle |
string |
[].price |
string |
[].setup_fee |
string |
[].currency |
string |
[].is_active |
boolean |
[].sort_order |
integer |
[].created_at |
string (date-time) or null |
[].wholesale_price |
number or null |
[].wholesale_setup_fee |
number or null |
[].below_wholesale |
boolean |
[].below_floor |
boolean |
[].floor_price |
number or null |
[].wholesale |
object or null |
Add a plan
Section titled Add a planPOST /api/v1/orgs/{org_slug}/products/{product_id}/pricing
Add a plan. A platform-linked plan's price and setup fee may not go below
its wholesale price: 422 below_wholesale names it. A Cloud Compute or
Container Apps plan's price may not go below its always-on figure, what its
memory and storage cost when a server runs all month: 422 below_floor
names it as floor_price and always_on.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
product_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
name |
string | yes |
billing_cycle |
string | yes |
price |
number or string | yes |
setup_fee |
number or string | no |
currency |
string | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 201 response:
| Field | Type |
|---|---|
id |
integer |
org_product_id |
integer |
name |
string |
billing_cycle |
string |
price |
string |
setup_fee |
string |
currency |
string |
is_active |
boolean |
sort_order |
integer |
created_at |
string (date-time) or null |
wholesale_price |
number or null |
wholesale_setup_fee |
number or null |
below_wholesale |
boolean |
below_floor |
boolean |
floor_price |
number or null |
wholesale |
object or null |
Change a plan: only the fields sent (null leaves one as it is)
Section titled Change a plan: only the fields sent (null leaves one as it is)PATCH /api/v1/orgs/{org_slug}/products/{product_id}/pricing/{pricing_id}
Change a plan: only the fields sent (null leaves one as it is).
A platform-linked plan may not go below its wholesale price: 422
below_wholesale names it. A Cloud Compute or Container Apps plan may
not go below its always-on figure either: 422 below_floor. A plan already
below the floor, because the wholesale price rose, can still be renamed or
taken off sale; its price and setup fee must clear the floor when they
change, and both must when
the plan moves to another cycle or currency or goes back on sale.
Services already on the plan keep what they pay. 404 for a plan of
another product or organization.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
product_id |
path | integer | yes |
pricing_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
name |
string or null | no |
billing_cycle |
string or null | no |
price |
number or string or null | no |
setup_fee |
number or string or null | no |
currency |
string or null | no |
is_active |
boolean or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
org_product_id |
integer |
name |
string |
billing_cycle |
string |
price |
string |
setup_fee |
string |
currency |
string |
is_active |
boolean |
sort_order |
integer |
created_at |
string (date-time) or null |
wholesale_price |
number or null |
wholesale_setup_fee |
number or null |
below_wholesale |
boolean |
below_floor |
boolean |
floor_price |
number or null |
wholesale |
object or null |