Skip to content

GenerateAWBDataPrint

Creates an air waybill (AWB) and, in the same call, returns its label in PDF.

URL

POST https://ocelot.servientrega.us/api/KiwiService20/kwapi/GenerateAWBDataPrint
POST https://ocelotkiwi.azurewebsites.net/api/KiwiService20/kwapi/GenerateAWBDataPrint

Parameters

The same parameters as GenerateAWBData, plus:

Name Type Required Rules
language text Yes Always EN
reportId number Yes 18 label 6" × 4" · 3 letter size
printCopies number Yes 2 for letter size (reportId 3); 1 for the label

Request example

curl -X POST "https://ocelot.servientrega.us/api/KiwiService20/kwapi/GenerateAWBDataPrint" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d @awb-print.json
curl -X POST "https://ocelotkiwi.azurewebsites.net/api/KiwiService20/kwapi/GenerateAWBDataPrint" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d @awb-print.json

awb-print.json:

{
  "userId": "<YOUR_USERNAME>",
  "password": "<YOUR_PASSWORD>",
  "reference": "ORDER-10002",
  "sender": "JOHN SAMPLE",
  "senderAddress": "100 SAMPLE ST",
  "senderPhone": "3055550100",
  "senderCity": "MIAMI",
  "senderState": "FL",
  "senderCountry": "US",
  "senderZip": "33172",
  "senderMail": "sender@example.com",
  "recipient": "MARIA EJEMPLO",
  "recipientAddress": "CALLE 100 # 10-20 APTO 301",
  "recipientPhone": "3005550100",
  "recipientCity": "BARRANQUILLA",
  "recipientState": "ATLANTICO",
  "recipientId": "",
  "recipientMail": "recipient@example.com",
  "destinationCountry": "CO",
  "units": 1,
  "weight": 3.000,
  "unitWeight": "LB",
  "declaredValue": 250.00,
  "contentShipping": "SATIN SKIRT",
  "long": 15.00,
  "wide": 10.00,
  "high": 15.00,
  "shippingType": "SPX",
  "tariffPosition": "98.07.20.00.00",
  "AWBNumber": 0,
  "language": "EN",
  "reportId": 18,
  "printCopies": 1
}

Response example

{
  "result": true,
  "entities": [
    {
      "shippingId": 19000017,
      "freightValue": 10.90,
      "overFreightValue": 12.50,
      "taxValue": 77.79,
      "valueOthers": 0.00,
      "totalValue": 107.19,
      "volumeInvoice": 13.55,
      "reportData": "JVBERi0xLjYKJdP0zOEKNSAwIG9iago8PAovVHlwZS9QYWdlCi9...",
      "imageCityData": ""
    }
  ],
  "messages": [
    "Record created successfully",
    "Time execution:3606 ms."
  ],
  "notificationType": 3
}

The fields are the same as in GenerateAWBData, plus:

Field Meaning
reportData The label in PDF, encoded in base64
imageCityData Destination city image, encoded in base64. Ecuador shipments only; empty for other countries

Notes

  • Decode reportData from base64 and save it as a .pdf file to print it.
  • If the AWB was created but the PDF could not be generated, you can print it later with PrintAWB or PrintAWBLabel using the shippingId. Do not call this method again: it would create another AWB.