Real-time API Connection for Returns
This page defines the retailer-facing returns API contract: a GET order endpoint plus POST lifecycle endpoints to register/update, cancel, and close returns, all linked by one stable UUID return ID ac
Real-time API Connection for Returns
Returns Portal Retailer API Contract

This document is written for retailers integrating a returns experience.
In step 1, you provide a GET endpoint that parcelLab fetches from.
In steps 2–4, you provide POST endpoints that parcelLab calls with return lifecycle updates.
1. Fetch Order Data
parcelLab requests order data from your system so return eligibility, return-window logic, and line-item selection can be evaluated. The rules for this live in parcelLab, you provide the order data.
Endpoint you provide
Method:
GETExample path:
/orders/{order_reference}
Required request input parcelLab sends to your GET endpoint
order_reference
string
Shopper-facing order number
Recommended response fields your GET endpoint should return
order_reference
string*
Lookup correlation
order_id
string
Stable retailer order id for downstream updates
order_date
datetime*
Return-window fallback
order_shipping_date
datetime
Return-window fallback
order_delivery_date
datetime
Primary return-window date
currency
string*
Monetary calculations
order_total_amount
number*
Financial context
order_shipping_amount
number
Shipping refund/fee logic
order_tax_amount
number
Tax-aware calculations
customer_email
string*
Identity and communication
customer_phone
string
Optional secondary identity/contact
customer_address
object*
Postal verification and return context
fulfillments
array
Shipment-level status/tracking context
line_items
array*
Returnable item data
tags
array[string]
Optional policy segmentation
additional_properties
object
Optional custom metadata
Recommended fields inside each line item
line_item_id
string*
Stable item id across all lifecycle events
order_line_id
string
Original order-line reference (if different)
sku
string*
Product matching and targeting
product_id
string
Product-level grouping
variant_id
string
Variant-level matching
item_name
string*
Shopper display
item_category
string
Policy targeting
item_image_url
string*
Shopper display
ordered_quantity
integer*
Max returnable quantity
already_returned_quantity
integer
No longer returnable quantity
unit_price
number*
Refund estimate
line_tax_amount
number
Tax-aware estimate
tags
array[string]
Optional item-level segmentation
additional_properties
object
Optional item-level metadata
2. Register or Update RMA (incl. ASN)
parcelLab sends return submission or update payloads so your system can create or update the retailer return request. This does include tracking data for your warehouse ASN.
Endpoint you provide
Method:
POSTExample path:
/rma/register_or_update
Required payload sections parcelLab sends to your POST endpoint
Identity
order_reference, order_id, rma_reference, return_registration_id
Timing & method
submitted_at, refund_method
Return lines
line_item_id, return_quantity, return_reason_code, reason_note, compensation_type
Return labels
labels[] with carrier_code, tracking_number, is_free_label, label_cost_amount
Shipping fees
refund_shipping_fees, shipping_fee_deduction
Refund estimate
base_amount, tax_amount, label_cost, net_amount, final_amount, currency
Metadata
tags, additional_properties, idempotency_key (same UUID as return_registration_id)
3. Cancel RMA
parcelLab sends cancellation updates when a return is cancelled. This is only possible for returns that are not yet closed.
Endpoint you provide
Method:
POSTExample path:
/rma/cancel
Required payload fields parcelLab sends to your cancel POST endpoint
rma_reference
yes
Return to cancel
order_reference
yes
Shopper-facing order number
order_id
yes
Retailer order id
return_registration_id
yes
UUID lifecycle id from register/update
cancel_reason_code
yes
Structured cancellation reason
cancel_reason
yes
Human-readable reason
cancelled_at
yes
Cancellation timestamp
idempotency_key
yes
Same UUID as return_registration_id
tags
no
Optional segmentation
additional_properties
no
Optional metadata
4. Close Return
parcelLab sends finalization updates when a return should be closed, i.e. the refund should be settled and any exchanges released.
This step is optional if your WMS can issue refunds within your system.
Endpoint you provide
Method:
POSTExample path:
/rma/close
Required payload fields parcelLab sends to your close POST endpoint
rma_reference
yes
Return to close
order_reference
yes
Shopper-facing order number
order_id
yes
Retailer order id
return_registration_id
yes
Same UUID lifecycle id from register/update
trigger_refund
yes
Finalization refund decision
release_exchange_items
yes
Exchange release/finalization decision
refund_shipping_fees
yes
Shipping refund decision
status_reason
yes
Closing reason
idempotency_key
yes
Same UUID as return_registration_id
tags
no
Optional segmentation
additional_properties
no
Optional metadata
Last updated
Was this helpful?