# Organization API: Catalog & Services: Services

> The 5 Organization API operations for services.

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

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

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/services`](#op-get-api-v1-orgs-org-slug-services) | The org's services, newest first, each naming its product, plan and customer |
| POST | [`/api/v1/orgs/{org_slug}/services`](#op-post-api-v1-orgs-org-slug-services) | Order service |
| GET | [`/api/v1/orgs/{org_slug}/services/{service_id}`](#op-get-api-v1-orgs-org-slug-services-service-id) | Get service |
| POST | [`/api/v1/orgs/{org_slug}/services/{service_id}/suspend`](#op-post-api-v1-orgs-org-slug-services-service-id-suspend) | Suspend service |
| POST | [`/api/v1/orgs/{org_slug}/services/{service_id}/unsuspend`](#op-post-api-v1-orgs-org-slug-services-service-id-unsuspend) | Unsuspend service |

### The org's services, newest first, each naming its product, plan and customer {#op-get-api-v1-orgs-org-slug-services}

`GET /api/v1/orgs/{org_slug}/services`

The org's services, newest first, each naming its product, plan and
customer.

``q`` matches the hostname, the customer's email, name or company, the
product or plan name, a tag, or the service number. ``with_total=true``
answers ``{items, total, limit, offset, counts}``; ``counts`` per status
are for the same customer, tag and search whatever the status filter.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org_slug` | path | string | yes |  |
| `customer_id` | query | integer | no |  |
| `status_filter` | query | string | no |  |
| `tag` | query | string | no |  |
| `q` | query | string | no |  |
| `limit` | query | integer | no | Default: `50`. |
| `offset` | query | integer | no | Default: `0`. |
| `with_total` | query | boolean | no | Default: `False`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Order service {#op-post-api-v1-orgs-org-slug-services}

`POST /api/v1/orgs/{org_slug}/services`

#### Parameters

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

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `customer_id` | integer | yes |
| `org_product_id` | integer | yes |
| `org_pricing_id` | integer | yes |
| `hostname` | string or null | no |
| `config` | object or null | 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_id` | integer |
| `customer_id` | integer |
| `org_product_id` | integer |
| `org_pricing_id` | integer |
| `platform_service_id` | integer or null |
| `hostname` | string or null |
| `status` | string |
| `billing_cycle` | string |
| `amount` | string |
| `next_due_date` | string (date-time) or null |
| `config` | object or null |
| `provisioned_at` | string (date-time) or null |
| `created_at` | string (date-time) or null |
| `tags` | array of string |
| `product_name` | string or null |
| `plan_name` | string or null |
| `currency` | string or null |
| `customer_email` | string or null |
| `customer_name` | string or null |
| `customer_status` | string or null |

### Get service {#op-get-api-v1-orgs-org-slug-services-service-id}

`GET /api/v1/orgs/{org_slug}/services/{service_id}`

#### Parameters

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

#### 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_id` | integer |
| `customer_id` | integer |
| `org_product_id` | integer |
| `org_pricing_id` | integer |
| `platform_service_id` | integer or null |
| `hostname` | string or null |
| `status` | string |
| `billing_cycle` | string |
| `amount` | string |
| `next_due_date` | string (date-time) or null |
| `config` | object or null |
| `provisioned_at` | string (date-time) or null |
| `created_at` | string (date-time) or null |
| `tags` | array of string |
| `product_name` | string or null |
| `plan_name` | string or null |
| `currency` | string or null |
| `customer_email` | string or null |
| `customer_name` | string or null |
| `customer_status` | string or null |

### Suspend service {#op-post-api-v1-orgs-org-slug-services-service-id-suspend}

`POST /api/v1/orgs/{org_slug}/services/{service_id}/suspend`

#### Parameters

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

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Unsuspend service {#op-post-api-v1-orgs-org-slug-services-service-id-unsuspend}

`POST /api/v1/orgs/{org_slug}/services/{service_id}/unsuspend`

#### Parameters

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

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
