Create a Fulfillment Return Order¶
HTTP Request¶
POST /v1/returns
Summary¶
This operation creates a single fulfillment return order. To instead create multiple return orders at once, see Create Bulk Return Orders for Fulfillment.
Request URLs¶
Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/fulfillment/v1/returns
Production: https://shipping-api.pitneybowes.com/shippingservices/fulfillment/v1/returns
Request Headers¶
Name |
Description |
---|---|
Authorization |
Required. OAuth token generated using the Generate an OAuth Token API. |
X-PB-TransactionId |
Required. A unique identifier for the request, up to 25 characters. The following characters are allowed: letters, numbers, hyphens ( Important: Ensure this is a unique ID. |
Request Elements¶
Required fields are marked Required. All other fields are optional.
Name |
Data Type |
Description |
---|---|---|
clientId |
String |
Required. The client ID assigned by Pitney Bowes. |
brand |
String |
The manufacturer’s brand name for the item. Maximum length: 30 characters |
orderId |
String |
The Pitney Bowes ID for the original order. |
returnClientOrderId |
String |
The client ID for the fulfillment return order. Maximum length: 50 characters |
originalClientOrderId |
String |
The client ID for the original order. |
rmaNumber |
String |
The client’s RMA number for the return. The RMA number (Return Merchandise Authorization number) is used as a tracking number for parcel being returned to the fulfillment center. Maximum length: 35 characters |
references |
Array[Object] |
Additional reference information for the order. Each object in the array is a name-value pair that defines a reference field and value. |
references.name |
String |
The name of the reference field, up to 50 characters. |
references.values |
String |
The value, up to 255 characters |
createDate |
String |
The date and time the fulfillment return order was created in the client system, specified in the ISO 8601 format: |
updateDate |
String |
The date and time the fulfillment return order was updated in the client system, specified in the ISO 8601 format: |
node |
String |
The Pitney Bowes Fulfillment Center where the return is expected to be processed. |
fromAddress |
The address of the consumer who is sending back the package. |
|
shippingDetails |
The carrier details for the fulfillment return order. |
|
returnOrderCurrency |
String |
The default currency for the item-level costs. |
returnOrderLines |
Array[Return Order Lines Object] |
The items included in the return order. Each item is a different object in the array. |
returnReason |
Array[String] |
The reasons for the return order. |
Response Elements¶
Name |
Data Type |
Description |
---|---|---|
clientId |
String |
The client ID assigned by Pitney Bowes. |
brand |
String |
The manufacturer’s brand name for the item, up to 30 characters. |
orderId |
String |
The Pitney Bowes ID for the original order. |
returnClientOrderId |
String |
The client ID for the fulfillment return order, up to 50 characters. |
originalClientOrderId |
String |
The client ID for the original order. |
returnOrderId |
String |
The Pitney Bowes ID for the fulfillment return order. |
rmaNumber |
String |
The client’s RMA number for the return. The RMA number (Return Merchandise Authorization number) is used as a tracking number for parcel being returned to the fulfillment center, up to 35 characters. |
references |
Array[Object] |
Additional reference information for the order. Each object in the array is a name-value pair that defines a reference field and value. |
references.name |
String |
The name of the reference field, up to 50 characters. |
references.values |
String |
The value, up to 255 characters |
createDate |
String |
The date and time the fulfillment return order was created in the client system, specified in the ISO 8601 format: |
updateDate |
String |
The date and time the fulfillment return order was updated in the client system, specified in the ISO 8601 format: |
pbCreateDate |
String |
The date and time Pitney Bowes receives information about the fulfillment return order, specified in the ISO 8601 format: |
pbUpdateDate |
String |
The date and time Pitney Bowes receives updated information about the fulfillment return order, specified in the ISO 8601 format: |
node |
String |
The Pitney Bowes Fulfillment Center where the return is expected to be processed. |
fromAddress |
The address of the consumer who is sending back the package. |
|
shippingDetails |
The carrier details for the fulfillment return order. |
|
returnOrderCurrency |
String |
The default currency for the item-level costs. |
returnOrderLines |
Array[Return Order Lines Object] |
The items included in the return order. Each item is a different object in the array. |
returnReason |
Array[String] |
The reasons for the return order. |
Sample Request¶
curl -X POST ".../v1/returns" \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-TransactionId: <unique_identifier>" \
-d '
{
"clientId": "1234",
"orderId": "1122-3344",
"returnClientOrderId": "R87654",
"originalClientOrderId": "1122-6789",
"rmaNumber": "RMAabc12345678",
"node": "160",
"fromAddress": {
"name": "John Smith",
"company": "ABC Co",
"phone": "334-000-0000",
"email": "john@example.com",
"addressLines": [
"2352 Bent Creek Rd"
],
"cityTown": "Auburn",
"stateProvince": "AL",
"postalCode": "36830",
"countryCode": "US"
},
"shippingDetails": {
"carrier": "FedEx",
"serviceId": "STD",
"serviceName": "STANDARD",
"trackingNumber": "FX12345678901"
},
"returnOrderCurrency": "USD",
"returnOrderLines": [ {
"orderLineId": 1,
"itemDetail": {
"sku": "02010506",
"unitPrice": 50,
"description": "Sport Relaxed Hoodie"
},
"lineTotal": 100,
"returnReason": [
"Wrong Size"
],
"quantity": 1
},
...
],
"returnReason": [
""
]
}'
Sample Response¶
{
"clientId": "1234",
"orderId": "1122-3344",
"returnClientOrderId": "R87654",
"originalClientOrderId": "1122-6789",
"returnOrderId": "RTA000565025655754752US",
"rmaNumber": "RMAabc12345678",
"references": [],
"createDate": "2022-02-09T10:48:44Z",
"pbCreateDate": "2022-02-09T16:41:45-07:00",
"node": "160",
"fromAddress": {
"name": "John Smith",
"company": "ABC Co",
"phone": "334-000-0000",
"email": "john@example.com",
"addressLines": [
"2352 Bent Creek Rd"
],
"cityTown": "Auburn",
"stateProvince": "AL",
"postalCode": "36830",
"countryCode": "US"
},
"shippingDetails": {
"carrier": "FedEx",
"serviceId": "STD",
"serviceName": "STANDARD",
"trackingNumber": "FX12345678901"
},
"returnOrderCurrency": "USD",
"returnOrderLines": [ {
"orderLineId": 1,
"itemDetail": {
"sku": "02010506",
"unitPrice": 50.0,
"description": "Sport Relaxed Hoodie"
},
"lineTotal": 100.0,
"returnReason": [
"Wrong Size"
],
"quantity": 1
},
...
],
"returnReason": [
"Return Reason Code"
],
"returnType": "INBOUND"
}
Error Codes¶
For lists of error codes returned by the Fulfillment APIs, please see 80-Prefix Error Codes (Fulfillment APIs).