Returns Label Generation API
{return_reference_number}
Authentication
This API facilitate the creation of returns and the generation of corresponding shipping labels.
By accepting specific details about the order, such as the order number, and the return cart information, it is able to produce a shipping label.
The required customer information is derived from the order details, which are integrated with Narvar, either through a custom Order Management System (OMS) or an Order API ingestion process.
Should the return label creation be successful, the response from the API will contain a link to access the shipping label. Conversely, if the label generation fails due to particular reasons, the API will provide appropriate error messages
Service Endpoints
- QA: ws-qa01.narvar.qa
- Staging: ws-st01.narvar.qa
- Production: ws.narvar.com
Authentication The REST API requests are sent over TLS and secured by HTTP Basic Authentication.
Request body
Please refer to the “Request” link for more information.
Examples
{
"order_number": "784313102",
"rma_number": "1000000641",
"carrier": "fedex",
"billing_zip": "221212",
"email": "abc@narvar.com",
"order_items": [
{
"quantity": "1",
"sku": "190041535590",
"return_reason_code": "SMSIZE",
"return_reason_comment": "does not fit for"
}
]
}
Responses
Success response
Body
Please refer to the “Response” link for more information.
Examples
Denotes an example of successful return
{
"status": "SUCCESS",
"messages": [
{
"code": "response.status.success",
"message": "Label Returned"
}
],
"return_reference_number": "J08eGNjJPkKNwq49",
"order_number": "00268003",
"rma_number": "1000003089",
"return_methods": [
{
"type": "MAIL",
"carrier": {
"name": "UPS"
},
"label_url": "https://returns.narvar.com/returns/testretailer/viewlabel?return_id=J08eGNjJPkKNwq49",
"tracking_number": "1Z301Y939007701991",
"tracking_url": "https://tracking.narvar.com/testretailer/tracking/ups?tracking_numbers=1Z301Y939007701991&order_number=testorder&type=ret&locale=en_US",
"qr_code_url": "https://s3/qrcode/b07af26a-b208-4e83-b3f6-544a33422f9.jpg"
}
]
}
Bad request. Params are missing or invalid.
Body
Examples
Denotes an example of failed response return
{
"status": "FAILURE",
"messages": [
{
"code": "inv.request",
"message": "Invalid Request. Params are missing."
}
]
}
With mandatory attributes
curl -X POST "https://ws.narvar.com/api/v1/returns/labels/generate" \
--header 'Authorization: Basic AYFQYTASJJATYNA61S881S81='
--header "Content-Type: application/json" \
--d '{
"order_number": "1221211",
"order_items": [
{
"quantity": 1,
"return_reason_code": "TEST",
"sku": "12312123"
}
]
}'
With All values
curl 'https://returns.narvar.com/api/v1/returns/labels/generate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic AADDAG=' \
--d '{
"order_number": "784313102",
"rma_number": "1000000641",
"carrier": "fedex",
"billing_zip": "221212",
"order_items": [
{
"quantity": 1,
"sku": "190041535590",
"return_reason_code": "SMSIZE",
"return_reason_comment": "does not fit for"
}
]
}'
{return_reference_number}
Authentication
The purpose of this API is to fetch labels associated with orders that have been returned using Narvar’s platform.
The API requires the return_reference_number as input, serving as a unique identifier for locating the label.
The response from the API will provide a link that can be used to access the URL leading to the label.
Path variables
Request parameters
A unique return reference number from the narvar returns. e.g The unique return reference number from Narvar returns can be sourced through the Generate Return Labels API call
Responses
Body
Examples
{
"status": "SUCCESS",
"messages": [
{
"code": "response.status.success",
"message": "Label Returned"
}
],
"return_reference_number": "J08eGNjJPkKNwq49",
"order_number": "00268003",
"rma_number": "1000003089",
"return_methods": [
{
"type": "MAIL",
"carrier": {
"name": "UPS"
},
"label_url": "https://returns.narvar.com/returns/testretailer/viewlabel?return_id=J08eGNjJPkKNwq49",
"tracking_number": "1Z301Y939007701991",
"tracking_url": "https://tracking.narvar.com/testretailer/tracking/ups?tracking_numbers=1Z301Y939007701991&order_number=testorder&type=ret&locale=en_US",
"qr_code_url": "https://s3/qrcode/b07af26a-b208-4e83-b3f6-544a33422f9.jpg"
}
]
}
Body
This request encompasses order details, items within the order, RMA (Return Merchandise Authorization) specifications, and the justifications for the return.
The order number associated with the return.
The return merchandise authorization (RMA) number, that would be associated with the return created
If the Rule method evaluation yields multiple carriers for the return method, the carrier value is then used as a filter criterion.
If the billing_zip is supplied, it will be cross-checked with the order information.
The items in the order to be returned.
Contains items that require return, accompanied by a justification for the return reason specified for each item
The quantity of the item to be returned.
If the item is uniquely distinguished by its item_id, then this value must be provided.
The code indicating the reason for the return. Retailer reason code as configured in the HUB
User comments captured
The SKU (stock keeping unit) identifier for this item.
The response confirms a successful/failure transaction, denoted by the status. Relevant details about the order, including a unique return order number and RMA number, are presented.
The response also provides methods for return, specifying the type and associated carrier. Additionally, provides URLs for return labels, tracking, and a QR code, as applicable.
Status of response
Arrays of resaons for the failure
A unique Narvar return_reference_number which can be used to retrieve the label later.
Return order number. Should be same as passed in the request
A distinct rma_number associated with the return. If provided in the request, it must correspond accurately
Carrier type for the return
URL to access label.
Tracking number of the returns package(s).
URL to track return on Narvar experience.
Link to the generated QR code. This will be populated only when retun method of type is evaluated to Printerless/QR code generation
Carrier details
Name of the Carrier
Property constant that can be used for message localization
Missing or Invalid Order number
Missing order items
Missing/Invalid item sku
Missing/Invalid item quantity
Description of the error in English
{
"status": "FAILURE",
"messages": [
{
"code": "inv.request",
"message": "Invalid Request. Params are missing."
}
]
}
Status value of the Error
JSON object array of type “messages”.