Generate Label
Queue label generation for a return. This endpoint triggers an asynchronous label generation process for the specified return.
Required API key scope
- Returns
Retrieving the Generated Label
After the label generation is queued (202 response), the label will be processed asynchronously. Once generation is complete, you can retrieve the label data by calling the Get Return Details endpoint:
GET /warehouse/return/details?return_id={returnId}
The response will include a labels array containing the generated label with:
url: The link to the shipping label PDFtracking_number: The tracking number for the shipmentcarrier: The shipping carrier (e.g., USPS, UPS)status: The current status of the labelrate: The shipping cost
Successful Response
Returns HTTP 202 (Accepted) when the label generation has been successfully queued.
Error Responses
- 404 Not Found (
return_not_found): The specified return does not exist - 409 Conflict (
label_already_exists): A label has already been generated for this return - 422 Unprocessable Entity (
return_cannot_receive_label): The return is not in a valid state to receive a label - 422 Unprocessable Entity (
label_generation_failed): A previous label generation attempt failed - 500 Internal Server Error (
internal_error): An unexpected error occurred
Documentation Index
Fetch the complete documentation index at: https://docs.loopreturns.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The unique identifier for the return, created by Loop.
12345