Skip to main content
POST
Finalize Items

Authorizations

X-Authorization
string
header
required

Headers

X-Shop-Id
integer

The unique identifier of the shop associated with the draft return.

This header is not required, as the merchant's shop is identified by the API key present in the request.

Accept
enum<string>

Optional. Responses use Content-Type: application/prs.hal-forms+json. Ignored on 2026-10 and later. On earlier versions, send it to receive HAL-Forms, and it is required for GET /draft-returns (List).

Available options:
application/prs.hal-forms+json
X-Loop-Locale
string

The shopper's locale: a two-letter language code with an optional two-letter region, for example fr or fr-CA.

When the value is valid and product translations are enabled for the shop, the response includes translated product text in the operation's translated fields. Otherwise those fields are not populated.

Example:

"fr-CA"

X-Loop-Shopper-Token
string

Shopper-portal only. The shopper_token from a shopper-portal draft response. Required on shopper-portal requests that include a draft return id. A missing, empty, or non-matching value returns 404. Merchant public API requests ignore this header.

Path Parameters

draft_return_id
integer
required

The unique identifier of the draft return.

Response

Successful response with draft return data.

The response uses Content-Type: application/prs.hal-forms+json and includes hypermedia controls in _links and _templates instead of the standard links array.

HAL _links object. Always includes self. Other keys are relation names corresponding to available actions for the current draft return state.

_templates
object

_templates object. Each key is a template/action name matching a relation in _links. Templates describe the method, fields, and constraints for the action.

client_application
object

Client-application header specification. Describes how the client should identify itself in subsequent requests.

shopper_token
string

Shopper-portal only. Present on shopper-portal draft responses. Send this value as X-Loop-Shopper-Token on later shopper-portal requests that include a draft return id. Merchant public API responses omit this field.

draft_return
object

The draft return object.

context
object

Contextual data for building the return UI. Keys are omitted when their value is null.

errors
object[]

An array of error codes. In the event of a partial failure, the API will return all possible data as well as any error codes that were thrown.

See Error codes for a full list of possible errors.