Cart
Interface
A buyer's cart: its lines and the totals the server computed on this call. Read the
totals as given rather than recomputing them. Count lines with items.length and
units with items.reduce((n, i) => n + i.quantity, 0).
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | ISO 4217 currency code the totals are expressed in (e.g. |
|
| No | The delivery address set with CartService.update, |
|
| No | The cart's |
|
| No | The cart lines, one per variant. Empty for a cart whose every line was removed. |
|
| No | The cart's language tag (e.g. |
|
| No |
|
|
| Yes | Lines removed by this call, already gone from |
|
| No | The chosen |
|
| No | Shipping of the chosen option in cents, VAT included when charged. 0 with no option,<br>no line, or a free option. Provisional: checkout recomputes it. |
|
| No | Sum of every line's CartLineItem.subtotalCents, in minor currency units (cents): the<br>amount charged for the goods, VAT included when VAT is charged. Computed server-side. |
|
| No | Cart.subtotalCents with VAT, in cents: equal to |
|
| No | Cart.subtotalCents without VAT, in cents: the sum of every line's |
|
| No | The VAT contained in Cart.totalCents, in cents (do not add it), at the delivery<br>country's rate, else the merchant country's. 0 when no VAT is charged. |
|
| No | Amount payable in cents: Cart.subtotalCents plus Cart.shippingTotalCents.<br>Provisional: checkout recomputes it and can refuse with |
CartLineInput
Interface
Which variant to add or update, and how many units.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Number of units, an integer from 1 to 999. CartService.addLine adds this many<br>to the line; CartService.updateLine sets the line to exactly this many. |
|
| No | The variant's opaque wire id (prefixed |
CartLineItem
Interface
One cart line: a product variant and its quantity, addressed by CartLineItem.variantId. The SKU, image and option values are copied when the item is added. The price follows the catalogue on every cart call, and checkout charges the current price.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | This line's amount with VAT, in cents, for all its units: equal to CartLineItem.subtotalCents. |
|
| No | This line's amount without VAT, in cents, for all its units. Equal to |
|
| No | Ordered option pairs identifying the chosen variant. Empty array for a product with no options. |
|
| No | How many units of this variant are in the cart. Integer, 1 or more, capped at 999 per line. |
|
| No | The amount charged for this line in minor currency units (cents), VAT included when VAT is<br>charged. Computed server-side. Read it rather than multiplying |
|
| No | Absolute URL of the product's primary image, copied when the item was added and shared by its lines. |
|
| No | Product name in the cart's language when translated, else as stored when the item was added. Always non-empty. |
|
| No | Price of one unit in minor currency units (cents), VAT included when VAT is charged:<br>the current catalogue price. When VAT is added to prices the<br>merchant entered without it, this can differ slightly from |
|
| No | The variant's |
|
| No | Merchant stock-keeping unit snapshotted at add time. |
|
| No | Variant name (e.g. |
CartLineOptionValue
Interface
One resolved option pair on a cart line, snapshotted when the item was added
(e.g. { option: 'Size', value: 'M' }). Render these to tell two lines of the
same product apart. Empty for a product with no options.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Option name as the merchant labelled it (e.g. |
|
| No | The chosen value for that option (e.g. |
CartUpdateInput
Interface
The cart fields CartService.update sets. An absent key keeps the stored value,
null clears it, and a value replaces it.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | The delivery address, replacing the stored one whole, or |
|
| Yes | A |
CartWithToken
Interface
The Cart returned by CartService.addLine, which carries the guest cart token on the add that creates a guest cart. The service keeps the token; persist it only to survive a page reload.
Extends: Cart
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | The guest cart token, returned once and never again. Whoever holds it can read and<br>change the cart, so store it per visitor only. |
|
| No | ISO 4217 currency code the totals are expressed in (e.g. |
|
| No | The delivery address set with CartService.update, |
|
| No | The cart's |
|
| No | The cart lines, one per variant. Empty for a cart whose every line was removed. |
|
| No | The cart's language tag (e.g. |
|
| No |
|
|
| Yes | Lines removed by this call, already gone from |
|
| No | The chosen |
|
| No | Shipping of the chosen option in cents, VAT included when charged. 0 with no option,<br>no line, or a free option. Provisional: checkout recomputes it. |
|
| No | Sum of every line's CartLineItem.subtotalCents, in minor currency units (cents): the<br>amount charged for the goods, VAT included when VAT is charged. Computed server-side. |
|
| No | Cart.subtotalCents with VAT, in cents: equal to |
|
| No | Cart.subtotalCents without VAT, in cents: the sum of every line's |
|
| No | The VAT contained in Cart.totalCents, in cents (do not add it), at the delivery<br>country's rate, else the merchant country's. 0 when no VAT is charged. |
|
| No | Amount payable in cents: Cart.subtotalCents plus Cart.shippingTotalCents.<br>Provisional: checkout recomputes it and can refuse with |
RemovedCartLine
Interface
One entry in Cart.removedLines: a line the server removed during the call that returned the cart, because its variant is no longer sellable or is out of stock on a site that refuses overselling. Use it to tell the buyer the item was dropped.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No |
|
|
| No | Product name, translated like CartLineItem.title, for the "removed" message. Always non-empty. |
|
| No | The removed variant's |
|
| No | Variant name (e.g. |
ShippingOption
Interface
One shipping option of a market, as lynkow.shippingOptions.list() returns it:
a delivery method the merchant offers in that market, with its price. Only
active options are listed.
The locale, requestedLocale and isFallback signals of
LocaleResolution are present when the request carried a locale, and
describe the language label is served in.
Extends: LocaleResolution
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Opaque option id, prefixed |
|
| Yes |
|
|
| No | The option's name for the buyer (e.g. |
|
| Yes | BCP 47 locale code of the record actually served (e.g. |
|
| No | The merchant's sort order for the option within its market. The list is already<br>sorted by it, lowest first; use it only to re-sort a copy. |
|
| No | The option's price in minor currency units (cents) of the site's currency, VAT<br>included when the site charges VAT: equal to ShippingOption.priceGrossCents.<br>Integer, 0 or more; 0 is a free option. |
|
| No | How the merchant wants prices shown: |
|
| No | ShippingOption.priceCents with VAT, at the rate of the |
|
| No | ShippingOption.priceCents without VAT, in cents. Equal to |
|
| Yes | BCP 47 locale code the request asked for (e.g. |
ShippingOptionList
Interface
The response of lynkow.shippingOptions.list(): every active shipping option of
one market, lowest position first. Not paginated.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | The market's active shipping options. Empty when it has none, when |
ShippingOptionsListOptions
Interface
Request options of lynkow.shippingOptions.list(). market is required.
Extends: BaseRequestOptions
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | ISO 3166-1 alpha-2 code (e.g. |
|
| Yes | Set |
|
| Yes |
|
|
| Yes | Locale of this request (e.g. |
|
| No | Id ( |