Bag
Create Bag
URL
PROD https://api.skypostal.com
TEST https://api-test.skypostal.com
Endpoint
POST /wcf-services/service-bags.svc/bags/create-bag
Request Parameters
Parameters | |
---|---|
| Object - Required User Info Definition. |
| Object - Required Bag 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. |
Bag Info Definition
Parameters | |
---|---|
| Object - Required Bag header definition. |
| Object - Required Bag detail definition. |
Bag header definition
Parameters | |
---|---|
| Integer - Required Client identificator provided by Skypostal. |
| String - Required Reference for the bag. |
| Object - Required Departure point definition. |
| Object - Required Entry point definition. |
| Object Entry point definition. |
| Object - Required Options definition. |
Departure point definition
Parameters | |
---|---|
| String - Required 2 characters iso code. (e.g. BR, MX, US, etc.). |
| String - Required Point of entry - IATA Code. |
| Integer - Required Transportation Type Definition. |
Entry point definition
Parameters | |
---|---|
| String - Required 2 characters iso code. (e.g. BR, MX, US, etc.). |
| String - Required Point of entry - IATA Code. |
| Integer - Required Transportation Type Definition. |
Transportation Type Definition
Value | Description |
---|---|
1. | Air. |
2. | Land. |
3. | Sea. |
Options definition
Parameters | Description |
---|---|
| Integer - Required Only for Packet 1 for bag max 30kg, 2 for pallet max 500kg. |
| String - Required Only for Packet Applies for packet service and has to match one from the table. |
| String - Required Import Service Type Definition. Value matching any of the list. |
| String - Required 2-char clearance value type. Default: NV ("No Value Specified"). For MX Available options: "HV" and "LV". For "High Value" and "Low Value" respectively. |
| String Bag Image format. Available options: "PDF" and "PNG". |
Bag Service Type Definition.
Value | Description |
---|---|
NX | For shipments created with rate service code 301. |
IX | For shipments created with rate service code 302. |
XP | For shipments created with rate service code 303. |
Import Service Type Definition.
Value | Description |
---|---|
DDU | Customs Unpaid. |
DDP | Customs Paid. |
Bag detail definition
Parameters | |
---|---|
| String - Required Identifier of the shipment to manifest, can send label, awb, extr_tracking. |
Remember
user_code
, user_key
and app_key
are generic credentials, make sure to request your own for TEST
and PROD
environemnts.
Comments
This endpoint returns the bag_id
The command should be run as in the following example:
{
"user_info": {
"user_code": 123123,
"user_key": "ok",
"app_key": "ok"
},
"bag_info": {
"bag_header": {
"copa_id": 616,
"client_bag_reference": "bag-number-01",
"departure_point": {
"country_iso_code": "CN",
"iata_code": "PVG",
"gateway_type": 1
},
"entry_point": {
"country_iso_code": "CL",
"iata_code": "SCL",
"gateway_type": 1
},
"via_hub" : {
"country_iso_code" : "US",
"iata_code" : "MIA",
"gateway_type" : 1
},
"options": {
"bag_type": 1,
"bag_service_type": "",
"import_service_type": "DDU",
"clearance_value_type": "NV",
"bag_image_format": null
}
},
"bag_detail": [
{
"external_tracking": "item-number-01"
},
{
"external_tracking": "item-number-02"
},
{
"external_tracking": "item-number-03"
},
{
"external_tracking": "item-number-04"
},
{
"external_tracking": "item-number-05"
}
]
}
}
The command will return the following format:
{
"additional_info": {
"internal": [],
"server": {
"server_id": null,
"server_time": 4.1814098
}
},
"data": [
{
"_verify": true,
"bag_id": 293419,
"bag_status": "CLOSED",
"bag_total_items": 3,
"bag_total_weight_kg": 3,
"bag_sorting_code" : "EC-UIO-67-4",
"client_bag_reference": "bag-number-01",
"error": {
"error_description": "",
"error_location": "",
"system_error": false
},
"provider_bag_info": {
"provider_bag_label_image": null,
"provider_bag_label_zpl": "",
"provider_bag_number": ""
}
}
]
}