Airpost
¡Promoción! Regístrate y obtén descuentos en tus envíos.

API

Conecta tu propio ERP, tienda en línea o sistema con nuestros servicios a través de nuestra API. Si lo prefieres, también puedes utilizar nuestras apps para conectar tu e-Commerce, marketplace o sitio web y sincronizar tus pedidos.



Rastrear un Envío

Ingresa tu número de guía, ticket o envío.

Imagen Airpost
Somos el aliado #1 en logística en México.
Imagen Airpost
TECNOLOGÍA AVANZADA PARA TU NEGOCIO

Documentación de la API



Descripción general

La API de Airpost sigue el estilo arquitectónico REST y utiliza URL orientadas a recursos, así como códigos de respuesta HTTP para comunicar cualquier error de la API. Todas las respuestas de API devuelven JSON y los nombres de propiedad son cadenas ascii en mayúsculas y minúsculas.

En la barra lateral derecha, puede encontrar ejemplos que funcionan tal como son. Solo necesita completar la variable ApiKey con su clave API personal. Puede encontrarlo en su configuración de usuario en https://www.airpostgroup.com/UserPanel/MyAccount/MyAccounts

Sandbox Endpoint:
https://sandbox.airpost.com.mx/Api/

Production Endpoint:
https://app.airpost.mx/Api/


                            

Autenticación

In order to authenticate you need to use your User Name used to access to your account and your API key. You can find it under your profile. Authentication to our API is performed using HTTP Basic Auth. Please be sure to keep your API key secret so nobody else will create shipments with your account and without your authorization.

Basic Auth

UserName:
string The username used to access to your account.
ApiKey:
string The assigned API Key.


Notification

Notification Object

Code:
string Unique code.
Message:
string Notification message.
Severity:
int FAILURE = 0
WARNING = 1
INFO = 2
SUCCESS = 3

# Example Object
{
    "Notification": {
        "Code": "0",
        "Message": "La solicitud ha sido procesada exitosamente.",
        "Severity": 3
    }
}

Contact

Contact Object

ContactName:
string Name of the person. Both name and company can be included. Required. Maximum length: 35.
Company:
string Name of the organization. Both name and company can be included. Maximum length: 35.
StreetLine1:
string First line of the address. Required. Minimum length: 3. Maximum length: 35.
StreetLine2:
string Second line of the address. Required. Maximum length: 35.
ZipCode:
string ZIP or postal code the address is located in. Required. Maximum length: 15.
City:
string City the address is located in. Required. Maximum length: 35.
County:
string County the address is located in. Required. Maximum length: 35.
State:
string State the address is located in. Required. Minimum length: 3. Maximum length: 35.
Country:
string Country the address is located in. Required. Maximum length: 35.
StateCode:
string The state code is only needed for directions within Mexico, USA or Canada. If no state code is provided, we will try to determine it.
CountryCode:
string ISO 3166 country code for the country the address is located in.
Phone1:
string Phone number to reach the person or organization. Required. Minimum length: 10. Maximum length: 13.
Ext1:
string Phone number extension. Maximum length: 5.
Phone2:
string Phone number to reach the person or organization. Maximum length: 13.
Ext2:
string Phone number extension. Maximum length: 5.
MobilePhone:
string Mobile number to reach the person or organization. Maximum length: 13.
Email:
string Email to reach the person or organization. Maximum length: 50.
Notes:
string Additional notes (these notes will not be included in the shipping label). Maximum length: 500.

# Example Object
{
    "Contact": {
        "ContactName": "Luis Pérez",
        "Company": "Airpost Group",
        "StreetLine1": "Av. Patria #3117 O",
        "StreetLine2": "Col. Loma Bonita",
        "ZipCode": "45086",
        "City": "Zapopan",
        "County": "Zapopan",
        "State": "Jalisco",
        "Country": "México",
        "StateCode": "JA",
        "CountryCode": "MX",
        "Phone1": "3338257149",
        "Ext1": "",
        "Phone2": "",
        "Ext2": "",
        "MobilePhone": "",
        "Email": "contacto@airpost.mx",
        "Notes": ""
    }
}

Carrier

Carrier Object

CarrierId:
int AEROFLASH = 1
AMPM = 2
DHL = 3
ESTAFETA = 4
FEDEX = 5
REGIONAL = 6
REDPACK = 7
SENDEX = 8
AIRPOST = 9
UPS = 10
ENVÍA = 11
TUFESA = 12
MÁXIMA = 13
MEXPOST_SEPOMEX = 14
VENCEDOR = 15
DASPACK = 16
VALLARTA_PLUS = 17
AEROMÉXICO = 18
FLECHA AMARILLA = 19
PAQUETEXPRESS = 20
TRAVISA = 21
POTOSINOS = 22
CarrierName:
string Carrier Name
IsSuggestedProvider:
bool Is Suggested Provider

# Example Object
{
    "Carrier": {
        "CarrierId": 9,
        "CarrierName": "AIRPOST",
        "IsSuggestedProvider": true
    }
}

Service

Service Object

ServiceId:
int NATIONAL_ECONOMY = 10
NATIONAL_TWO_DAYS = 11
NATIONAL_EXPRESS = 13
NATIONAL_EXPRESS_PRIORITY = 18
NATIONAL_EXPRESS_PLUS = 19
INTERNATIONAL_ECONOMY = 21
INTERNATIONAL_EXPRESS_PRIORITY = 22
INTERNATIONAL_EXPRESS_PLUS = 23
NATIONAL_SATURDAY_DELIVERY = 24
NATIONAL_ECONOMY_FREIGHT = 29
NATIONAL_EXPRESS_FREIGHT = 30
INTERNATIONAL_ECONOMY_FREIGHT = 31
INTERNATIONAL_EXPRESS_FREIGHT = 32
NATIONAL_SAME_DAY = 38
Carrier:
Carrier Object Carrier
ServiceName:
string Service Name
Unit:
string Unit
PublicPrice:
decimal Public Price
TaxRate:
decimal Tax Rate
Currency:
string MXN
USD
EstimatedDeliveryDate:
string Estimated Delivery Date
IsExtendedArea:
bool Is Extended Area

# Example Object
{
    "Service": {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 4,
                "CarrierName": "ESTAFETA",
                "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": null,
            "PublicPrice": 0,
            "TaxRate": 0,
            "Currency": null,
            "EstimatedDeliveryDate": null,
            "IsExtendedArea": false
        }
}

Label

Label Object

ShippingLabelBase64:
string Shipping Label Base64 Format.

# Example Object
{
    "Label": {
        "ShippingLabelBase64": ""
    }
}

Event

Event Object

Code:
string Code.
Description:
string Description
Date:
DateTime Date
Location:
Contact Location
Comments:
string Comments

# Example Object
{
    "Event": 
    {
        "Code": null,
        "Description": "En proceso de entrega Irapuato",
        "Date": "2017-11-08T17:48:00Z",
        "Location": {
            "StreetLine1": null,
            "StreetLine2": null,
            "ZipCode": null,
            "City": "IRAPUATO",
            "County": null,
            "State": "",
            "Country": null,
            "StateCode": null,
            "CountryCode": "MX"
        },
        "Comments": null
    }
}

Package

Package Object

PackageId:
long Unique code.
Service:
Service Service Object
Label:
Label Label Object
TrackingNumber:
string Depending on each parcel, sometimes the TrackingNumber field will be the same as the ShipmentId field, this is because not all parcels handle web services and the documentation process is carried out by these carriers manually, so the label is loaded later or once the package is collected (for example, with Travisa, Potosinos, etc.). In this sense, it is recommended that shipments be tracked by the ShipmentId, since this value never changes and is available immediately when the shipment is generated.
Weight:
decimal Weight must be between 0.1 and 1000.
Length:
decimal Length must be between 0.1 and 1000.
Height:
decimal Height must be between 0.1 and 1000.
Width:
decimal Width must be between 0.1 and 1000.
Content:
string Content
PublicPrice:
decimal Public Price
TaxRate:
decimal Tax Rate
DeclaredValue:
decimal Declared Value must be between 1 and 50000.
Currency:
string MXN
USD
Reference:
string Reference
CostCenter:
string Cost Center
IsPickedUp:
bool Is Picke dUp
IsDelivered:
bool Is Delivered
EstimatedDeliveryDate:
DateTime Estimated Delivery Date
DeliveryDate:
DateTime Delivery Date
ReceivedBy:
string Received By
ShipmentStatus:
string Shipment Status
ShipmentStatusCode:
string Shipment Status Code
ShipmentSubstatus:
string Shipment Substatus
Events:
List of Event List of Event Object

# Example Object
{
    "Package": [
        "PackageId": 999999999,
        "Service": {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 4,
                "CarrierName": "ESTAFETA",
                "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": null,
            "PublicPrice": 0,
            "TaxRate": 0,
            "Currency": null,
            "EstimatedDeliveryDate": null,
            "IsExtendedArea": false
        },
        "Label": {
            "LabelId": 0,
            "FileName": null,
            "ContentType": null,
            "FileBytes": null,
            "IsMainMergedFile": false
        },
        "TrackingNumber": "9958698217781780277621",
        "Weight": 25.6,
        "Length": 20,
        "Height": 20,
        "Width": 20,
        "Content": "LIBROS",
        "PublicPrice": 210,
        "TaxRate": 0,
        "DeclaredValue": 0,
        "Currency": "MXN",
        "Reference": null,
        "CostCenter": null,
        "IsExtendedArea": false,
        "IsPickedUp": true,
        "IsDelivered": true,
        "EstimatedDeliveryDate": "2017-11-13T22:23:22Z",
        "DeliveryDate": "2017-11-08T18:58:00Z",
        "ReceivedBy": "JAVIER M.",
        "ShipmentStatus": "Entregado",
        "ShipmentStatusCode": "DL",
        "ShipmentSubstatus": "Recibido por: JAVIER M.",
        "Events": []
    }
}

Shipment

Shipment Object

ShipmentId:
long Unique code.
Sender:
Contact Sender
Recipient:
Contact Recipient
ShipmentDate:
DateTime Shipment Date
ValueAddedServices:
List of Service Object Value Added Services
Packages:
List of Package Object Packages
CustomsClearance:
CustomsClearance CustomsClearance

# Example Object
{
    "Shipment": 
    {
        "ShipmentId": 999999,
        "Sender": {
            "ContactName": "Luis Pérez",
            "Company": "Airpost Group",
            "StreetLine1": "Av. Patria #3117 O",
            "StreetLine2": "Col. Loma Bonita",
            "ZipCode": "45086",
            "City": "Zapopan",
            "County": "Zapopan",
            "State": "Jalisco",
            "Country": "México",
            "StateCode": "JA",
            "CountryCode": "MX",
            "Phone1": "3338257149",
            "Ext1": "",
            "Phone2": "",
            "Ext2": "",
            "MobilePhone": "",
            "Email": "contacto@airpost.mx",
            "Notes": ""
        },
        "Recipient": {
            "ContactName": "Luis Pérez",
            "Company": "Airpost Group",
            "StreetLine1": "Av. Patria #3117 O",
            "StreetLine2": "Col. Loma Bonita",
            "ZipCode": "45086",
            "City": "Zapopan",
            "County": "Zapopan",
            "State": "Jalisco",
            "Country": "México",
            "StateCode": "JA",
            "CountryCode": "MX",
            "Phone1": "3338257149",
            "Ext1": "",
            "Phone2": "",
            "Ext2": "",
            "MobilePhone": "",
            "Email": "contacto@airpost.mx",
            "Notes": ""
        },
        "ShipmentDate": "2017-11-06T22:23:22Z",
        "ValueAddedServices": [],
        "Packages": [
            {
                "PackageId": 999999999,
                "Service": {
                    "ServiceId": 10,
                    "Carrier": {
                        "CarrierId": 4,
                        "CarrierName": "ESTAFETA",
                        "IsSuggestedProvider": false
                    },
                    "ServiceName": "NACIONAL ECONÓMICO",
                    "Unit": null,
                    "PublicPrice": 0,
                    "TaxRate": 0,
                    "Currency": null,
                    "EstimatedDeliveryDate": null,
                    "IsExtendedArea": false
                },
                "Label": {
                    "LabelId": 0,
                    "FileName": null,
                    "ContentType": null,
                    "FileBytes": null,
                    "IsMainMergedFile": false
                },
                "TrackingNumber": "9958698217781780277621",
                "Weight": 25.6,
                "Length": 20,
                "Height": 20,
                "Width": 20,
                "Content": "LIBROS",
                "PublicPrice": 210,
                "TaxRate": 0,
                "DeclaredValue": 0,
                "Currency": "MXN",
                "Reference": null,
                "CostCenter": null,
                "IsExtendedArea": false,
                "IsPickedUp": true,
                "IsDelivered": true,
                "EstimatedDeliveryDate": "2017-11-13T22:23:22Z",
                "DeliveryDate": "2017-11-08T18:58:00Z",
                "ReceivedBy": "JAVIER M.",
                "ShipmentStatus": "Entregado",
                "ShipmentStatusCode": "DL",
                "ShipmentSubstatus": "Recibido por: JAVIER M.",
                "Events": [
                    {
                        "Code": null,
                        "Description": "En proceso de entrega Irapuato",
                        "Date": "2017-11-08T17:48:00Z",
                        "Location": {
                            "StreetLine1": null,
                            "StreetLine2": null,
                            "ZipCode": null,
                            "City": "IRAPUATO",
                            "County": null,
                            "State": "",
                            "Country": null,
                            "StateCode": null,
                            "CountryCode": "MX"
                        },
                        "Comments": null
                    },
                    {
                        "Code": null,
                        "Description": "Llegada a centro de distribución Irapuato",
                        "Date": "2017-11-08T15:43:00Z",
                        "Location": {
                            "StreetLine1": null,
                            "StreetLine2": null,
                            "ZipCode": null,
                            "City": "IRAPUATO",
                            "County": null,
                            "State": "",
                            "Country": null,
                            "StateCode": null,
                            "CountryCode": "MX"
                        },
                        "Comments": null
                    },
                    {
                        "Code": null,
                        "Description": "Llegada a centro de distribución Guadalajara",
                        "Date": "2017-11-07T01:11:00Z",
                        "Location": {
                            "StreetLine1": null,
                            "StreetLine2": null,
                            "ZipCode": null,
                            "City": "GUADALAJARA",
                            "County": null,
                            "State": "",
                            "Country": null,
                            "StateCode": null,
                            "CountryCode": "MX"
                        },
                        "Comments": null
                    }
                ]
            }
        ],
        "CustomsClearanceDetail": null
    }
}

GET | Track

Rastrear un envio.

Track Object

UserName:
string The username used to access to your account
ApiKey:
string The assigned API Key
PreferredLanguage:
int SPANISH = 0
ENGLISH = 1
SearchTerm:
string The shipment id,package id, tracking number, or reference.
TrackingType:
int SHIPMENT_ID = 0
PACKAGE_ID = 1
TRACKING_NUMBER = 2
REFERENCE = 3

# Example Request
https://app.airpost.mx/Api/Track?preferredLanguage=0&searchTerm=70279079&trackingType=2


# Example Response
{
       "Shipments": [
        {
        "ShipmentId": 999999,
        "Sender": {
            "ContactName": "Luis Pérez",
            "Company": "Airpost Group",
            "StreetLine1": "Av. Patria #3117 O",
            "StreetLine2": "Col. Loma Bonita",
            "ZipCode": "45086",
            "City": "Zapopan",
            "County": "Zapopan",
            "State": "Jalisco",
            "Country": "México",
            "StateCode": "JA",
            "CountryCode": "MX",
            "Phone1": "3338257149",
            "Ext1": "",
            "Phone2": "",
            "Ext2": "",
            "MobilePhone": "",
            "Email": "contacto@airpost.mx",
            "Notes": ""
        },
        "Recipient": {
            "ContactName": "Luis Pérez",
            "Company": "Airpost Group",
            "StreetLine1": "Av. Patria #3117 O",
            "StreetLine2": "Col. Loma Bonita",
            "ZipCode": "45086",
            "City": "Zapopan",
            "County": "Zapopan",
            "State": "Jalisco",
            "Country": "México",
            "StateCode": "JA",
            "CountryCode": "MX",
            "Phone1": "3338257149",
            "Ext1": "",
            "Phone2": "",
            "Ext2": "",
            "MobilePhone": "",
            "Email": "contacto@airpost.mx",
            "Notes": ""
        },
        "ShipmentDate": "2017-11-06T22:23:22Z",
        "ValueAddedServices": [],
        "Packages": [
            {
                "PackageId": 999999999,
                "Service": {
                    "ServiceId": 10,
                    "Carrier": {
                        "CarrierId": 4,
                        "CarrierName": "ESTAFETA",
                        "IsSuggestedProvider": false
                    },
                    "ServiceName": "NACIONAL ECONÓMICO",
                    "Unit": null,
                    "PublicPrice": 0,
                    "TaxRate": 0,
                    "Currency": null,
                    "EstimatedDeliveryDate": null,
                    "IsExtendedArea": false
                },
                "Label": {
                    "LabelId": 0,
                    "FileName": null,
                    "ContentType": null,
                    "FileBytes": null,
                    "IsMainMergedFile": false
                },
                "TrackingNumber": "9958698217781780277621",
                "Weight": 25.6,
                "Length": 20,
                "Height": 20,
                "Width": 20,
                "Content": "LIBROS",
                "PublicPrice": 210,
                "TaxRate": 0,
                "DeclaredValue": 0,
                "Currency": "MXN",
                "Reference": null,
                "CostCenter": null,
                "IsExtendedArea": false,
                "IsPickedUp": true,
                "IsDelivered": true,
                "EstimatedDeliveryDate": "2017-11-13T22:23:22Z",
                "DeliveryDate": "2017-11-08T18:58:00Z",
                "ReceivedBy": "JAVIER M.",
                "ShipmentStatus": "Entregado",
                "ShipmentStatusCode": "DL",
                "ShipmentSubstatus": "Recibido por: JAVIER M.",
                "Events": [
                    {
                        "Code": null,
                        "Description": "En proceso de entrega Irapuato",
                        "Date": "2017-11-08T17:48:00Z",
                        "Location": {
                            "StreetLine1": null,
                            "StreetLine2": null,
                            "ZipCode": null,
                            "City": "IRAPUATO",
                            "County": null,
                            "State": "",
                            "Country": null,
                            "StateCode": null,
                            "CountryCode": "MX"
                        },
                        "Comments": null
                    },
                    {
                        "Code": null,
                        "Description": "Llegada a centro de distribución Irapuato",
                        "Date": "2017-11-08T15:43:00Z",
                        "Location": {
                            "StreetLine1": null,
                            "StreetLine2": null,
                            "ZipCode": null,
                            "City": "IRAPUATO",
                            "County": null,
                            "State": "",
                            "Country": null,
                            "StateCode": null,
                            "CountryCode": "MX"
                        },
                        "Comments": null
                    },
                    {
                        "Code": null,
                        "Description": "Llegada a centro de distribución Guadalajara",
                        "Date": "2017-11-07T01:11:00Z",
                        "Location": {
                            "StreetLine1": null,
                            "StreetLine2": null,
                            "ZipCode": null,
                            "City": "GUADALAJARA",
                            "County": null,
                            "State": "",
                            "Country": null,
                            "StateCode": null,
                            "CountryCode": "MX"
                        },
                        "Comments": null
                    }
                ]
            }
        ],
        "CustomsClearanceDetail": null
        }
    ],
    "Notifications": [
        {
            "Code": "0",
            "Message": "La solicitud ha sido procesada exitosamente.",
            "Severity": 3
        }
    ]
}

POST | Rate

Cotizar un envio.

Rate Object

UserName:
string The username used to access to your account
ApiKey:
string The assigned API Key
PreferredLanguage:
int SPANISH = 0
ENGLISH = 1
Shipment:
Shipment The shipment to be rated.

# Example Request
    { 
    "PreferredLanguage": 0,
    "Shipment": 
    {
        "Sender": {
            "ZipCode": "45086",
            "City": "Zapopan",
            "County": "Zapopan",
            "State": "Jalisco",
            "Country": "México",
            "StateCode": "JA",
            "CountryCode": "MX"
        },
        "Recipient": {
            "ZipCode": "06600",
            "City": "Ciudad de México",
            "County": "Cuauhtémoc",
            "State": "Ciudad de México",
            "Country": "México",
            "StateCode": "DF",
            "CountryCode": "MX"
        },
        "Packages": [
            {
                "Weight": 25.6,
                "Length": 20,
                "Height": 20,
                "Width": 20
            }
        ]
    }
}


# Example Response
{
    "Services": [
        {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 12,
                "CarrierName": "TUFESA",
                "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "18/11/2017 11:59:00 p. m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 7,
                "CarrierName": "REDPACK",
                "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "19/11/2017 11:59:00 p.m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 1,
                "CarrierName": "AEROFLASH",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "15/11/2017 11:59:00 p. m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 8,
                "CarrierName": "SENDEX",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "18/11/2017 11:59:00 p. m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 4,
                "CarrierName": "ESTAFETA",
                "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "19/11/2017 11:59:00 p.m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 10,
            "Carrier": {
                "CarrierId": 5,
                "CarrierName": "FEDEX",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL ECONÓMICO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "18/11/2017 09:00:00 p. m. ",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 13,
            "Carrier": {
                "CarrierId": 5,
                "CarrierName": "FEDEX",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL EXPRÉS",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 09:00:00 p. m. ",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 18,
            "Carrier": {
                "CarrierId": 5,
                "CarrierName": "FEDEX",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL EXPRÉS PRIORITARIO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 10:30:00 a. m. ",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 34,
            "Carrier": {
                "CarrierId": 10,
                "CarrierName": "UPS",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL EXPRÉS",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 4,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 11:30:00 p. m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 22,
            "Carrier": {
                "CarrierId": 10,
                "CarrierName": "UPS",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL EXPRÉS PRIORITARIO",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 4,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 10:30:00 a. m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 23,
            "Carrier": {
                "CarrierId": 10,
                "CarrierName": "UPS",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL EXPRÉS PLUS",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 4,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 08:30:00 a. m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 13,
            "Carrier": {
                "CarrierId": 7,
                "CarrierName": "REDPACK",
                "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL EXPRÉS",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 11:59:00 p.m.",
            "IsExtendedArea": false
        },
        {
            "ServiceId": 19,
            "Carrier": {
                "CarrierId": 5,
                "CarrierName": "FEDEX",
                "IsSuggestedProvider": true
            },
            "ServiceName": "NACIONAL EXPRÉS PLUS",
            "Unit": "",
            "PublicPrice": 175.50,
            "TaxRate": 16,
            "Currency": "MXN",
            "EstimatedDeliveryDate": "14/11/2017 08:30:00 a. m. ",
            "IsExtendedArea": false
        }
    ],
    "Notifications": [
        {
            "Code": "0",
            "Message": "La solicitud ha sido procesada exitosamente.",
            "Severity": 3
        }
    ]
}

POST | Create

Crear un envío.

Shipment Object

UserName:
string The username used to access to your account.
ApiKey:
string The assigned API Key.
PreferredLanguage:
int SPANISH = 0
ENGLISH = 1
Shipment:
Shipment The shipment to be created.

# Example Request
    {
        "PreferredLanguage": 0,
        "Shipment":
        {
            "Sender": {
            "ContactName": "Juan Pérez",
            "Company": "Airpost Group",
            "StreetLine1": "Av. Patria #3117 O",
            "StreetLine2": "Col. Loma Bonita",
            "ZipCode": "45086",
            "City": "Zapopan",
            "County": "Zapopan",
            "State": "Jalisco",
            "Country": "Mexico",
            "StateCode": "JA",
            "CountryCode": "MX",
            "Phone1": "3338257149",
            "Email": "contacto@airpost.mx"
        },
        "Recipient": {
            "ContactName": "Juan Pérez",
            "Company": "Museo Tamayo",
            "StreetLine1": "Paseo de la Reforma #51",
            "StreetLine2": "Col. Bosque de Chapultepec",
            "ZipCode": "11580",
            "City": "Miguel Hidalgo",
            "County": "Miguel Hidalgo",
            "State": "Ciudad de México",
            "Country": "Mexico",
            "StateCode": "DF",
            "CountryCode": "MX",
            "Phone1": "5541228200",
            "Email": "contacto@museo.org"
        },
        "Packages": [
            {
                "Weight": 3,
                "Length": 41,
                "Height": 31,
                "Width": 20,
                "Content": "LIBROS",
                "Service": {
                    "ServiceId": 13,
                    "Carrier": {
                        "CarrierId": 10,
                        "CarrierName": "UPS"
                    }
                }
            }
        ]
    }
}


# Example Response
{
    {
    "Shipment": {
        "ShipmentId": 999669,
        "Sender": {
        "Id": 71632,
        "ContactName": "JUAN PÉREZ",
        "Company": "AIRPOST GROUP",
        "GovernmentId": "",
        "TaxpayerId": "",
        "Phone1": "3338257149",
        "Ext1": "",
        "Phone2": "",
        "Ext2": "",
        "MobilePhone": "",
        "Email": "CONTACTO@AIRPOST.MX",
        "StreetLine1": "AV. PATRIA #3117 O",
        "StreetLine2": "COL. LOMA BONITA",
        "ZipCode": "45086",
        "City": "ZAPOPAN",
        "County": "ZAPOPAN",
        "State": "JALISCO",
        "Country": "MÉXICO (MX)",
        "StateCode": "",
        "CountryCode": ""
    },
    "Recipient": {
        "Id": 55534,
        "ContactName": "JUAN PÉREZ",
        "Company": "MUSEO TAMAYO",
        "GovernmentId": "",
        "TaxpayerId": "",
        "Phone1": "5541228200",
        "Ext1": "",
        "Phone2": "",
        "Ext2": "",
        "MobilePhone": "",
        "Email": "CONTACTO@MUSEO.ORG",
        "StreetLine1": "PASEO DE LA REFORMA #51",
        "StreetLine2": "COL. BOSQUE DE CHAPULTEPEC",
        "ZipCode": "11580",
        "City": "MIGUEL HIDALGO",
        "County": "MIGUEL HIDALGO",
        "State": "CIUDAD DE MÉXICO",
        "Country": "MÉXICO (MX)",
        "StateCode": "",
        "CountryCode": ""
    },
    "ShipmentDate": "2018-01-11T18:11:11",
    "ValueAddedServices": [],
    "Packages": [
        {
        "PackageId": 100251572,
        "Service": {
        "ServiceId": 13,
        "Carrier": {
            "CarrierId": 10,
            "CarrierName": "UPS",
            "IsSuggestedProvider": false
            },
            "ServiceName": "NACIONAL EXPRÉS",
            "Unit": "",
            "PublicPrice": 0,
            "TaxRate": 0,
            "Currency": "",
            "EstimatedDeliveryDate": null,
            "IsExtendedArea": false
        },
        "TrackingNumber": "1Z10A10X0493890107",
        "Weight": 3,
        "Length": 41,
        "Height": 31,
        "Width": 20,
        "TaxRate": 16,
        "PublicPrice": {
        "Amount": 1,
        "Currency": "MXN"
        },
        "DeclaredValue": {
        "Amount": 0,
        "Currency": "MXN"
        },
        "Content": "LIBROS",
        "Reference": "",
        "IsExtendedArea": false,
        "IsPickedUp": false,
        "IsDelivered": false,
        "EstimatedDeliveryDate": "0001-01-01T00:00:00",
        "DeliveryDate": "0001-01-01T00:00:00",
        "ReceivedBy": "",
        "ShipmentStatus": "",
        "ShipmentStatusCode": "",
        "ShipmentSubstatus": "",
        "Events": []
        }
        ]
    },
    "Label": {
        "ShippingLabelBase64": ""
    },
    "Notifications": [
    {
        "Code": "0",
        "Message": "La solicitud ha sido procesada exitosamente.",
        "Severity": 3
    }
    ]
    }
}

Lista de notificaciones

Lista de notificaciones

0:
SUCCESSFUL_REQUEST SUCCESS
The request has been processed successfully.
1:
UNSUPPORTED_LANGUAGE FAILURE
The preferred language is not currently supported.
2:
WEIGHT_CANNOT_BE_ZERO FAILURE
The weight of the packages to be documented must be greater than zero.
3:
NO_COVERAGE FAILURE
There is no coverage for the information provided.
4:
WEIGHT_EXCEEDS_THE_LIMIT FAILURE
There are no available services for the weight or the dimensions provided.
5:
DATA_IS_INVALID_OR_INCOMPLETE FAILURE
The data in the request you provided is invalid or incomplete.
6:
SENDER_DATA_IS_INVALID_OR_INCOMPLETE FAILURE
The sender data in the request you provided is invalid or incomplete.
7:
RECIPIENT_DATA_IS_INVALID_OR_INCOMPLETE FAILURE
The recipient data in the request you provided is invalid or incomplete.
8:
INVALID_AUTHENTICATION_CREDENTIALS FAILURE
The authentication credentials are not valid.
9:
USER_IS_NOT_ENABLED FAILURE
The user is not enabled.
10:
ACCOUNT_HAS_DEBT FAILURE
Your account is inactive because it has debts. Regularize your situation to continue with the service.
11:
UNSUPPORTED_OPERATION FAILURE
The search criteria is not valid or is not currently supported.
12:
NO_RESULTS_HAVE_BEEN_FOUND FAILURE
No results were found for the search information you have provided.
13:
SHIPMENT_WITHOUT_PACKAGES FAILURE
The shipment must contain at least one package.