Requests a new return label for a shipped order, the same way the Request return label button in the Hive app does: the label is for the shipment the Hive app uses (the heaviest delivered shipment, or the heaviest shipment when none is delivered yet), the carrier is chosen from your return settings, and once the label is ready a return is created with status on_the_way. The request takes no body; a body sent anyway is ignored.
Every call creates a new label, unless it repeats an Idempotency-Key (below). The response is 202 with the new label in status pending, and the Location header points at it; poll it with GET until its status is ready or failed. The label's id does not change. A repeated call without a key creates another label, so to read a label again, follow its Location or list the order's labels with GET /orders/{id}/return_labels.
Retrying safely. To retry a call whose response you did not get (a dropped connection, a timeout or a 5xx) without creating a second label, send an Idempotency-Key header and repeat the same key in the retry. A call with a key already used on this order creates nothing and answers with the label that key created, whatever the order looks like now and even when it has reached the label limit: 202 with Location while the label is pending, 200 once it is ready or failed. Keys are compared within one order, so the same key on another order requests a label for that order. A failed label stays the answer for its key; use a new key to request a new label.
Up to 5 labels per order, as in the Hive app. The count includes the order's labels that have a return, from any source (the Hive app, this API, the customer returns portal) and including labels whose return was cancelled, plus the labels this API is still creating. Labels whose creation failed do not count, and a label printed into the parcel at packing counts only once a return is recorded for it. Concurrent calls for the same order wait for each other, so together they never exceed the limit.
Creation usually takes a few seconds. A label that still has no tracking number 15 minutes after the call that requested it becomes failed with the code carrier_timeout.
When the label cannot be requested, the response is 422 with errors keyed by one of these codes:
not_returnable: the order has not shipped yet, or is cancelled.customs_required: the order crossed a customs border, so a return label cannot be created for it.no_return_method: no return delivery method in your return settings covers the route and weight of the label's shipment.label_limit_reached: the order already has 5 return labels, counted as described above.missing_customs_data: the return needs customs data that some products lack (HS code, country of origin, declared value).other: any other reason, for example a carrier contract missing from your settings.
Optional key you choose for this request, 1 to 255 characters, for example a UUID. A call that repeats a key already used on the same order answers with the label the first call created instead of creating another. An empty key or one longer than 255 characters is refused with 400.
- Mock serverhttps://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/orders/{id}/return_labels
- Production APIhttps://app.hive.app/merchant_api/v2/orders/{id}/return_labels
- Staging APIhttps://staging.app.hive.app/merchant_api/v2/orders/{id}/return_labels
curl -i -X POST \
'https://developers.hive.app/_mock/merchant-api-v2/mapi_v2_oas31/orders/{id}/return_labels' \
-H 'Authorization: Bearer <YOUR_token_HERE>' \
-H 'Idempotency-Key: string'The call repeats the Idempotency-Key of an earlier call on this order, whose label is ready or failed; nothing was created. Read the label's PDF with GET /orders/{id}/return_labels/{label_id}
Name of the carrier that issues the label, known from the moment the label is requested. A return created from this label reports the same value as its carrier
Hive's unique identifier of the return label. It stays the same from the moment the label is requested
ID of the return the label belongs to, readable with GET /returns/{id}. null while the label is not ready, and for a label printed into the parcel at packing until a return is recorded for it
ID of the shipment the label returns. null only for some labels created before 2024
pending while the label is being created at the carrier, ready once it has a tracking number and a document, failed when it could not be created (see error). Labels from other sources than this API are always ready
{ "carrier": "DHL DE", "created_at": "2026-10-06T09:12:44.512Z", "error": null, "id": 987654, "return_id": 456789, "shipment_id": 4567890, "status": "ready", "tracking_code": "01155036675081" }