Skip to content

Orders API

Report orders so video and QR sales are attributed. All requests need a secret key; see REST API for keys, errors and limits.

Report a placed order

POST /v1/orders

Report a placed order (idempotent per site and externalOrderId) and attribute it to Lumieo sessions

Body

NameTypeDescription
currencyrequiredstring
externalOrderIdrequiredstring1 to 200 characters
linesrequiredlist of objectup to 500 items
siteIdrequiredid
totalMinorrequiredintegerThe whole order total, in minor units.
orderedAtdate-timeWhen the order was placed; defaults to now.
Terminal window
curl -X POST https://api.loomieo.com/v1/orders \
-H "Authorization: Bearer $LUMIEO_KEY" \
-H "Content-Type: application/json" \
-d '{"currency":"…","externalOrderId":"…","lines":[],"siteId":"0193…","totalMinor":1}'

Response 200

NameTypeDescription
orderrequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: forbidden, out_of_scope
  • 404: site_not_found
  • 422: validation_failed
  • 429: rate_limited

Refund part of a reported order

POST /v1/orders/{externalOrderId}/refunds

Refund part of a reported order (idempotent per externalRefundId); reduces attributed revenue

Parameters

NameInTypeDescription
externalOrderIdrequiredpathstring1 to 200 characters

Body

NameTypeDescription
amountMinorrequiredintegerThe refunded amount, in minor units.
externalRefundIdrequiredstringThe host's refund id: a retried refund applies once. 1 to 200 characters
siteIdrequiredid
lineslist of objectThe refunded lines; their amounts on directly attributed lines come off direct revenue. up to 500 items
refundedAtdate-time
Terminal window
curl -X POST https://api.loomieo.com/v1/orders/:externalOrderId/refunds \
-H "Authorization: Bearer $LUMIEO_KEY" \
-H "Content-Type: application/json" \
-d '{"amountMinor":1,"externalRefundId":"…","siteId":"0193…"}'

Response 200

NameTypeDescription
orderrequiredobject
Errors
  • 400: bad_request
  • 401: auth_unauthenticated
  • 403: forbidden, out_of_scope
  • 404: order_not_found, site_not_found
  • 422: validation_failed
  • 429: rate_limited