Shipment
New shipment
This endpoint creates a new shipment.
URL
PROD https://api.skypostal.com/
TEST https://api-test.skypostal.com/
Endpoint
POST /wcf-services/service-shipment.svc/shipment/new-shipment
Request Credentials
Parameters | |
---|---|
| Object - Required User Info Definition. |
| Object - Required Shipment Info 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 Info Definition
Parameters | |
---|---|
| Integer - Required Client identificator provided by Skypostal. |
| Integer Box identificator by country provided by Skypostal. |
| Integer Ssa identificator. |
| Object - Required Entity Definition. |
| Object - Required for CA and for US instead of point of entry object Entity Definition. |
| Object Entity Definition. |
| Object - Required Consignee Definition. |
| Object - Required Options Definition. |
| Object - Required Data Definition. |
| Object - Available only after agreement, remove from regular call Pre Defined Label 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
Entity Definition
Parameters | |
---|---|
| String - Required Entity Name. |
| String - Required Entity Email. |
| Object - Required Address Definition. |
| Object Address Definition. |
| List of Objects List of Phones (Phone Definition). |
Consignee Definition
Parameters | |
---|---|
| String - Required First Name. |
| String - Required Last Name. |
| String - Required Consignee Email. |
| String - Required (BR - CL - PE - UY - EC) Consignee's country Identificator. |
| String Field to search for the id_number. - *BR only |
| Object - Required Address Definition. |
| List of Objects - Required (MX - US) List of Phones (Phone Definition). |
| String - Required (UY) Birth Date. |
| String - Required (UY) Card Type. |
| String - Required (UY) Card Last 4 digits. |
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. |
| String - Required if overwriting USA shipment's point_of_entry with Shipper's addresses Abbreviation of the state. |
| Integer Code of the county. |
| String Name of the country. |
| Integer Code of the city, default value 0. |
| String - Required Name of the city. |
| String - Required (AU - BR - CA - MX - US) Send a valid zipcode. |
| Integer Code of the town, default value 0. |
| String Name of the town or any city subdivision. (e.g. colonia, comuna, parroquia, pueblo). |
| String Address neighborhood. |
| String - Required Streets, home number, etc. |
| String Streets, home number, etc. |
| String Streets, home number, etc. |
Phone Definition
Parameters | |
---|---|
| Integer - Required Can be 1 = fixed telephony and 2 = cell phone. |
| String - Required Phone Number. |
| String Phone Extension. |
Options Definition
Parameters | |
---|---|
| Boolean - Required Include label data. |
| Boolean - Required Include label zpl. |
| Boolean Default value true. When true, the ZPL string will be encoded to a Base64 String. |
| Integer Default value 203. Can choose 203 or 300. |
| Boolean Include label image. |
| String - Required if include label image = True Include image format. Default value PNG. You can choose PNG or PDF. |
| String - Required Manifest Type Definition. Value matching any of the list. |
| Integer Insurance code Definition. Value matching any of the list. |
| Boolean Generate Label Default. |
| Integer - Required Rate Service Code Definition. Value matching any of the list. |
| Integer Not Cleared Handling Code Definition. Value matching any of the list. |
| Boolean If true service will return the info from a package already created. |
| Boolean If sent as true, max largest dimension limit of 155cm and max package total (LENGTH + GIRTH) limit of 240 cm will be ignored. |
| Boolean If sent as true, max weight of 50kg validation will be ignrored. |
| Boolean - *Only for US services Saturday Delivery. |
| Boolean - *Only for US services If true, the "return address" from the POE will be used as the consignee address. |
| Object Additional Services Definition. |
| Object First Mile Label Options Definition. |
Additional Services Definition.
Value | Description |
---|---|
| Integer (0,1) Performs zipcode validation using additional geolocation services. |
| Integer (0,1) Performs id validation by Skypostal. |
| Integer (0,1) Performs harmonization code validation by Skypostal. |
| Integer (0,1) Performs additional destination address validations. |
| Integer (0,1) If available, requests a signature from the consignee when the shipment is delivered. |
| Object Description Translation Definition. |
| Object - *BR Only Compliant Shipping Program Definition. |
Description Translation Definition.
Value | Description |
---|---|
| Integer (0,1) 1 to activate and 0 to deactivate. |
| String Two digits language code. |
| String Two digits language target. |
Compliant Shipping Program Definition.
Value | Description |
---|---|
| Boolean Parameter to request or avoid the service. |
| String Client's authorized TIN or ECE code, (please inform the complete valid shipper address to be set in the system). |
| String (Amazon Sellers only) Authorization code to use AMAZON PRC. |
First Mile Label Options Definition.
Value | Description |
---|---|
| Boolean, enables first mile label generation. |
| Rate Service Code Definition. Value matching any of the list ( US Only Services ). |
| Boolean. Default value: true. Returns the data item containing the generated last mile label, check the "Response label types Definition" |
Manifest Type Definition.
Value | Description |
---|---|
DDU | Customs Unpaid. |
DDP | Customs Paid. |
Insurance Code Definition.
Value | Description |
---|---|
0 | Follow insurance account rules. |
1 | Apply insurance. |
2 | Reject insurance. |
Rate Service Code Definition.
Value | Description |
---|---|
1 | Courier Clearance / Courier Standard. |
2 | Courier Clearance / Postal Delivery. |
3 | Postal Clearance / Postal Delivery Standard. |
4 | Postal Clearance / Courier Standard. |
7 | Courier Expedited. |
11 | Office of Exchange. - *2kg max |
12 | Postal Clearance/Postal Delivery Express. |
13 | Courier Clearance / Courier Economy. |
14 | Courier Clearance / Courier Express. |
15 | Postal Clearance / Courier Standard Deferred. |
Value | Description |
---|---|
102 | Courier Clearance / Courier Delivery For Credit Cards - (Restricted to "family_product": "CCS" only). |
103 | Postal Clearance / Postal Delivery Unregistered - PE Only. |
Value | Description |
---|---|
201 | UPS Ground. |
202 | UPS Next Day Air Saver. |
203 | UPS 2nd Day Air. |
204 | UPS Next Day Air. |
205 | USPS Priority Mail. |
206 | USPS - Ground Advantage |
208 | UPS 2nd Day Air A.M. |
209 | UPS 3-Day Select. |
Value | Description |
---|---|
301 | Packet Standard. |
302 | Packet Express. |
Value | Description |
---|---|
401 | Postal Option. |
402 | Last mile only / Private. |
Value | Description |
---|---|
502 | Courier Clearance / Courier Delivery for Regulated Products - (Restricted to family products: "HBS", "BBC", "CSM", "AYB"). |
Not Cleared Handling Code Definition.
Value | Description |
---|---|
0 | Return to origin. |
1 | Treat as abandoned - Default when not sent. |
Data Definition
Parameters | |
---|---|
| String - Required Main package identifier for the client in SkyPostal's system (min 8 alphanumeric characters). |
| String Format YYYY-MM-DD. Reference date of package. |
| String Reference number 01 of package. Letters, numbers, hyphen "-" and underscore "_" allowed. |
| String Reference number 02 of package. Letters, numbers, hyphen "-" and underscore "_" allowed. |
| String Reference number 03 of package. Letters, numbers, hyphen "-" and underscore "_" allowed. |
| Double Tax of package. |
| Double Reference total value package. |
| Double Discount of package. |
| Double Freight charged to client. |
| String - Required If no send, default USD. |
| 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. |
| Integer if any item from the shipment contains a lithium battery. |
| Object Commercial invoice Definition. |
| List of Objects - Required List of Items (Item Definition). |
| Object - Required for USA services. Can be overwritten by shipper address Point of entry Definition. |
Pre Defined Label Definition
Parameters | |
---|---|
| Object - Required Provider Info Definition. |
| Object Label Info Definition. |
Commercial invoice Definition
Parameters | |
---|---|
| String Valid URI for the commercial invoice declaration, must allow public access. |
Item Definition
Parameters | |
---|---|
| String 2 characters iso code. (e.g. BR, MX, US, etc.) |
| String Skucode for the product. |
| String - Required for packet and etoe services Harmonized system code. |
| String Family product. |
| String Product's serial number. |
| String Imei number (in case of cellphone). |
| String Image URL for the product. |
| String - Required Description of package. |
| String Product brand. |
| String Product name. |
| String Product model. |
| Integer - Required Quantity of each item type. |
| Double Unit tax value (per item). |
| Double - Required Unit price value (per item). |
| Double Unit weight (per item). |
Point of Entry Definition
Parameters | |
---|---|
| String - Required for US Shipments Point of entry - IATA Code. |
| String - Required for US Shipments Point of Entry - Country Iso Code. |
Provider Info Definition
Parameters | |
---|---|
| Integer - Required Provider code defined and provided by SP. |
| Integer - Required Service code defined and provided by SP. |
Label Info Definition
Parameters | |
---|---|
| String - Required |
| String |
| String |
| String |
| String |
| String |
| String |
| String |
Response definition
Parameters | |
---|---|
| When true, indicates the requested label was generated successfully. If false, check the errors object information. |
| Returned error codes, if any. |
| Contains the label image, if requested. |
| Invoice display URL. |
| Country provider tracking 1. |
| Country provider tracking 2. |
| Country provider tracking 3. |
| Response type. Check "Response label types Definition". |
| Display label URL. |
| Label URL PDF. |
| Label ZPL text. Can be base64 encoded if requested. |
| Unique Skypostal Tracking number. |
| Unique Skypostal AWB number. |
Response label types Definition
Value | Description |
---|---|
1 | Last Mile. |
2 | Return. |
3 | Redistribution. |
4 | First Mile. |
The command should be run as in the following example:
{
"user_info":
{
"user_code": 123123,
"user_key": "ok",
"app_key": "ok"
},
"shipment_info":
{
"copa_id": 616,
"box_id": 0,
"ssa_copa_id": null,
"merchant":
{
"name": "Store Name",
"email": "[email protected]",
"address":
{
"country_code": null,
"country_iso_code": null,
"country_name": null,
"state_code": null,
"state_name": null,
"state_abbreviation": null,
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": null,
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": null,
"address_02": null,
"address_03": null
},
"return_address":
{
"country_code": null,
"country_iso_code": null,
"country_name": null,
"state_code": null,
"state_name": null,
"state_abbreviation": null,
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": null,
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": "Address to return the package",
"address_02": null,
"address_03": null
},
"phone":
[
{
"phone_type": 1,
"phone_number": "11111111"
}
]
},
"shipper":
{
"name": null,
"email": null,
"address":
{
"country_code": null,
"country_iso_code": null,
"country_name": null,
"state_code": null,
"state_name": null,
"state_abbreviation": null,
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": null,
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": null,
"address_02": null,
"address_03": null
},
"return_address":
{
"country_code": null,
"country_iso_code": null,
"country_name": null,
"state_code": null,
"state_name": null,
"state_abbreviation": null,
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": null,
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": null,
"address_02": null,
"address_03": null
},
"phone": []
},
"sender":
{
"name": "COPA NAME",
"email": null,
"address":
{
"country_code": null,
"country_iso_code": null,
"country_name": null,
"state_code": null,
"state_name": null,
"state_abbreviation": null,
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": null,
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": null,
"address_02": null,
"address_03": null
},
"return_address":
{
"country_code": null,
"country_iso_code": null,
"country_name": null,
"state_code": null,
"state_name": null,
"state_abbreviation": null,
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": null,
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": null,
"address_02": null,
"address_03": null
},
"phone": []
},
"consignee":
{
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"id_number": "33214569874",
"id_search_string": "This is a test with a CPF:12345678901 included",
"address":
{
"country_code": null,
"country_iso_code": "BR",
"country_name": null,
"state_code": 0,
"state_name": null,
"state_abbreviation": "SP",
"county_code": null,
"county_name": null,
"city_code": 0,
"city_name": null,
"zip_code": "02124030",
"town_code": null,
"town_name":"Colonia magistral",
"neighborhood": null,
"address_01": "Praza Nippon 43 loja",
"address_02": "Jardim Japao",
"address_03": null
},
"phone":
[
{
"phone_type": 1,
"phone_number": "123456789",
"phone_extension": ""
},
{
"phone_type": 2,
"phone_number": "12673342655",
"phone_extension": ""
}
]
},
"options":
{
"include_label_data": false,
"include_label_zpl": true,
"zpl_encode_base64": true,
"zpl_label_dpi": 203,
"include_label_image": false,
"include_label_image_format": "PNG",
"manifest_type": "DDP",
"insurance_code": 0,
"rate_service_code": 6,
"not_cleared_handling_code":1,
"generate_label_default": false,
"return_if_exists" : true,
"skip_dims_limit_validation": false,
"skip_weight_limit_validation": false,
"allow_saturday_delivery": false,
"is_return_shipment": false,
"additional_services":
{
"zipcode_validation":0,
"id_validation":0,
"harmonization_code_validation":0,
"destination_address_validation":0,
"request_signature_on_delivery": 0,
"description_translation":{
"translate_service":0,
"translate_language_source":"en",
"translate_language_target":"es"
},
"compliant_shipping_program":{
"request_service":false,
"compliant_sender_code":"000",
"compliant_sender_authorized_code": ""
}
},
"first_mile_label_options":
{
"generate_first_mile_label":false,
"rate_service_code":201,
"include_last_mile_label":true
}
},
"data":
{
"external_tracking": "testbr-222",
"reference_date": "2019-02-07",
"reference_number_01": "testbr-222",
"reference_number_02": "testbr-222",
"reference_number_03": null,
"tax": null,
"value": 40,
"discount": 0,
"freight": 34,
"insurance": 0,
"currency_iso_code": "USD",
"dimension_01": 2,
"dimension_02": 35,
"dimension_03": 27,
"dimension_unit": "CM",
"weight": 1,
"weight_unit": "KG",
"has_lithium_battery": 0,
"commercial_invoice":{
"file_url":"https://awsfs.publicpdffiles.com/456dfs5df875asdf346sdf/uabhsi6sdf4567sdf654aun.pdf"
},
"items":
[
{
"ctry_iso_code_origin":"NL",
"hs_code": "",
"family_product": "OTR",
"serial_number": null,
"imei_number": "",
"description": "BOOKS",
"product_brand":"",
"product_name":"",
"product_model":"",
"quantity": 1,
"tax": null,
"value": 20,
"weight": 1
},
{
"ctry_iso_code_origin":null,
"hs_code": "",
"family_product": "OTR",
"serial_number": null,
"imei_number": "",
"description": "CLOTHES",
"product_brand":"",
"product_name":"",
"product_model":"",
"quantity": 1,
"tax": null,
"value": 20,
"weight": 1
}
],
"point_of_entry":
{
"ctry_iso_code":"US",
"iata_code": "MIA"
},
},
"pre_defined_label_information":{
"provider_info":{
"service_provider_code":27,
"service_type_code":29
},
"label_info":{
"label_tracking_number_01":"SP001073097CO",
"label_tracking_number_02":"",
"label_tracking_number_03":null,
"label_additional_info_01":"",
"label_additional_info_02":null,
"label_additional_info_03":null,
"label_additional_info_04":null,
"label_zpl":null
}
}
}
}
The command will return the following format:
{
"data":
[
{
"_verify": true,
"trck_nmr_fol": 14763699,
"skp_tracking": "SK00218568369US",
"label_sorting_code": "EC-UIO-67-4",
"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_type": 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_additional_data":
{
"default_label_reason": "Reason why the default label was generated",
"harmonization_code_validation_success": true,
"id_validation_success": false,
"zipcode_validation_success": true
},
"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
}