Order API
Returnloop needs to see an order when a customer starts a return. Instead of sending us every order, you let us ask for one: when a customer types an order number and email, Returnloop asks you for that order and keeps the answer. Old orders work from day one and nothing needs syncing. Connect it under Integrations, Order source.
Pick whichever fits where your orders live; several can be connected and the first that knows the order answers. Pushing orders to POST /v1/orders keeps working alongside.
Business Central
No endpoint to build: Returnloop reads posted sales invoices over Business Central's standard API, with an Entra app you register. Setup steps are on the integration itself. A posted invoice counts as a shipped order; its external document number or order number is what the customer types, and its email must match. Product names, sizes and images come from your product feed when the SKU is in it, otherwise from the line description.
An order lookup you already have
If your shop already answers GET …?orderNo= with Business Central style order JSON (OrderNo, ShippingContact, SalesLines and so on), point Returnloop at that endpoint and choose the order lookup format. Nothing to rebuild. Returnloop checks that the customer's email matches the order itself, and reads the tariff code and country of origin on each line for customs on returns from outside the EU.
Your own endpoint
One https endpoint. Returnloop sends POST with Content-Type: application/json, your key as Authorization: Bearer <key>, and this body:
{ "order_number": "WK-100234", "email": "<what the customer typed>" }- Found, and the email is that order's customer:
200with the order, as below (bare, or as{ "data": … }). - No such order, or the email does not match:
404. Never answer another customer's order: Returnloop checks too, but your endpoint is the first line. - Answer within 8 seconds. Errors are shown on the integration in Returnloop, and orders already seen keep working.
Money is in minor units (öre, cents) including VAT. discount_minor is for the whole line. Only shipped orders need to be found: an order cannot be returned before it ships.
shipping is optional, and so is each field in it. carrier (your carrier code or name) and service preselect the same carrier for the return. pickup_point is the service point or locker the order was delivered to; when the return goes by a carrier that lets the customer pick a locker, that one is preselected if the carrier lists it. method_name is shown on the review step when the customer exchanges, as how the new items are delivered. A mapped endpoint fills the same fields with the Delivery targets; the order lookup format reads ShippingAgentCode and ShippingAgentServiceCode into carrier and service.
{
"external_id": "100234",
"order_number": "WK-100234",
"order_type": "regular",
"placed_at": "2026-10-18T09:12:00Z",
"shipped_at": "2026-10-19T15:40:00Z",
"delivered_at": null,
"customer": { "email": "<customer email>", "name": "<customer name>", "country_code": "SE" },
"currency": "SEK",
"total_minor": 289800,
"shipping_address": {
"name": "<name>", "line1": "<street>", "postal_code": "<postal code>", "city": "<city>",
"country_code": "SE", "phone": "<phone>", "email": "<customer email>"
},
"shipping": {
"carrier": "<carrier code>", "service": "<service code>", "method_name": "<delivery option at checkout>",
"pickup_point": { "id": "<carrier's point id>", "name": "<point name>", "address": "<point address>" }
},
"items": [
{
"id": "10000",
"product_id": "178682-011",
"sku": "178682-011-003",
"ean": null,
"product_name": "Emily blouse",
"brand": "Farm Rio",
"qty": 1,
"unit_price_minor": 209900,
"discount_minor": 62970,
"attributes": { "size": "M", "color": "Offwhite" },
"image_url": "<image url>"
}
]
}Test connection in Returnloop asks for an order number that cannot exist and expects 404.
A BigQuery view
If your orders are in BigQuery, make a table or view with one row per order line, order fields repeated on every line, and these column names. Returnloop reads it with a service account you create, filtered to one order number and email, as query parameters. Cluster a table on order_number, email to keep each lookup fast and cheap.
order_number | The number the customer types. Required. |
email | The customer's email. Required; matched without regard to case. |
customer_name | Required. |
phone | Optional; carriers text the drop-off code to it. |
placed_at, shipped_at, delivered_at | Dates or timestamps. shipped_at starts the return window. |
currency, country_code | ISO codes: SEK, SE. |
ship_name, ship_line1, ship_line2, ship_postal_code, ship_city | Where the order went: carriers collect the return from here. |
tracking_number | Optional, the outbound parcel. |
line_id | Unique per line within the order. |
sku, product_id, product_name, brand, size, color, ean, image_url | The item. sku and product_name are required. |
qty | Units on the line. |
unit_price, discount | Major units with VAT: 2099 and 629.70. discount is for the whole line. |
order_type | Optional: regular (default), giveaway, sampling, compensation, exchange. |
exclusion_flags | Optional, comma separated: final_sale, underwear and so on. |
The service account needs BigQuery Job User on its project and BigQuery Data Viewer on that one dataset. If a view reads other datasets, authorize the view there instead of widening the account.