16200 is £162.00. That’s how money is stored everywhere in this API, because a float is how a penny goes missing.
Invoices
Listing
GET /v1/client/invoices/{id}. Both need invoices:read. The single-invoice response includes line items and payment status, the same as the client area shows.
PDFs
invoices:read.
If you file invoices for accounting, this one’s worth automating. A weekly job that pulls anything new beats remembering to download them.
Paying
invoices:pay. It’s one of the scopes that can spend money, because this spends real money.
method is one of:
Only
credit finishes inside the API call. The other two hand back something a person has to act on:
400 that says how much the invoice needs and how much you have. If we can’t get a rate, you get a 503. Try again shortly.
For crypto, you get the gateway, the deposit address, the amount and a paymentId. Poll it with:
Merging invoices
invoices:pay. An ID that isn’t yours isn’t found.
Bank transfer
GET /v1/client/invoices/{id}/bank-transfer (invoices:read) returns where to send the money, how much, and the reference to quote. POST to the same path (invoices:pay) tells us you’ve sent it, so staff know to watch for it.
The POST doesn’t mark anything paid. A transfer settles when the money actually lands, either when staff match it or when the bank feed picks up the reference. It’s limited to 6 calls a minute.
Tickets
Reading
GET /v1/client/tickets/{id} returns one ticket with the full reply thread. Both need tickets:read.
Opening one
tickets:write. The response carries the new ticket’s id.
subjectandmessageare required and can’t be blank.priorityislow,normal,highorcritical, and defaults tonormal. An unrecognised value quietly becomesnormalrather than failing the request.departmentis optional. If you leave it out, or send a slug we don’t recognise, the ticket goes togeneral.attachmentIdsis optional. See attachments.
Replying
tickets:write. Note that the field is body, not message. It’s different from ticket creation, and that inconsistency stays until v2. A reply can be files only, as long as you send attachmentIds.
Posting to a closed ticket returns 400. Open a new one instead.
Attachments
Attaching a file takes two steps. First, upload the file and get an ID back. Then name that ID in a new ticket or a reply.201 with the attachment’s id, filename, contentType and size. Then post it:
- Up to 10 MB per file and 5 files per message. You can have up to 20 uploads waiting to be sent.
- Accepted file types: png, jpg, gif, webp, pdf, zip, gz, tgz, txt, log, csv, json, conf, yml and yaml. The file’s contents have to match its extension. SVG and HTML are refused, because both can run script.
- Uploads are limited to 20 a minute.
DELETE /v1/client/ticket-attachments/{id}takes back an upload you haven’t sent yet.GET /v1/client/tickets/{id}/attachments/{attachmentId}downloads one (tickets:read).
tickets:write.
Alerting into tickets
The obvious use is having your monitoring open a ticket when something breaks:- Put the service ID and a timestamp in the body. A ticket that just says “server down” costs a round trip before anyone can help.
- De-duplicate on your side. A flapping check that opens forty tickets overnight gets your alerts muted, not your problem fixed faster.