Tillwire Read the guide
API reference

Clients. 4 operations.

4 of them work. Each needs a bearer token with its scope. All operations.

Operations

POST/api/v1/clients/{id}/deleteclients.deletecustomers.write

Parameters

idpathstring
idpathstring
Idempotency-KeyheaderstringSee common parameters

Answer

Deletion

Errors: 401, 403, 404, 405, 409, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/clients/{id}/delete

GET/api/v1/clients/{id}clients.getcustomers.read

Parameters

idpathstring
idpathstring

Answer

Client

Errors: 401, 403, 404, 405, 422, 429

curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/clients/{id}

GET/api/v1/clientsclients.listcustomers.read

Parameters

qquerystringThe words to search the clients for: a name, a business, a VAT number, an email.
pagequeryintegerSee common parameters

Errors: 401, 403, 405, 422, 429

curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/clients

POST/api/v1/clientsclients.savecustomers.write

Parameters

Idempotency-KeyheaderstringSee common parameters

Request body

ClientSaveRequest

Answer

Client

Errors: 401, 403, 405, 409, 413, 422, 429

curl -X POST -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/clients

Schemas 9

Client

Client is a client record the owner keeps for orders and quotes entered by hand (additive): who to write to (Emails, the first is the main contact, the address the quote and the invoice are sent to), the company's details, its billing and delivery addresses, the payment term it pays by (the id of one of the store's terms, "" for none), its credit limit (zero for none), the default of the switch of VAT-exclusive prices, and a note. (A customer, in customers.list, is a contact with its orders; a client is this record.)

balanceClientBalance
billingPostalAddress
business_namerequiredstring
contact_namerequiredstring
createdrequiredstring (date-time)
credit_limitrequiredMoney
deliveryPostalAddress
emailsrequiredarray of string
idrequiredinteger
noterequiredstring
phonerequiredstring
prices_exclude_vatrequiredboolean
registration_numberrequiredstring
termrequiredstring
updatedrequiredstring (date-time)
vat_numberrequiredstring
ClientBalance

ClientBalance is what a client owes (read, never stored): Open is the total of its orders not yet paid and not cancelled, less their credit notes, Limit its credit limit (zero for none), Over whether Open is above a limit, Orders those orders, oldest first, each with its age.

limitrequiredMoney
oldest_age_daysrequiredinteger
openrequiredMoney
open_ordersrequiredinteger
ordersrequiredarray of ClientOpenOrder
overrequiredboolean
ClientList

ClientList is a page of the clients by name, SearchPageSize a page, and how many there are in all (of those the search holds).

clientsrequiredarray of Client
morerequiredboolean
ofrequiredinteger
totalsrequiredClientTotals
ClientOpenOrder

ClientOpenOrder is an order of a client not yet paid, with the term it was entered under and its age in whole days. Total is the order's, Credited what its credit notes took off it and Owed what is left (Total less Credited).

age_daysrequiredinteger
creditedrequiredMoney
numberrequiredinteger
owedrequiredMoney
placed_atrequiredstring (date-time)
termrequiredstring
totalrequiredMoney
ClientSaveRequest

ClientSaveRequest makes a client record (ID 0 or left out) or changes the one it names, whole: every field is as sent. The addresses are lower-cased and kept once each; the first is the main contact. CreditLimit is a price with two decimals, such as 50000.00 ("" or 0.00 for none). A field outside its bounds, a term the store has not, or an address another client holds is refused, naming the field.

billingPostalAddress
business_namestring
contact_namerequiredstring
credit_limitstring
deliveryPostalAddress
emailsrequiredarray of string
idinteger
notestring
phonestring
prices_exclude_vatboolean
registration_numberstring
termstring
vat_numberstring
ClientTotals

ClientTotals are the figures over every client a search of the clients holds, counted by the engine in one statement. Clients is how many clients hold the search; Owed what they owe in all (the open orders less their credit notes); OverLimit how many of them owe more than their credit limit (a client with no limit is never over); Overdue how many of them have at least one open order that is overdue: older, in whole days since it was placed, than the days of the term it was entered under.

clientsrequiredinteger
over_limitrequiredinteger
overduerequiredinteger
owedrequiredMoney
Deletion

Deletion is what a delete deleted: the slug of the category, the collection or the content page that is gone, or the name of the image.

deletedrequiredstring
Money

Money is an amount: in minor units of its ISO 4217 currency, and as the store displays it.

currencyrequiredstring
displayrequiredstring
minorrequiredinteger
PostalAddress

PostalAddress is an address in its fields, as the store's details take and give it. From contract version 6.

cityrequiredstring
countryrequiredstring
country_namestring
line1requiredstring
line2requiredstring
postal_coderequiredstring
provincerequiredstring
suburbrequiredstring
textstring

Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.