Return
New return
This endpoint creates a new return.
URL
PROD https://api.skypostal.com/
TEST https://api-test.skypostal.com/
Endpoint
POST /wcf-services/service-shipment-return.svc/shipment-return/new-return
Request Credentials
Parameters | |
---|---|
| Object - Required User Info Definition. |
| Object - Required Shipment Return Definition. |
User Info Definition
Parameters | |
---|---|
| Integer - Required This is the user code provided by Skypostal. |
| String - Required This is the app key provided by Skypostal. |
| String - Required This is the app key provided by Skypostal. |
Shipment Return Definition
Parameters | |
---|---|
| Integer - Required Client identificator provided by Skypostal. |
| Integer Save return as another client identificator, provided by Skypostal. |
| Integer Box identificator by country provided by Skypostal. |
| Object Merchant Definition. |
| Object - Required Sender Definition. |
| Object - Required Options Definition. |
| Object - Required Data Definition. |
Remember
user_code
, user_key
, app_key
, copa_id
and box_id
are generic credentials, make sure to request your own for TEST
and PROD
environments
Merchant Definition
Parameters | |
---|---|
| String - Required Entity Name. |
| String Entity Email. |
| String Entity Address. |
| String Entity Return Address. |
| String Entity Phones. |
Sender Definition
Parameters | |
---|---|
| String - Required First Name. |
| String - Required Last Name. |
| String - Required Consignee Email. |
| String Sender's country Identificator. |
| Object - Required Address Definition. |
| List of Objects - Required List of Phones (Phone Definition). |
Phone Definition
Parameters | |
---|---|
| Integer - Required Can be 1 = fixed telephony and 2 = cell phone. |
| String - Required Phone Number. |
Options Definition
Parameters | |
---|---|
| Boolean - Required Include label zpl. |
| Integer - Required ZPL Label DPI Definition. Default value 203. You can choose 203 or 300. |
| Boolean - Required Default value true. When true, the ZPL string will be encoded to a Base64 String. |
| Boolean - Required Include label image. |
| String - Required if include label image = True Include image format. Default value PNG. You can choose PNG or PDF. |
Data Definition
Parameters | |
---|---|
| String - Required Identifier of the shipment to manifest, can send label, awb, extr_tracking. |
| String Reference number 01 of package. |
| String Reference number 02 of package. |
| String Reference number 03 of package. |
| Double - Required Dimension 01 of package. |
| Double - Required Dimension 02 of package. |
| Double - Required Dimension 03 of package. |
| String - Required Can be IN = inches, CM = centimeters and M = Meters. |
| Double - Required Weight of package. |
| String - Required Can be LB = pounds and KG = kilograms. |
| Object - Required Service Type Definition. |
| List of Objects - Required List of Items (Item Definition). |
Service Type Definition
Parameters | |
---|---|
| Integer - Required Can be 1 = Drop Off, 2 = Pick Up. |
| Object - Required if return_service_type = 2 Return Service Data Definition. |
Return Service Data Definition
Parameters | |
---|---|
| Object - Required Address Definition. |
| Object - Required Data Ranges Definition. |
Address Definition
Parameters | |
---|---|
| Integer Code of the country. |
| String - Required 2 characters iso code. (e.g. BR, MX, US, etc.) |
| String Name of the country. |
| Integer Code of state. |
| String Name of the state. |
| Integer Code of the county. |
| String Name of the county. |
| String - Required Name of the city. |
| String - Required (AU - BR - MX - US) Send a valid zipcode. |
| String Address neighborhood. |
| String - Required Streets, home number, etc. |
| String Streets, home number, etc. |
| String Streets, home number, etc. |
Data Ranges Definition
Parameters | |
---|---|
| String - Required Datetime Definition. |
| String - Required Datetime Definition. |
Item Definition
Parameters | |
---|---|
| String - Required for packet and etoe services Harmonized system code. |
| String Skucode product. |
| String URL of the image. |
| String Family product. |
| String Product's serial number. |
| String Imei number (in case of cellphone). |
| String - Required Description of package. |
| Integer - Required Items quantity of package. |
| Double Tax of item. |
| Double - Required Value of item. |
| String - Required Currency ISO code. |
| String Item Brand. |
| String Item name. |
| String Item model. |
Datetime definition
Definition |
---|
DateTime values are JSON string using the following format: The content of the string is /Date(ticks)/ where ticks represents milliseconds since epoch (UTC). So November 29, 1989, 4:55:30 AM, in UTC is encoded as "/Date(1683749700000)/" |
The command should be run as in the following example:
{
"user_info":
{
"user_code": 123213,
"user_key": "ok",
"app_key": "ok"
},
"shipment_return":
{
"copa_id": 100,
"sra_copa_id":null,
"box_id": 0,
"merchant":
{
"name": "NIKE SHOES",
"email": null,
"address": null,
"return_address": null,
"phone": null
},
"sender":
{
"first_name": "Manuel",
"last_name": "Decruz",
"email": "[email protected]",
"id_number": "123456789",
"address":
{
"country_code": null,
"country_iso_code": "CL",
"country_name": null,
"state_code": null,
"state_name": null,
"county_code": null,
"county_name": null,
"city_name": "santiago",
"zip_code": "46900",
"neighborhood": null,
"address_01": "Avenida la pedrera number 5",
"address_02": "32 grados nordeste",
"address_03": null
},
"phone":
[
{
"phone_type": 1,
"phone_number": "77777777"
},
{
"phone_type": 2,
"phone_number": "55555555"
}
]
},
"options":
{
"include_label_zpl": true,
"zpl_label_dpi": 203,
"zpl_encode_base64": true,
"include_label_image": false,
"include_label_image_format": "PNG"
},
"data":
{
"external_tracking": "PACKAGETRACKING",
"reference_number_01": "RETURN_REFERENCE05551122",
"reference_number_02": null,
"reference_number_03": null,
"dimension_01": 1,
"dimension_02": 3,
"dimension_03": 5,
"dimension_unit": "CM",
"weight": 1.1,
"weight_unit": "KG",
"service_type":
{
"return_service_type":1,
"return_service_data":
{
"address":
{
"country_code":null,
"country_iso_code":null,
"country_name":null,
"state_code":null,
"state_name":null,
"county_code":null,
"county_name":null,
"city_name":null,
"zip_code":null,
"neighborhood":null,
"address_01":null,
"address_02":null,
"address_03":null
},
"date_ranges":
[
{
"start_date":"/Date(1576058400000-0400)/",
"end_date":"/Date(1576058400000-0400)/"
}
]
}
},
"items":
[
{
"hs_code": "887754442",
"skucode": "ABBBSSCSSD77874",
"image_url": null,
"family_product": "OTR",
"serial_number": null,
"imei_number": null,
"description": "BLACK SHOES 11",
"quantity": 1,
"tax": null,
"value": 122,
"currency_code": "USD",
"product_brand": "NIQUE",
"product_name": "BLACK",
"product_model": "PRIME"
}
]
}
}
}
The command will return the following format:
{
"data":
[
{
"_verify": true,
"trck_nmr_fol": 14763699,
"label_tracking_number_01": "1930073823",
"label_tracking_number_02": "1069375763",
"label_tracking_number_03": "",
"label_zpl": "^XA\r\n^MMT\r\n^PW831\r\n^LL1015\r\n^LS0\r\n^FT19,64^A0N,47,57^FH\\^FDWSP Express^FS\r\n^FO266,268^GB0,73,3^FS\r\n",
"label_image": null,
"label_url": "http://testlabels.skypostal.com?awb=EXT5-NEWAPI-1004&copa=616&box=575929&prerecept=1",
"label_url_pdf": "http://testlabels.skypostal.com?awb=EXT5-NEWAPI-1004&copa=616&box=575929&prerecept=1&return_pdf=1",
"label_invoice_url": "http://testlabels.skypostal.com/invoice/?awb=EXT5-NEWAPI-1004&copa=616&box=575929&prerecept=1",
"label_data":
{
"consignee": null,
"origin": null,
"destination": null,
"provider_service_type": null,
"provider_settings": null,
"additional_info": null,
"error": null
},
"additional_info": null,
"error": null
}
],
"additional_info": null,
"error": null
}