Skip to content

POST

Description

The pre-shipment API allows you to create GlobAllPack shipping orders. It has a POST method where the necessary data is sent to create the order, and in response, a tracking number is provided to monitor the shipment.

Endpoint

Body

{
    "ContratoUltimaMilla": "5000000",
    "ContratoCourier": "190684",
    "NumeroEnvioTerceros": "123456789",
    "NumeroGuiaHija": "GUIA-HIJA-EJEMPLO",
    "IdPedido": "120003",
     "Origen": {
        "Postal": {
            "Pais" : "US",
            "Localidad": "DORAL",
            "CodigoPostal": "33915",
            "Calle": "NW 37th Street",
            "Numero": "7801",
            "Region": "Florida",
            "ComponentesDeDireccion": null
        }
    },
    "Destino": {
        "Postal": {
            "Pais" : "ARG",
            "Localidad": "LA PLATA",
            "CodigoPostal": "1900",
            "Calle": "Avenida Principal",
            "Numero": "4600",
            "Region": "Buenos Aires",
            "ComponentesDeDireccion": [
                {
                  "Meta": "piso",
                  "Contenido": "1"
                },
                {
                  "Meta": "departamento",
                 "Contenido": "D"
                },
                {
                  "Meta": "Observaciones",
                 "Contenido": "Edificio blanco antes de la esquina"
                }
            ]
        }
    },
    "Remitente": {
        "NombreCompleto": "Juan Pérez",
        "Email": "[email protected]",
        "DocumentoTipo": "1",
        "DocumentoNumero": "99999999",
        "Telefonos": [
            {
              "Tipo": 1,
              "Numero": "11112234"
            }
        ]
    },
    "Destinatario": 
        {
            "NombreCompleto": "Adrian Lopez",
            "Email": "[email protected]",
            "DocumentosIdentidad": [
                {
                   "DocumentoTipo": "DNI",
                   "DocumentoNumero": "99999999"
                },
                {
                  "DocumentoTipo": "CUIL",
                  "DocumentoNumero": "20-99999999-7"
                }

            ],
            "Telefonos": [
                {
                  "Tipo": 1,
                  "Numero": "11233412"
                }
            ]
        }
    ,
    "Bultos": [
        {
          "ReferenciaTracking": "TRK-91860000002",
          "OperadorLogisticoOrigen" : "amazon",
          "Kilos": 1,
          "AltoCm": 23,
          "AnchoCm": 28,
          "LargoCm": 37,
          "VolumenCm": 23828,
           "Referencias": [
              {
                "Meta": "idCliente",
                "Contenido": "120003"
              }, 
              {
                "Meta": "Observaciones",
                "Contenido": "El producto es frágil"
              }
            ],
            "Productos": [
                {
                 "Descripcion": "descripcion producto",
                  "Categoria": "",
                  "Url": "https://tiendaonline/producto",
                  "Cantidad": 1,
                  "HSCODE": "61052020",
                  "ValorUnitario": 5000.70,
                  "ValorFOB": 600,
                  "SKUWeight": 3.82,
                  "Cif": 200.2
                }
            ], 

            "Factura" : {
                "url" : "",
                "base64" : ""
            }
        }
    ],
    "Remito": {
        "NumeroRemito": "120003"
    }
}

Explanation of the JSON fields

FIELD DESCRIPTION REQUIRED MAX LENGHT OBSERVATION
ContratoUltimaMilla Contract to register the shipment in Andreani NO
ContratoCourier Contract dedicated to the Courier service type YES
NumeroEnvioTerceros Shipping number assigned by a third party or external logistics operator NO
NumeroGuiaHija Child guide number associated with the order NO
IdPedido Shipment ID provided by the client YES
Origen.Postal.Pais Shipment origin country (International country code) YES More info in special validations
Origen.Postal.Localidad City of shipment origin YES 40 More info in special validations
Origen.Postal.CodigoPostal Postal code of shipment origin YES More info in special validations
Origen.Postal.Calle Street of shipment origin YES 40 More info in special validations
Origen.Postal.Numero Street number of shipment origin NO 40 More info in special validations
Origen.Postal.Region Province/state/region of origin of shipment (ISO code or name) YES More info in special validations
Origen.ComponentesDeDireccion Allows managing additional information about the origin location, e.g., floor and apartment NO More info in special validations
Destino.Postal.Pais Destination country of the shipment (International country code) YES More info in special validations
Destino.Postal.Localidad City of shipment destination YES 40 More info in special validations
Destino.Postal.CodigoPostal Postal code of shipment destination YES More info in special validations
Destino.Postal.Calle Street of shipment destination YES 40
Destino.Postal.Numero Street number of shipment destination NO 40
Destino.Postal.Region Province/state of shipment destination YES More info in special validations
Destino.ComponentesDeDireccion Allows managing additional information about the destination location, e.g., floor and apartment NO More info in special validations
Remitente.NombreCompleto Sender's full name YES 40
Remitente.Email Sender's email YES 40
DocumentoTipo Specify value 1 NO
DocumentoNumero Sender's document number NO
Remitente.Telefonos.Tipo Specify value 1 NO
Remitente.Telefonos.Numeros Sender's phone number NO
Destinatario.NombreCompleto Recipient's full name YES 40
Destinatario.Email Recipient's email YES 40
Destinatario.DocumentosIdentidad Required to specify the recipient's DNI and CUIL/CUIT YES More info in special validations
Destinatario.Telefonos.Tipo Specify value 1 YES
Destinatario.Telefonos.Numero Recipient's mobile phone number YES
bultos.ReferenciaTracking This field can be used to report the tracking number assigned to the package from the origin. NO
bultos.OperadorLogisticoOrigen Name of the person/company that dispatches the product from the origin to the logistics operator responsible for shipping the package to its destination. NO
bultos.kilos Weight of the package in kilograms YES 12.3
bultos.AltoCm Height of the package in centimeters YES
bultos.AnchoCm Width of the package in centimeters YES
bultos.LargoCm Length of the package in centimeters YES
bultos.Volumen Package volume YES 6.2 If this value is present, the dimensions become optional
bultos.Refencias Meta-Content Object. The property "idcliente" must reference "IdPedido". Additional observations can be added YES More info in special validations
bultos.Productos.Descripcion Complete description of the product inside the box. Include construction materials and detailed information. YES
bultos.Productos.Categoria Category to which the product belongs NO
bultos.Productos.Url Purchase link for the product NO
bultos.Productos.Cantidad Quantity of the product YES
bultos.Productos.HSCODE Tariff classification code of the product. This code must have a minimum of 6 digits and a maximum of 11. NO
bultos.Productos.ValorUnitario Price per unit of the product YES
bultos.Productos.ValorFOB Price of the product once it is in transit YES
bultos.Productos.SKUWeight Weight of the product in Stock Keeping Unit. NO
bultos.Productos.Cif Cif Value of the product. NO
bultos.Factura.Url URL to download the purchase invoice for the package contents NO If providing the invoice, it must be either the URL or the Base64, not both
bultos.factura.base64 Base64 of the purchase invoice for the package contents NO If providing the invoice, it must be either the URL or the Base64, not both
Remito.NumeroRemito Purchase delivery note number NO


Special validations


Origin Address

In case that the service and contract indicate that the customer/supplier informs GlobAllPack of the shipment and transports it to the destination country, it is validated that the country and region of origin comply with the ISO CODE 3166 standard.

📊 Supported regions for US (United Estates) and CN (China)

In case the service and contract indicate that the shipment is used by an international supplier (GlobAllPack informs the international supplier of the shipment created) the specific address of the information must be indicated for the API to transmit the information.

Possible options in the latter case:

Origin Operator Address
US TransExpress
        "Postal": {
            "Pais" : "US",
            "Localidad": "DORAL",
            "CodigoPostal": "33915",
            "Calle": "NW 37th Street",
            "Numero": "7801",
            "Region": "Florida",
            "ComponentesDeDireccion": null
        }
                    

Destination Address

The destination data must match the normalized data by Andreani:

API: https://apis.andreani.com/v1/localidades (no authentication required)

Info and documentation: https://developers.andreani.com/en/document

Transport and distribution -> master data -> Locations

Recipient Identity Documents

It is required to indicate the DNI and CUIL/CUIT of the recipient, and inform it in the following way in the DocumentosIdentidad array within the Destinatario object.

{
 "Destinatario": 
        {

            "DocumentosIdentidad": [
                {
                    "DocumentoTipo": "DNI",
                    "DocumentoNumero": "99999999"

                },
                {
                    "DocumentoTipo": "CUIL",
                    "DocumentoNumero": "20-99999999-7"

                }

            ]
        }
}

Referencias into Bultos array

The package/box must be associated with the IdPedido (Order Id) with the meta "IdCliente"

{
"IdPedido" : "120003",
 "Bultos": [
    {
      "ReferenciaTracking": "COD4535",
      "Kilos": 1,
      "AltoCm": 23,
      "AnchoCm": 28,
      "LargoCm": 37,
      "VolumenCm": 23828,
        "Referencias": [
          {
            "Meta": "idCliente",
            "Contenido": "120003"
          }
        ]
    }
 ]
}

Optionally, observations about the box/package can be indicated.

{
 "Bultos": [
    {
      "ReferenciaTracking": "COD4536",
      "Kilos": 1,
      "AltoCm": 23,
      "AnchoCm": 28,
      "LargoCm": 37,
      "VolumenCm": 23828,
        "Referencias": [
          {
            "Meta": "Observations",
            "Contenido": "The box contains glass items"
          }
        ]
    }
 ]
}

Response

Status 202 (Accepted)

{
  "envios": [
    {
        "numeroEnvio": "360000445193980",
        "numeroBulto": "1",
        "etiqueta": "https://apietiqueta.com/v2/ordenes-de-envio/0001111771336/etiquetas?bulto=1"
    }
    ],
    "etiquetaAgrupador": "https://apietiqueta.com/v2/ordenes-de-envio/0001111771336/etiquetas",
    "sucursalDeDistribucion": {
        "nomenclatura": "LPC",
        "descripcion": "LA PLATA (CALLE 2)",
        "id": "7"
    },
    "sucursalDeRendicion": {
        "nomenclatura": "RZS",
        "descripcion": "AVELLANEDA (LOG INVERSA ZS)",
        "id": "2"
    },
    "contrato":"22222222",
    "cliente": "00128889889",
    "numeroDePermisionaria": "RNPSP Nº 586",
    "descripcionServicio": "Encomienda eCommerce",
    "canal": "B2C"
}
FIELD DESCRIPTION
envios.numeroEnvio Shipping number assigned to the package/parcel. It is the tracking number throughout the shipping lifecycle.
envios.numeroBulto Identifier of the package/parcel in the shipping order.
envios.etiqueta The link allows obtaining the shipping label associated with the package/parcel.
etiquetaAgrupador Allows obtaining all labels of the packages within the shipping order.


Status 202 (Accepted)

If the shipping data is correct, but errors are detected in the invoices, the request will still be accepted. The response will inform the user that there was an error saving the invoice. Once the shipment is created, it is possible to resend the invoices using the PUT method.

{
    "envios": [
        {
            "numeroEnvio": "360000445193980",
            "numeroBulto": "1",
            "etiqueta": "https://apietiqueta.com/v2/ordenes-de-envio/0001111771336/etiquetas?bulto=1"
        }
    ],
    "etiquetaAgrupador": "https://apietiqueta.com/v2/ordenes-de-envio/0001111771336/etiquetas", 
     "errorFactura": [
        {
            "status": 400,
            "url": null,
            "mensaje": "Validation failed: \n -- Base64: El valor debe ser Base64 válido. Severity: Error"
        }
    ]
}


Status 400 (BadRequest)

Occurs when a required field is missing.

[
    {
        "Code": "NotEmptyValidator",
        "Property": "Request.Destino.Postal.CodigoPostal",
        "Message": "El campo CodigoPostal en Destino es obligatorio."
    }
]


Status 400 (BadRequest)

Occurs when some data is invalid.

{
    "error": {
        "titulo": "Error de validación",
        "mensaje": "No se encuentran sucursales para los filtros ingresados"
    }
}


PUT

Descripción

The PUT method allows you to send the purchase invoices for the packages after creating a shipment order.

Endpoint

Body

{
    "numeroEnvio" : "360000445193920",

    "Factura" : {
        "url" : "",
        "base64" : ""
    }
}
FIELD DESCRIPTION
numeroEnvio Tracking number provided when creating the shipment order
Factura.url Field to attach the invoice URL. It must be accessible without authentication
Factura.base64 Field to attach the invoice in BASE64 format

The invoice must be provided either as a URL or base64, not both.

The document must be in PDF format.


Response

Status 200 (OK)

{
    "envios": [
        {
            "numeroEnvio": "360000445193980",
            "numeroBulto": "1",
            "etiqueta": "https://apietiqueta.com/v2/ordenes-de-envio/0001111771336/etiquetas?bulto=1"
        }
    ],
    "etiquetaAgrupador": "https://apietiqueta.com/v2/ordenes-de-envio/0001111771336/etiquetas"
}


Status 400 (BadRequest)

Occurs when there are issues with the file format submitted.

{
    "errorFactura": [
        {
            "status": 400,
            "url": null,
            "mensaje": "El archivo proporcionado no es un Pdf válido."
        }
    ]
}


Status 404 (NotFound)

Occurs when a non-existent tracking number is provided.

{
    "error": {
        "titulo": "NotFound",
        "mensaje": "No se ha encontrado un envio con el numero 3600004451888"
    }
}

ETIQUETAS (GET)

Description

When a shipment order is created, the response includes a URL from which the labels can be obtained. These labels are available in PDF format (by default) or in ZPL format. The label size is 15 centimeters in length and 10 centimeters in width.

  • You can obtain the label for a shipment by tracking number: ordenes-de-envio/{numeroEnvio}/etiquetas
  • If you want all the labels of an order, you must query the "etiquetaAgrupador" field from the response after creating the shipment order with the POST method.

Endpoint

ZPL

To receive the response in ZPL format, the following header must be included in the request:

Accept: application/zpl

Label Example

label

Example with Postman:

alt text