Create a staff cash barcode
/staff/{id}/cash-barcodesA one-off barcode that spends cash of the staff member's cash balance, together with the
staff discount of barcode. Use it at a till or as the barcode of
Create an order; the cash is taken off the balance when
that order is completed. Works only when the business allows staff cash.
Path parameters
idintegerRequiredThe staff member id.
Headers
Idempotency-Keystring · uuidA UUID (any version; UUIDv7 recommended) that makes a retry of this request safe. See the Idempotency guide.
Request body
2 fields
cashnumberRequiredHow much staff cash the barcode spends; at most the staff member's
cash_balance.greater than 0
barcodestringOne of the staff member's barcodes; its staff discount comes with the cash. Left out, the main barcode.
max 255 characters
Responses
Success
- 201 CreatedBarcode
The barcode.
1 field
codestringThe value to show as a Code 128 barcode.
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.
- 404 Not FoundError
The resource does not exist or does not belong to 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), the business does not allow staff cash (staff_cash_not_allowed),cashis more than the balance (insufficient_cash_balance), orbarcodeis not one of the staff member's (staff_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/staff/{id}/cash-barcodes' \
-H 'Authorization: Bearer lk_live_...' \
-H 'Idempotency-Key: <unique-key>' \
-H 'Content-Type: application/json' \
-d '{
"cash": 5,
"barcode": "STF_4821"
}'
{
"cash": 5,
"barcode": "STF_4821"
}
HTTP/3 201 Created
Content-Type: application/json
{
"code": "lynked_aB3dE9xYz"
}