Send a POST request to the https://shipping.mailamericas.com/api/v1/admission
URL with your
access_token
.
curl -X POST -H "Content-Type: application/json" -d '
{
"order_id":"ML0978234091823",
"sale_date":"2016-10-10T14:20:51+08:00",
"service":"CN0030CO",
"marketplace_code":"MP0001",
"origin_warehouse_code":"WH0001",
"delivery_duties_paid":"N",
"returns_allowed":"N",
"label_format": "pdf",
"pudo" : {
"pickup_id" : "P8069",
"pickup_name" : "PEP BELLVILLE MIDDESTAD MALL"
},
"package":{
"net_weight":0.87,
"weight":0.95,
"weight_unit": "kg",
"height":20,
"width":30,
"length":40,
"measurement_unit": "cm",
"declared_value":11.58,
"freight":3.5,
"cif":0.5,
"insurance":1.3,
"taxes": 0.45,
"duties": 0.35,
"payment_method":"Credit card",
"issuing_entity":"Visa",
"last_four_digits_payment_method":1234,
"transaction_number":"ML1747640108",
"currency":"USD",
"exchange_rate":4.58,
"ecommerce_name":"https://aliexpress.com/",
"sender_code_ece":"030073310",
"client_alias_code":"5672452912",
"client_label_reference":"abc123"
},
"shipper":{
"name":"Shipper name",
"contact_name":"Shipper contact",
"address1":"No. 111 Tianlin Road",
"address2":"Tower 1",
"address3":"Building",
"district":"Xuhui",
"city":"Shanghai",
"state":"Shanghai",
"postal_code":"111233",
"country":"CN",
"email":"example@domain.com",
"phone":"1111111",
"single_tax_code":"abc123",
"eori_code":"abc123456",
"shipper_id": "123456789",
"shipper_reference_number": "123456789",
},
"buyer":{
"name":"Buyer name",
"buyer_id":"Buyer ID",
"company":"Company SA",
"address1":"Carrera 11a # 11b - 11",
"address1_number": 1024,
"address2":"T1 Int 1 Apto 1111",
"address3":"Conjunto Residencial Parques de San Jer\u00f3nimo",
"district":"Villa Teresita",
"city":"Medellin",
"state":"Antioquia",
"location":"Medellin, Antioquia, Antioquia",
"postal_code":"111031",
"country":"CO",
"email":"example@domain.com",
"phone":"111111",
"born_at":"2000-10-10",
"gcs":
{
"latitude":"34.6038",
"longitude":"58.3816",
}
},
"items":[
{
"quantity":1,
"sku":"LSH089238\/2",
"description":"Pencil pouch generic",
"description_alt":"鉛筆袋通用",
"net_weight":0.12,
"declared_value":1.23,
"hs_code":"1111909090",
"external_item_id":"875419816",
"category":"writing tool",
"product_url":"http://marketplace.com/product_1"
},
{
"quantity":3,
"sku":"LFH80000234",
"description":"Womens Ringspun Tee",
"description_alt":"女式Ringspun T卹",
"net_weight":0.25,
"declared_value":3.45,
"hs_code":"1111100000",
"external_item_id":"8755252312",
"category":"clothes",
"product_url":"http://marketplace.com/product_2"
}
]
}'
https://shipping.mailamericas.com/api/v1/admission?access_token=[token]
Parameter | Section | Type | Description | ||
---|---|---|---|---|---|
order_id |
- | Required | String | Seller Order ID / Reference. | |
sale_date |
- | Required | String | Date when order was placed in ISO 8601 format. See https://en.wikipedia.org/wiki/ISO_8601. | |
service |
- | Required | String |
Code of the service to which the product was sent. Example CN0030MX ,
MXEXPMX or CLEXPCL .
|
|
marketpace_code |
- | Optional | String | Code of the marketplace on which the product was sold. | |
origin_warehouse_code |
- | Optional | String | Max: 6 | Code of the warehouse to which the product was sent. | |
delivery_duties_paid |
- | Optional | String | "Y" or "N" | Indicate if package has delivery duties paid. | |
returns_allowed |
- | Optional | String | "Y" or "N" | Indicate if package has return allowed. | |
label_format |
- | Optional | String | "pdf" or "zpl" | Determines label format. Default: "pdf". | |
pickup_id |
pudo | Optional | String | Pickup Id from pudo api | |
pickup_name |
pudo | Optional | String | Pickup Name from pudo api | |
net_weight |
Package | Optional | Number | Net weight in kilograms. | |
weight |
Package | Required | Number | Gross weight in kilograms. | |
weight_unit |
Package | Optional | Text | Weight unit. Example: "oz". Default: "kg". | |
height |
Package | Optional | Number | Package height in centimeters. | |
width |
Package | Optional | Number | Package width in centimeters. | |
length |
Package | Optional | Number | Package lengthh in centimeters. | |
measurement_unit |
Package | Optional | Text | Measurement unit. Example: "in". Default: "cm". | |
declared_value |
Package | Optional | Number | Package declared value in USD. | |
freight |
Package | Optional | Number | Package freight value. | |
cif |
Package | Optional | Number | Package cif value. | |
insurance |
Package | Optional | Number | Package insurance value. | |
taxes |
Package | Optional | Number | Package taxes value. | |
duties |
Package | Optional | Number | Package duties value. | |
payment_method |
Package | Optional | Text | How the package was paid. | |
issuing_entity |
Package | Optional | Text | Company from where the payment was maid. | |
last_four_digits_payment_method |
Package | Optional | Integer | Last 4 digits of the payment method | |
transaction_number |
Package | Optional | Text | ID from the payment transaction. | |
currency |
Package | Required for Remessa Conforme Brazil (PRC) | Text | Currency international code. | |
exchange_rate |
Package | Required for Remessa Conforme Brazil (PRC) and Currency not is USD | Text | Exchange rate for a value convertion. | |
ecommerce_name |
Package | Required for Remessa Conforme Brazil (PRC) | Text | Ecommerce name for Brazil receita federal. | |
sender_code_ece |
Package | Required for Remessa Conforme Brazil (PRC) | Text | Trader Information Number. | |
client_alias_code |
Package | Optional | Text | Client package alias code and Tradeinn barcode. | |
client_label_reference |
Package | Optional | Text | Client another reference. | |
eori_code |
Package | Optional | String | ||
shipper_id |
Shipper | Optional | String | ||
contact_name |
Shipper | Optional | String | ||
address1 |
Shipper | Optional | String | ||
address2 |
Shipper | Optional | String | ||
address3 |
Shipper | Optional | String | ||
district |
Shipper | Optional | String | ||
city |
Shipper | Optional | String | ||
state |
Shipper | Optional | String | ||
postal_code |
Shipper | Optional | String | ||
country |
Shipper | Optional | String | ISO 3661 country code. See https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes. | |
shipper_reference_number |
Shipper | Optional | String | ||
phone |
Shipper | Optional | String | ||
email |
Shipper | Optional | String | ||
name |
Buyer | Required | String | Buyer full name. | |
buyer_id |
Buyer | Optional | String | Buyer identification. | |
company |
Buyer | Optional | String | ||
address1 |
Buyer | Required | String | ||
address1_number |
Buyer | Optional | Integer | ||
address2 |
Buyer | Optional | String | ||
address3 |
Buyer | Optional | String | ||
district |
Buyer | Optional | String | ||
city |
Buyer | Required | String | ||
state |
Buyer | Required | String | ||
postal_code |
Buyer | Optional | String | ||
country |
Buyer | Required | String | ISO 3661 country code. See https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes. | |
phone |
Buyer | Optional | String | ||
email |
Buyer | Optional | String | Max: 100 | |
gcs.latitude |
Buyer | Optional | String | Float | |
gcs.longitude |
Buyer | Optional | String | Float | |
quantity |
Items | Required | Number | ||
sku |
Items | Optional | String | Max: 255 | |
description |
Items | Required | String | ||
description_alt |
Items | Optional | String | Translation of the product description in the language of the country of origin of the shipment | |
net_weight |
Items | Optional | Number | Item net weight in kilograms. | |
declared_value |
Items | Optional | Number | Item declared value in USD. | |
hs_code |
Items | Optional | String | ||
external_item_id |
Items | Optional | String | ||
category |
Items | Optional | String | Item classification. It describes the product type. Ex: "Clothes", "Technology" | |
product_url |
Items | Optional | String |
Status code: 200 OK
{
"error":false,
"data": {
"tracking": "990070413783",
"label": "data:image\/pdf;base64,JVBERi0xLjUNJeLjz9MNCjEgMCBvYmoNPDwvTWV0YWRhdGEgMiAwIFIvT0NQcm9wZXJ0aWVzPDwvRDw8L09OWzcgMCBSIDQyIDAgUiA3OCAwIFIgMTE0IDAgUiAxNTAgMCBSIDE4NiAwIFIgMjIyIDAgUiAyNTggMCBSXS9PcmRlciAyNTkgMCBSL1JCR3JvdXBzW10+Pi9PQ0dzWzcgMCBSIDQyIDAgUiA3OCAwIFIgMTE0IDAgUiAxNTAgMCBSIDE4NiAwIFIgMjIyIDAgUiAyNTggMCBSXT4+L1BhZ2VzIDMgMCBSL1R5cGUvQ2F0YWxvZz4+DWVuZG9iag0yIDAgb2JqDTw8L0xlbmd0aCA1NTQyOC9TdWJ0eXBlL1hNTC9UeXBlL01ldGFkYXRhPj5zdHJlYW0NCjw\/eHBhY2tldCBiZWdpbj0i77u\/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1Njoy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