Skip to content
Coritan Docs

Organization API: Customer Portal: Billing details

The 2 Organization API operations for billing details.

View as Markdown

Part of Customer Portal.

Method Path Summary
GET /api/v1/orgs/{org_slug}/portal/billing-details The customer's billing details: name, company, country, address and VAT number
PATCH /api/v1/orgs/{org_slug}/portal/billing-details Change the customer's billing details

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

Section titled The customer's billing details: name, company, country, address and VAT number

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

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

Invoice PDFs show the name, the company, the address, the country and the VAT number. address and vat_id are null until the customer saves them, and email is the account's own address.

Name In Type Required
org_slug path string yes
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.
vat_id string or null The customer's VAT number in capitals and digits, such as DE123456789, or null until they save one. Invoice PDFs print it. We do not check it and it changes no amount.

Change the customer's billing details

Section titled Change the customer's 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.

vat_id takes a VAT number of 4 to 32 letters and digits, such as DE123456789. We take out spaces, dots and hyphens and save letters as capitals, and an empty one or null removes it. Anything else answers 422. Invoice PDFs print the number under the customer's details, past invoices included. We do not check it against a tax register, and it changes no amount on an invoice.

Name In Type Required
org_slug path string yes

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.
vat_id string or null no The customer's VAT number, such as DE123456789: 4 to 32 letters and digits. Spaces, dots and hyphens are taken out and letters are saved as capitals. Empty or null removes it.
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.
vat_id string or null The customer's VAT number in capitals and digits, such as DE123456789, or null until they save one. Invoice PDFs print it. We do not check it and it changes no amount.