# Organization API: Catalog & Services: Pricing

> The 3 Organization API operations for pricing.

Source: https://www.coritan.com/docs/api/reference/organizations/catalog-services/products-pricing/

Part of [Catalog & Services](/docs/api/reference/organizations/catalog-services/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/products/{product_id}/pricing`](#op-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`](#op-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}`](#op-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 {#op-get-api-v1-orgs-org-slug-products-product-id-pricing}

`GET /api/v1/orgs/{org_slug}/products/{product_id}/pricing`

A product's plans, in their order. 404 for another organization's product.

#### 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

| 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 |
| `[].wholesale` | object or null |

### Add a plan {#op-post-api-v1-orgs-org-slug-products-product-id-pricing}

`POST /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.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `product_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/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

| 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 |
| `wholesale` | object or null |

### Change a plan: only the fields sent (null leaves one as it is) {#op-patch-api-v1-orgs-org-slug-products-product-id-pricing-pricing-id}

`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 plan already below it, 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

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `product_id` | path | integer | yes |
| `pricing_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/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

| 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 |
| `wholesale` | object or null |
