Returns Guide

This guide will go over key information regarding the handling of returns in the FlavorCloud API. By the end of this guide, you will be able to rate and create returns shipments using the FlavorCloud API. For a more granular look at returns and calls and endpoints, see our API reference.

Before starting, you will need to sign up for a FlavorCloud account.

Rating Return Shipments

POST - https://partnerapi.flavorcloud.com/Shipments

Rating return shipments via FlavorCloud is easy. Simply pass the IsReturn parameter as “Y”.

Example

Request

{

"AppID": "{{AppID}}",

"RestApiKey": "{{RestApiKey}}",

"Reference": "TestOutbound2",

"WeightUnit": "LB",

"Currency": "USD",

"IsReturn": "Y",

"DimensionUnit": "IN",

"Insurance": "N",

"ShipFromAddress": {

"Name": "Flavorcloud",

"AttentionName": "Jake Krachman",

"AddressLine1": "200 Townsend Street",

"City": "San Francisco",

"Country": "US",

"State": "US",

"Zip": "94107",

"Phone": "5555555555",

"Email": "jake.krachman@flavorcloud.com"

},

"ShipToAddress":{

"Name": "Company Name",

"AttentionName": "Reciever Name",

"AddressLine1": "2412A Victoria Ave.",

"City": "Brandon",

"State": "MB",

"Country": "CA",

"Zip": "R7B 0M5",

"Phone": "5555555555",

"Email": "test@test.com"

},

"ReasonForExport": "merchandise",

"IncludeLandedCost": true,

"Pieces": [

{

"Quantity": 1,

"Weight": 0.4,

"SalePrice": 290.00,

"HSCode": "920994",

"OriginCountryCode": "US",

"Description": "Blue Polyester T-Shirt "

}

],

"Package":{

"Weight": 1.25

}

}

Response

{

"RateId": 7234111,

"Reference": "TestOutbound2",

"Currency": "USD",

"Dhl express worldwide": {

"DDU": {

"HashKey": "Z1R3zB7",

"ShippingCost": null,

"ActualShippingCost": null,

"Insurance": 0,

"DiscountedShippingCost": null,

"Days": "0-1 business days",

"Carrier": "dhl"

}

},

"Inxpress express worldwide": {

"DDU": {

"HashKey": "AWrmo",

"ShippingCost": null,

"ActualShippingCost": null,

"Insurance": 0,

"DiscountedShippingCost": null,

"Days": "1-2 business days",

"Carrier": "inXpress"

}

},

"RootRequestId": "588299cd-372b-474b-8fd8-cebeb48c8bd7"

}

Creating Return Shipments

POST - https://partnerapi.flavorcloud.com/Shipments

You can create return shipments via the FlavorCloud API. Follow the steps below to help create your return.

  • Pass the IsReturn parameter to “Y”
  • The addresses for the return shipment should be the same as the outbound label. We will automatically switch the ‘to’ and ‘from’ addresses on the label when creating the return shipment.
  • Return shipments are associated with outbound shipments using the Reference property and the shipmentID property. We ask that you use the same reference for the Return shipment as the outbound shipment.
  • Within the create return shipment call, we pass the shipmentID of the outbound call as the ShipmentKey.
  • All returns are DDU. This is because in most instances, returns travel duty-free.

Note: If you do not have the shipmentID for your shipment when creating the return, you can retrieve it using the GET Shipment call.

Example

Request

{

"AppID": "{{APP ID}}",

"RestApiKey": "{{RestApiKey}}",

"Reference": "TestOutbound2",

"ServiceCode": "STANDARD",

"ShipmentKey":"kv1asvnh5x9",

"IsReturn":"Y",

"ShipFromAddress": {

"Name": "Flavorcloud",

"AttentionName": "Jake Krachman",

"AddressLine1": "200 Townsend Street",

"City": "San Francisco",

"Country": "US",

"State": "US",

"Zip": "94107",

"Phone": "5555555555",

"Email": "jake.krachman@flavorcloud.com"

},

"ShipToAddress":{

"Name": "Company Name",

"AttentionName": "Reciever Name",

"AddressLine1": "2412A Victoria Ave.",

"City": "Brandon",

"State": "MB",

"Country": "CA",

"Zip": "R7B 0M5",

"Phone": "5555555555",

"Email": "test@test.com"

},

"Shipments": [

{

"Piece": [

{

"Quantity": 1,

"Weight": 0.4,

"SalePrice": 29.00,

"HSCode": "920994",

"OriginCountryCode": "US",

"Description": "Blue Polyester T-Shirt "

}

],

"Package": {

"Reference": "124",

"Weight": 1.25,

"Length": 1,

"Width": 1,

"Height": 1

}

}

],

"HashKey": "Z1R3zB7",

"ReasonForExport": "return",

"WeightUnit": "LB",

"Currency": "USD",

"DimensionUnit": "IN",

"TermsOfTrade": "DDU"

}

Response

{

"ShipmentID": "kv1asvnh5x9",

"Reference": "TestOutbound2",

"TrackingNumber": "1972837602",

"LabelUrl": [

"https://cdn.flavorcloud.com/s-TestOutbound232101972837602-TestOutbound2321019728376021972837602-label.pdf"

],

"Carrier": "DHL",

"TrackingUrl": "https://app.flavorcloud.com/brandedTracking?ref=TestOutbound2&tr_no=1972837602&carrier=DHL&destination=Brandon,%20CA",

"SubmittedElectronically": true,

"CustomsInvoiceURL": "https://cdn.flavorcloud.com/s-TestOutbound232101972837602--invoice.pdf",

"RootRequestId": "ede1ca97-cd43-4afc-bac9-b84add273821"

}