Customers. 4 operations.
4 of them work. Each needs a bearer token with its scope. All operations.
Operations
POST/api/v1/customerscustomers.createcustomers.write
GET/api/v1/customers/{email}customers.getcustomers.read
GET/api/v1/customerscustomers.listcustomers.read
POST/api/v1/customers/{email}/consents/{topic}/withdrawcustomers.withdraw-consentcustomers.write
Schemas 34
Address
Address is a postal address in its fields and on one line: the domain's address, which the store's own address will take when the operations give store details.
cityrequired | string |
countryrequired | string |
country_namerequired | string |
linesrequired | array of string |
postal_coderequired | string |
provincerequired | string |
suburbrequired | string |
textrequired | string |
Buyer
CashCollected
CashCollected is the cash of an order paid on delivery as it was collected.
actorrequired | string |
amountrequired | Money |
atrequired | string (date-time) |
how | string |
reference | string |
CollectPlace
CollectPlace is a place of the store the buyer collects an order at, as the order keeps it: the place's key and name, its address in one line (the street, the suburb, the city and the postal code, as far as each is known) and its opening hours as the owner wrote them (CR-4).
addressrequired | string |
hoursrequired | string |
keyrequired | string |
namerequired | string |
Customer
Customer is a contact as the owner sees it (additive from version 6): its address, as the store keeps it, whether it holds an account, the source that first named it (checkout, account, signup, or an import) and when, and its paid orders: how many, what they spent, VAT and shipping in, less what was refunded, and when the first and the last were placed.
accountrequired | boolean |
created_atrequired | string (date-time) |
emailrequired | string |
first_order | string (date-time) |
last_order | string (date-time) |
name | string |
ordersrequired | integer |
sourcerequired | string |
spentrequired | Money |
CustomerConsent
CustomerConsent is a customer's consent to one topic as it stands: its kind (given, confirmed, imported, withdrawn) and when.
atrequired | string (date-time) |
kindrequired | string |
topicrequired | string |
CustomerCreateRequest
CustomerCreateRequest adds a customer by the address a mail can go to. The customer holds no consent: this gives none.
emailrequired | string |
CustomerCreated
CustomerCreated is the answer of customers.create: the address, as the store keeps it, and whether this call made the contact (false: the store held it already). Customer is the customer's view, given only to a token that reads customers (customers.read): a token that may only write learns nothing of a customer the store already knew.
createdrequired | boolean |
customer | Customer |
emailrequired | string |
CustomerDetail
CustomerDetail is one customer, a page of its orders, paid or not, newest first, how many it has in all, and its consents, by topic.
consentsrequired | array of CustomerConsent |
customerrequired | Customer |
ordersrequired | array of Order |
orders_ofrequired | integer |
CustomerList
CustomerList is a page of the customers, newest first, how many there are in all, and whether more follow.
customersrequired | array of Customer |
morerequired | boolean |
ofrequired | integer |
DeliveryFacts
DeliveryFacts are an order's delivery (from version 6): its kind, one of the Delivery kinds; its method in the engine's words (the zone's name, the flat rate, the courier's service and how it reaches the buyer, or no delivery); the shipping line's price; and how many units of products the order holds.
itemsrequired | integer |
kindrequired | string |
pricerequired | Money |
wordsrequired | string |
DownloadRecord
DownloadRecord is one download of a grant: when, and the SHA-256 of the file it served. From version 6.
atrequired | string (date-time) |
digestrequired | string |
Event
Event is one change of an order's status.
actorrequired | string |
atrequired | string (date-time) |
carrier | string |
code | string |
corrects | integer |
note | string |
reason | string |
statusrequired | string |
tracking | string |
Line
Line is one line of an order, as copied at confirm.
choicesrequired | array of LineChoice |
combo | LineCombo |
discountrequired | Money |
download | LineDownload |
kindrequired | string |
made_to_orderrequired | boolean |
no_delivery | boolean |
option_valuesrequired | array of string |
pickup_point | PickupPoint |
price_log | LinePriceLog |
production_daysrequired | integer |
quantityrequired | integer |
quote | Quote |
quoted_by | string |
skurequired | string |
titlerequired | string |
totalrequired | Money |
unit_pricerequired | Money |
LineChoice
LineChoice is a buyer's answer on a cart line or an order line: the label the field had at the confirm, and the value. An order never changes it, and a privacy erasure of the buyer replaces a text value with the catalogue's word "erased".
keyrequired | string |
labelrequired | string |
valuerequired | string |
LineCombo
LineCombo is the combo a part line came from: its SKU and its title as they were at confirm, how many combos the order holds, and Index, which combo line of the cart it was, from 0 (two lines of one combo at two cadences stay apart). First is true on the first part line of the combo. Total, Discount and VAT are the sums of the combo's part lines: the discount, the total after it and the VAT in it.
LineDownload
LineDownload is a digital line's download grant as the owner sees it: the most downloads it allows, the downloads used, its expiry, when it was revoked (null while it stands), and its downloads, newest first, at most 50, each with the digest of the file it served; no IP address and no user agent are kept. From version 6.
expires_atrequired | string (date-time) |
maxrequired | integer |
recordsrequired | array of DownloadRecord |
regranted_atrequired | string (date-time) |
revoked_atrequired | string (date-time) |
usedrequired | integer |
LinePriceLog
LinePriceLog is the price log of an order line the owner priced: Reason, By (who set the price, such as user:owner), At, and Catalogue, the catalogue's price of one unit it stands against (zero for a custom line, which has none).
atrequired | string (date-time) |
byrequired | string |
cataloguerequired | Money |
reasonrequired | 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 |
Order
Order is an order as the owner sees it.
actionsrequired | array of string |
amount_duerequired | Money |
buyerrequired | Buyer |
cashrequired | OrderCash |
collect | CollectPlace |
deliveryrequired | DeliveryFacts |
dispatch_byrequired | string |
eventsrequired | array of Event |
fee_keptrequired | boolean |
flagsrequired | array of string |
gatewayrequired | string |
gift_card_paidrequired | Money |
linesrequired | array of Line |
linked | OrderLink |
methodrequired | string |
notesrequired | array of OrderNote |
numberrequired | integer |
paymentrequired | PaymentFacts |
placed_atrequired | string (date-time) |
po_number | string |
pos | OrderPOS |
refundablerequired | Money |
refundsrequired | array of Refund |
shipmentsrequired | array of Shipment |
sourcerequired | string |
statusrequired | string |
tendersrequired | array of Tender |
terms | OrderTerms |
timelinerequired | array of TimelineEntry |
totalrequired | Money |
OrderCash
OrderCash is the cash of an order paid on delivery: what is to be collected, the order's frozen total, and, once it was, the cash collected (null before): when, how much and who said so (the owner, an integration, or the courier). The order's status is not changed by it. An order under account terms shows it too, as its payment on account: ToCollect is the invoice's total and Collected the payment once recorded, with how it was made and its reference (additive).
collectedrequired | CashCollected |
to_collectrequired | Money |
OrderLink
OrderLink is the other order of a pair of linked orders: its number and its role in the pair, deposit or balance (the opposite of the role of the order that carries the link).
numberrequired | integer |
rolerequired | string |
OrderNote
OrderNote is one internal note of an order (from version 6): its text, who wrote it in words (owner, or an integration's name), and when. No buyer's page or mail shows it.
atrequired | string (date-time) |
byrequired | string |
textrequired | string |
OrderPOS
OrderPOS is the sale at the till an order is: the key and the name of the stock location it was sold at, the device and its sale number, when it was sold by the device's clock (the order's placed_at is when the store received it).
devicerequired | string |
locationrequired | string |
location_namerequired | string |
made_before_stoprequired | boolean |
price_differsrequired | boolean |
sale_numberrequired | string |
seller | OrderSeller |
sold_atrequired | string (date-time) |
OrderSeller
OrderSeller is the team member who sold a sale at the till: the account's id, its name ("" for none) and its email.
emailrequired | string |
idrequired | integer |
namerequired | string |
OrderTerms
OrderTerms are the payment terms an order was entered under: the term's id in the store's settings, its kind (pay_now, eft or account), the days after the invoice that it falls due (0: on receipt) and the moment of the tax invoice (accepted or dispatched; "" for a kind that has none).
due_daysrequired | integer |
idrequired | string |
invoice_at | string |
kindrequired | string |
PaymentFacts
PaymentFacts are an order's payment (from version 6): its method's id and its gateway's name ("" for none); what it paid, its frozen total once paid, else nothing; when it was paid, null while it never was; the gateway's reference of its last captured payment, "" for none; and what was refunded of it, declined refunds aside. State is where its payment stands, one of the Payment states, "" for none of them (such as an order cancelled before it was paid), by the rule orders.search's payment filter narrows by.
PickupPoint
PickupPoint is a pickup point or a locker an order is delivered to, as the courier connector listed it at the confirm: the connector's id of it, its kind (pickup_point or locker), who runs it, its name, the courier's own words about it, its address, where it is (lat and lng, null when not known), its distance in metres from the buyer's address (null when not given), its hours, one line per day as given, and provider, the connector that listed it, which books it. From version 6.
addressrequired | PostalAddress |
carrierrequired | string |
descriptionrequired | string |
distance_mrequired | integer |
hoursrequired | array of string |
idrequired | string |
kindrequired | string |
latrequired | number |
lngrequired | number |
namerequired | string |
providerrequired | string |
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 |
Quote
Quote is what a courier said of an order's shipping line, each part "" when it did not say: the service's name, the carrier, the courier's code of the service, how the parcel reaches the buyer (door, pickup_point or in_store), and the estimated delivery dates (YYYY-MM-DD).
carrierrequired | string |
delivery_fromrequired | string |
delivery_torequired | string |
display_name | string |
kindrequired | string |
servicerequired | string |
service_coderequired | string |
Refund
Refund is one refund of an order.
actorrequired | string |
amountrequired | Money |
atrequired | string (date-time) |
cancelrequired | boolean |
reasonrequired | string |
staterequired | string |
Shipment
Shipment is one shipment of an order as last corrected (from version 6): the id a correction names, the carrier and tracking number, when it was shipped, and whether the owner corrected it since.
atrequired | string (date-time) |
carrierrequired | string |
correctedrequired | boolean |
idrequired | integer |
trackingrequired | string |
Tender
TimelineEntry
TimelineEntry is one thing that happened to an order (from version 6): when; its kind, one of the Timeline kinds; who did it, in words (owner, guest, payment, system, courier, or an integration's name, never its raw id); the engine's words for it; and, by kind, its status (a status entry's status, a refund's state, a payment's type such as captured or failed), its amount (a cash collected's, a payment's, a refund's), its reference (a payment's gateway reference, a shipment's tracking number), its SKU (a download grant's) and its template (a mail's type). Entries are oldest first; entries of the same time in the order of the kinds, then as they were recorded.
amount | Money |
atrequired | string (date-time) |
byrequired | string |
kindrequired | string |
reference | string |
sku | string |
status | string |
template | string |
wordsrequired | 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.