Create or reprice an order
/ordersThe discount phase, as at a POS. Lynked works out the discounts the customer gets (vouchers, stamp vouchers, group and staff discounts) and keeps the order in progress.
- A new
external_order_id→ a new order:201 Created, andorder.createdis sent. - The
external_order_idof an order in progress → its cart is replaced and the discounts are worked out again:200 OK.
The two kinds of discount are separate: discount is on the order as a whole,
items[].discount is on each line. Charge the customer total minus discount minus the sum
of items[].discount, then
complete the order. An order left in progress for
15 minutes is canceled.
Headers
Idempotency-Keystring · uuidA UUID (any version; UUIDv7 recommended) that makes a retry of this request safe. See the Idempotency guide.
Request body
An order, sent for the discount phase. Send the whole cart each time; a repeated request with the
same external_order_id replaces the cart of the order in progress.
5 fields
seller_idintegerRequiredThe seller the order is made at. See List sellers.
min 1
barcodestringRequiredWhat identifies the customer, as a POS reads it: the customer's Lynked barcode, a voucher code, a staff barcode (staff discount applies), a phone number or an email.
max 255 characters
external_order_idstringRequiredThe order id in your system. One order in progress per id.
max 255 characters
external_discountnumber | nullAn order-level discount you applied yourself, outside Lynked.
min 0
itemsarray of objectRequiredat least 1 item
10 fields
external_item_idstringRequiredThe line id in your system, unique within the order.
max 255 characters
external_product_idstring | nullmax 255 characters
skustringRequiredmax 255 characters
categorystringRequiredCategory path, levels separated by
/. Loyalty rules match on it.max 255 characters
product_namestringRequiredmax 255 characters
quantitynumberRequiredgreater than 0
totalnumberRequiredLine total before Lynked discounts.
min 0
taxnumber | nullmin 0
external_discountnumber | nullA discount on this line you applied yourself, outside Lynked.
min 0
supply_pricenumber | nullCost price of one unit. Staff discounts based on cost price use it.
min 0
Responses
Success
- 200 OKOrder
The order in progress was repriced.
16 fields
idintegerThe order id.
external_order_idstring | nullThe order id in your system (or in the POS the order came from).
statusOrderStatusin_progress: discounts are calculated; the order waits to be completed or canceled.completed: rewards are applied.canceled: the order was canceled before completion.
One of
"in_progress""completed""canceled"channelstringWhere the order came from.
public_apifor orders created through this API; other values name a POS or the seller app.seller_idintegerThe seller the order was made at. See List sellers.
location_idintegerThe location of the seller.
customer_idintegerThe customer the barcode belongs to.
is_staff_orderbooleantruewhen the barcode was a staff barcode, so the staff discount applies.currencyCurrencyThe business currency. Amounts in Rewards and Orders are in this currency.
One of
123totalnumberOrder total before Lynked discounts.
discountnumberLynked discount on the order as a whole (for example a value voucher). It is separate from the line discounts in
items[].discount: it does not include them and is not split over the lines.discount_reasonsarray of DiscountReasonWhat makes up the order's
discount. Line discounts have their own reasons initems[].discount_reasons.3 fields
What gave a discount. New values may be added; treat an unknown one as a generic discount.
One of
"voucher""stamp_voucher""stamp_voucher_extra""time_limited_voucher""product_discount_for_all""product_discount_group""multi_buy_discount""customer_condition""staff_member_discount""staff_rule_discount""staff_conditions""staff_supply_price_discount""staff_cash_discount""staff_percentage_scanned_by_seller""undefined"amountnumberThe amount of this discount.
descriptionstringA short text about the discount, as the dashboard shows it.
itemsarray of OrderItem10 fields
idintegerThe line id in Lynked.
external_item_idstring | nullThe line id in your system.
nullfor some orders that came from a POS.skustringcategorystringCategory path, levels separated by
/.product_namestringquantitynumbertotalnumberLine total before Lynked discounts.
discountnumberLynked discount on this line only (for example a stamp voucher or a product discount). The order's
discountis separate and not included here.discount_reasonsarray of DiscountReasonWhat makes up this line's
discount.3 fields
What gave a discount. New values may be added; treat an unknown one as a generic discount.
One of
"voucher""stamp_voucher""stamp_voucher_extra""time_limited_voucher""product_discount_for_all""product_discount_group""multi_buy_discount""customer_condition""staff_member_discount""staff_rule_discount""staff_conditions""staff_supply_price_discount""staff_cash_discount""staff_percentage_scanned_by_seller""undefined"amountnumberThe amount of this discount.
descriptionstringA short text about the discount, as the dashboard shows it.
rewardsarray of OrderRewardRewards this line gave the customer; empty until the order is completed.
3 fields
typeRewardTypeWhat the reward is. New values may be added; treat an unknown one as a generic reward.
One of
"points""point_scale_by_option""point_by_pos_rule""stamp""stamp_by_pos_rule""first_check_in""voucher""bonus_voucher""stamp_voucher""time_limited_voucher""stamp_by_sku"valuenumberHow much of the reward was given — points, stamps, or the value of a voucher; see
type.descriptionstringA short text about the reward, as the dashboard shows it.
rewardsarray of OrderRewardRewards the order as a whole gave the customer; empty until the order is completed. Rewards of a line are in
items[].rewardsand are not repeated here.3 fields
typeRewardTypeWhat the reward is. New values may be added; treat an unknown one as a generic reward.
One of
"points""point_scale_by_option""point_by_pos_rule""stamp""stamp_by_pos_rule""first_check_in""voucher""bonus_voucher""stamp_voucher""time_limited_voucher""stamp_by_sku"valuenumberHow much of the reward was given — points, stamps, or the value of a voucher; see
type.descriptionstringA short text about the reward, as the dashboard shows it.
created_atstring · date-timeupdated_atstring · date-time
- 201 CreatedOrder
A new order in progress.
16 fields
idintegerThe order id.
external_order_idstring | nullThe order id in your system (or in the POS the order came from).
statusOrderStatusin_progress: discounts are calculated; the order waits to be completed or canceled.completed: rewards are applied.canceled: the order was canceled before completion.
One of
"in_progress""completed""canceled"channelstringWhere the order came from.
public_apifor orders created through this API; other values name a POS or the seller app.seller_idintegerThe seller the order was made at. See List sellers.
location_idintegerThe location of the seller.
customer_idintegerThe customer the barcode belongs to.
is_staff_orderbooleantruewhen the barcode was a staff barcode, so the staff discount applies.currencyCurrencyThe business currency. Amounts in Rewards and Orders are in this currency.
One of
123totalnumberOrder total before Lynked discounts.
discountnumberLynked discount on the order as a whole (for example a value voucher). It is separate from the line discounts in
items[].discount: it does not include them and is not split over the lines.discount_reasonsarray of DiscountReasonWhat makes up the order's
discount. Line discounts have their own reasons initems[].discount_reasons.3 fields
What gave a discount. New values may be added; treat an unknown one as a generic discount.
One of
"voucher""stamp_voucher""stamp_voucher_extra""time_limited_voucher""product_discount_for_all""product_discount_group""multi_buy_discount""customer_condition""staff_member_discount""staff_rule_discount""staff_conditions""staff_supply_price_discount""staff_cash_discount""staff_percentage_scanned_by_seller""undefined"amountnumberThe amount of this discount.
descriptionstringA short text about the discount, as the dashboard shows it.
itemsarray of OrderItem10 fields
idintegerThe line id in Lynked.
external_item_idstring | nullThe line id in your system.
nullfor some orders that came from a POS.skustringcategorystringCategory path, levels separated by
/.product_namestringquantitynumbertotalnumberLine total before Lynked discounts.
discountnumberLynked discount on this line only (for example a stamp voucher or a product discount). The order's
discountis separate and not included here.discount_reasonsarray of DiscountReasonWhat makes up this line's
discount.3 fields
What gave a discount. New values may be added; treat an unknown one as a generic discount.
One of
"voucher""stamp_voucher""stamp_voucher_extra""time_limited_voucher""product_discount_for_all""product_discount_group""multi_buy_discount""customer_condition""staff_member_discount""staff_rule_discount""staff_conditions""staff_supply_price_discount""staff_cash_discount""staff_percentage_scanned_by_seller""undefined"amountnumberThe amount of this discount.
descriptionstringA short text about the discount, as the dashboard shows it.
rewardsarray of OrderRewardRewards this line gave the customer; empty until the order is completed.
3 fields
typeRewardTypeWhat the reward is. New values may be added; treat an unknown one as a generic reward.
One of
"points""point_scale_by_option""point_by_pos_rule""stamp""stamp_by_pos_rule""first_check_in""voucher""bonus_voucher""stamp_voucher""time_limited_voucher""stamp_by_sku"valuenumberHow much of the reward was given — points, stamps, or the value of a voucher; see
type.descriptionstringA short text about the reward, as the dashboard shows it.
rewardsarray of OrderRewardRewards the order as a whole gave the customer; empty until the order is completed. Rewards of a line are in
items[].rewardsand are not repeated here.3 fields
typeRewardTypeWhat the reward is. New values may be added; treat an unknown one as a generic reward.
One of
"points""point_scale_by_option""point_by_pos_rule""stamp""stamp_by_pos_rule""first_check_in""voucher""bonus_voucher""stamp_voucher""time_limited_voucher""stamp_by_sku"valuenumberHow much of the reward was given — points, stamps, or the value of a voucher; see
type.descriptionstringA short text about the reward, as the dashboard shows it.
created_atstring · date-timeupdated_atstring · date-time
Errors
- 401 UnauthorizedError
The API key is missing, invalid or revoked.
3 fields
messagestringWhat went wrong. The text may change; use
error_codein your code.error_codestringMachine-readable code of the problem, for example
api_key_invalid; it does not change within v1. Every error has one:internal_server_erroron a 500,undefinedwhen the error has no specific code yet. See Errors for the list.error_uidstringIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 403 ForbiddenError
The Public API is disabled for this business.
3 fields
messagestringWhat went wrong. The text may change; use
error_codein your code.error_codestringMachine-readable code of the problem, for example
api_key_invalid; it does not change within v1. Every error has one:internal_server_erroron a 500,undefinedwhen the error has no specific code yet. See Errors for the list.error_uidstringIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 422 Unprocessable EntityError
The request is invalid (the body has
errors),seller_idis not an active seller of the business (seller_not_found), or nobody has this barcode (barcode_not_found).3 fields
messagestringWhat went wrong. The text may change; use
error_codein your code.error_codestringMachine-readable code of the problem, for example
api_key_invalid; it does not change within v1. Every error has one:internal_server_erroron a 500,undefinedwhen the error has no specific code yet. See Errors for the list.error_uidstringIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
- 429 Too Many RequestsRateLimitError
More than 120 requests per minute for this business.
HeadersRetry-AfterintegerSeconds to wait before the next request.
4 fields
messagestringWhat went wrong. The text may change; use
error_codein your code.error_codestringMachine-readable code of the problem, for example
api_key_invalid; it does not change within v1. Every error has one:internal_server_erroron a 500,undefinedwhen the error has no specific code yet. See Errors for the list.error_uidstringIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
retry_afterintegerSeconds to wait before the next request; the same value as the
Retry-Afterheader.
- 500 Internal Server ErrorError
Something failed on Lynked's side. Retry later; if it persists, contact Lynked support with the
error_uid.3 fields
messagestringWhat went wrong. The text may change; use
error_codein your code.error_codestringMachine-readable code of the problem, for example
api_key_invalid; it does not change within v1. Every error has one:internal_server_erroron a 500,undefinedwhen the error has no specific code yet. See Errors for the list.error_uidstringIdentifier of this error in Lynked's logs. Quote it when you contact Lynked support.
curl -X POST 'https://api.lynked.ie/api/public/v1/orders' \
-H 'Authorization: Bearer lk_live_...' \
-H 'Idempotency-Key: <unique-key>' \
-H 'Content-Type: application/json' \
-d '{
"seller_id": 311,
"barcode": "lynked_8f3a1c",
"external_order_id": "WEB-1001",
"external_discount": 0,
"items": [
{
"external_item_id": "line-1",
"external_product_id": "prod-55",
"sku": "LATTE-12",
"category": "Drinks/Coffee",
"product_name": "Latte",
"quantity": 2,
"total": 7.6,
"tax": 0.95,
"external_discount": 0,
"supply_price": 1.2
}
]
}'
{
"seller_id": 311,
"barcode": "lynked_8f3a1c",
"external_order_id": "WEB-1001",
"external_discount": 0,
"items": [
{
"external_item_id": "line-1",
"external_product_id": "prod-55",
"sku": "LATTE-12",
"category": "Drinks/Coffee",
"product_name": "Latte",
"quantity": 2,
"total": 7.6,
"tax": 0.95,
"external_discount": 0,
"supply_price": 1.2
}
]
}
HTTP/3 200 OK
Content-Type: application/json
{
"id": 58213,
"external_order_id": "WEB-1001",
"status": "in_progress",
"channel": "public_api",
"seller_id": 311,
"location_id": 27,
"customer_id": 1042,
"is_staff_order": true,
"currency": 2,
"total": 7.6,
"discount": 5,
"discount_reasons": [
{
"type": "voucher",
"amount": 5,
"description": "Value voucher discount applied €5"
}
],
"items": [
{
"id": 91234,
"external_item_id": "line-1",
"sku": "LATTE-12",
"category": "Drinks/Coffee",
"product_name": "Latte",
"quantity": 2,
"total": 7.6,
"discount": 3.8,
"discount_reasons": [
{
"type": "stamp_voucher",
"amount": 3.8,
"description": "Stamp Voucher(Coffee)"
}
],
"rewards": [
{
"type": "points",
"value": 4,
"description": "Points earned"
},
{
"type": "stamp_by_pos_rule",
"value": 2,
"description": "Stamps for Coffee"
}
]
}
],
"rewards": [
{
"type": "first_check_in",
"value": 10,
"description": "First check-in reward"
}
],
"created_at": "2026-11-30T10:00:00+00:00",
"updated_at": "2026-11-30T10:05:00+00:00"
}