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
GET/api/v1/clients/{id}clients.getcustomers.read
GET/api/v1/clientsclients.listcustomers.read
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.)
balance | ClientBalance |
billing | PostalAddress |
business_namerequired | string |
contact_namerequired | string |
createdrequired | string (date-time) |
credit_limitrequired | Money |
delivery | PostalAddress |
emailsrequired | array of string |
idrequired | integer |
noterequired | string |
phonerequired | string |
prices_exclude_vatrequired | boolean |
registration_numberrequired | string |
termrequired | string |
updatedrequired | string (date-time) |
vat_numberrequired | string |
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.
limitrequired | Money |
oldest_age_daysrequired | integer |
openrequired | Money |
open_ordersrequired | integer |
ordersrequired | array of ClientOpenOrder |
overrequired | boolean |
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).
clientsrequired | array of Client |
morerequired | boolean |
ofrequired | integer |
totalsrequired | ClientTotals |
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).
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.
billing | PostalAddress |
business_name | string |
contact_namerequired | string |
credit_limit | string |
delivery | PostalAddress |
emailsrequired | array of string |
id | integer |
note | string |
phone | string |
prices_exclude_vat | boolean |
registration_number | string |
term | string |
vat_number | string |
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.
clientsrequired | integer |
over_limitrequired | integer |
overduerequired | integer |
owedrequired | Money |
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.
deletedrequired | string |
Money
Money is an amount: in minor units of its ISO 4217 currency, and as the store displays it.
currencyrequired | string |
displayrequired | string |
minorrequired | integer |
PostalAddress
PostalAddress is an address in its fields, as the store's details take and give it. From contract version 6.
cityrequired | string |
countryrequired | string |
country_name | string |
line1required | string |
line2required | string |
postal_coderequired | string |
provincerequired | string |
suburbrequired | string |
text | string |
Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.