Returns Label Generation API

The Returns Label API is a RESTful service focused on creating return shipping labels. By receiving specific order details as input, this API generates a shipping label and provides a link for accessing it. End users can also obtain the shipping label through a unique link that is included in the API's output.
Returns
POST /api/v2/returns
GET /api/v2/returns/labels/{return_reference_number}
Generate Return Labels API V2
POST https://ws.narvar.com/api/v2/returns

Authentication

BasicAuth

The Return Creation API lets users start returns on the Narvar platform. It can also generate shipping labels for these returns, depending on the return details…

This API needs few key details about the order and return to work well. It mainly uses the order number to identify the specific order and return cart information to know about the items and why they’re being returned. The API can easily get customer details from the order info already on the platform. This order info can come from a custom Order Management System or directly from Narvar’s own order system.

If the return is initiated successfully, the API provides a link to view the shipping label, if one was generated. However, if there are any errors, particularly during label creation, the API will detail the error, aiding in troubleshooting.

Service Endpoints

Authentication The REST API requests are sent over TLS and secured by HTTP Basic Authentication.

Request body

application/json

Responses

200 200

Success response

Body
application/json
400 400

Bad request. Params are missing or invalid.

Body
application/json
401 401

Unauthorized. Credentials may be invalid. Reachout out to Narvar support

Retrieve Label
GET https://ws.narvar.com/api/v2/returns/labels/{return_reference_number}

Authentication

BasicAuth

This API can be leveraged to extract return labels that are associated with orders processed through the Narvar platform.

When users initiate a return on the Narvar platform, each return is assigned a unique “return_reference_number”. This number serves as an integral identifier to ensure the correct linkage between the return and its associated label. By inputting this return_reference_number into the API, it will retrieve the corresponding label.

Once a request is made, the API searches for the label tied to the provided return_reference_number. Upon finding a match, the API responds with a dedicated link. This link not only provides direct access to the label’s URL but also ensures that users can easily view, download, or print the label for their return package

Path variables

return_reference_number
string required

Request parameters

return_reference_number
string required

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

200 200

OK

Body
application/json
400 400

400

Body
application/json
401 401

Unauthorized. Credentials may be invalid. Reachout out to Narvar support

Type Definitions
Carrier
Object
name
string

Name of the Carrier

Example:
UPS
Types: ReturnMethod
ErrorResponse
Object
Example:
{
  "status": "FAILURE",
  "messages": [
    {
      "code": "inv.request",
      "message": "Invalid Request. Params are missing."
    }
  ]
}
status
string

Status value of the Error

Enumeration:
FAILURE
Example:
FAILURE
messages
Array of Message

JSON object array of type “messages”.

Message
Object
code
string

Property constant that can be used for message localization

Enumeration:
invalid.return.label.order
invalid.return.label.items
invalid.return.label.items.sku
invalid.return.label.items.quantity
message
string

Description of the error in English

OrderItem

Contains items that require return, accompanied by a justification for the return reason specified for each item

Object
quantity
number required

The quantity of the item to be returned.

Example:
1
item_id
string

If the item is uniquely distinguished by its item_id, then this value must be provided.

Max length: 100
return_reason_code
string required

The code indicating the reason for the return. Retailer reason code as configured in the Narvar hub

Example:
1
customer_comment
string

User comments captured

Max length: 255
sku
string required

The SKU (stock keeping unit) identifier for this item.

Max length: 100
ReturnMethod
Object
properties
type
string

Describes the type for the return

Example:
MAIL
label_url
string

URL to access label, if a label is assocaited with a return

Example:
https://returns-narvar.com/returns/retailer/viewlabel?return_id=gbZ1AoqzlP1QABRmO
tracking_number
string

Tracking number of the returns package(s).

tracking_url
string

URL to track return on Narvar experience.

qr_code_url
string

Link to the generated QR code. This will be populated only when retun method of type is evaluated to Printerless/QR code generation

carrier
additional properties
string
ReturnRequestBody

This request includes details of the order, items in the order, RMA (Return Merchandise Authorization) guidelines, and the reasons for the return.

Object
order_number
string required

The order number associated with the return.

Min length: 1
Max length: 50
Example:
123456789
locale
string

The ISO3 locale linked to the return. During return creation, settings specific to this locale will be applied, if set up. Defaults to en_US if not provided.

Example:
en_US
rma_number
string

The return merchandise authorization (RMA) number, that would be associated with the return created. If not provided, it will levegae the Narvar RMA generator, if configured or assign RA as default RMA number

Max length: 255
carrier
string

The specified carrier name to be used for the return must be set up on the Narvar platform. The system defaults to using Narvar’s predefined rules for the retailer to identify the suitable carrier for mail type returns. In cases where rule assessment suggests multiple carrier options, the provided carrier value acts as a selection filter.

Enumeration:
ups
fedex
usps
dhl
postal_code
string

When supplied, the billing zip associated with the order will be cross-checked against the order’s details. In the case of a gift return, the given postal code will be compared with the order’s shipping zip.

order_items
Array of OrderItem required

The items in the order to be returned.

customer_email
string

The email linked to the order. If provided, it will be verified against the order details.

Example:
test@test.com
return_type
string

The return type categorization directs the route for a client’s specific return process. If not specified, the default action is the generation of a mail return label.

Enumeration:
return
lost
refused
delivery-exception
gift_return
boolean

When set to true, it signifies the processing of a gift return. The postal_code of the originally shipped order should be supplied.

SuccessResponse

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.

Object
status
string

Status of response

Enumeration:
SUCCESS
FAILURE
messages
Array of Message

Arrays of resaons for the failure

return_reference_number
string

A unique Narvar return_reference_number which can be used to retrieve the label later.

order_number
string

Return order number. Should be same as passed in the request

rma_number
string

A distinct rma_number associated with the return. If provided in the request, it must correspond accurately

return_methods
Array of ReturnMethod