# Organization API: Customer Portal: Billing details

> The 2 Organization API operations for billing details.

Source: https://www.coritan.com/docs/api/reference/organizations/customer-portal/billing-details/

Part of [Customer Portal](/docs/api/reference/organizations/customer-portal/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/portal/billing-details`](#op-get-api-v1-orgs-org-slug-portal-billing-details) | The customer's billing details: name, company, country and address |
| PATCH | [`/api/v1/orgs/{org_slug}/portal/billing-details`](#op-patch-api-v1-orgs-org-slug-portal-billing-details) | Change the customer's billing details |

### The customer's billing details: name, company, country and address {#op-get-api-v1-orgs-org-slug-portal-billing-details}

`GET /api/v1/orgs/{org_slug}/portal/billing-details`

The customer's billing details: name, company, country and address.

Invoice PDFs show the name, the company and the country. `address` is
`null` until the customer saves one, and `email` is the account's own
address.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `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 | Description |
| --- | --- | --- |
| `email` | string | The account's email address. Change it from the profile. |
| `first_name` | string or null |  |
| `last_name` | string or null |  |
| `company` | string or null |  |
| `country_code` | string or null | The billing country, as a two-letter code such as `GB`. |
| `address` | BillingAddress or null | The billing address, or `null` until the customer saves one. |
| `address.line1` | string or null | The street address. |
| `address.line2` | string or null | The flat, suite or building, if any. |
| `address.city` | string or null |  |
| `address.postal_code` | string or null | The postcode or ZIP code. |
| `address.state` | string or null | The state, province or county. |

### Change the customer's billing details {#op-patch-api-v1-orgs-org-slug-portal-billing-details}

`PATCH /api/v1/orgs/{org_slug}/portal/billing-details`

Change the customer's billing details.

Send only the fields to change. An empty `first_name`, `last_name` or
`company` clears it. `country_code` takes a two-letter country code such as
`GB`. `address` replaces the whole address, and `null` removes it. `email`
is accepted only when it is the account's own address, so a form can send
back what `GET` answered. The answer is the details as saved.

#### Parameters

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

#### Request body

`application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string or null | no | Accepted only when it is the account's own address. Change the address from the profile. |
| `first_name` | string or null | no | Empty or `null` clears it. |
| `last_name` | string or null | no | Empty or `null` clears it. |
| `company` | string or null | no | Empty or `null` clears it. |
| `country_code` | string or null | no | A two-letter country code such as `GB`, in either case. Empty or `null` clears it. |
| `address` | BillingAddress or null | no | Replaces the whole address. `null` removes it. |
| `address.line1` | string or null | no | The street address. |
| `address.line2` | string or null | no | The flat, suite or building, if any. |
| `address.city` | string or null | no |  |
| `address.postal_code` | string or null | no | The postcode or ZIP code. |
| `address.state` | string or null | no | The state, province or county. |

#### Responses

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

Fields of a `200` response:

| Field | Type | Description |
| --- | --- | --- |
| `email` | string | The account's email address. Change it from the profile. |
| `first_name` | string or null |  |
| `last_name` | string or null |  |
| `company` | string or null |  |
| `country_code` | string or null | The billing country, as a two-letter code such as `GB`. |
| `address` | BillingAddress or null | The billing address, or `null` until the customer saves one. |
| `address.line1` | string or null | The street address. |
| `address.line2` | string or null | The flat, suite or building, if any. |
| `address.city` | string or null |  |
| `address.postal_code` | string or null | The postcode or ZIP code. |
| `address.state` | string or null | The state, province or county. |
