Billing details API: the "Bill to" on your invoices
The company, address, country, tax id and email your invoice PDFs print under Bill to, saved from the console Account page. API keys cannot reach these routes.
The "Bill to" block on your invoice PDFs comes from billing details stored on the organization, behind two routes at https://api.uplinkswitch.com/v1/account/billing-details. Both routes take a signed-in console session and nothing else: an API key of any kind, admin keys included, is answered with 403. In practice you edit these details on the console Account page, in its International invoice section, which sends the PATCH for you.
Read
GET /v1/account/billing-details answers with data holding the five fields below, each null or empty until something has been saved. Any signed-in member of the organization may read it.
Save
PATCH /v1/account/billing-details needs the owner or the billing role. A field you omit keeps its value, while null or an empty string clears it; for address_lines, null or an empty array clears every line.
| Field | Type | Notes |
|---|---|---|
company | string or null | The customer name; when null, the organization's own name is printed. |
address_lines | array of strings | At most 4 lines, each at most 120 characters. |
country | string or null | The country printed in the block. |
tax_id | string or null | VAT, GST, EIN or any other tax number, printed exactly as typed. |
email | string or null | Printed on the invoice; when null, the organization's email is used. |
Status codes
- 200: the details as stored, or as just saved.
- 400
invalid_request: a malformed body, such as a fifth address line or one longer than 120 characters. - 401
unauthorized: the request brought no console session and no key. - 403
forbidden: on either route, any API key; on PATCH, also a member who holds neither the owner nor the billing role.
Example body
The Account page sends a body shaped like this to PATCH /v1/account/billing-details:
{"company": "Acme Inc", "address_lines": ["1 Main St", "Springfield"], "country": "US", "tax_id": "EIN 00-0000000"}No keyed curl exists for this route, because it accepts no key. After a save, the next PDF from the invoices API prints these values.