Skip to content

GenerateAWBData

Creates an air waybill (AWB) and returns its number and charges. To also receive the label in PDF in the same call, use GenerateAWBDataPrint.

URL

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

Parameters

Send them as JSON (Content-Type: application/json).

Name Type Required Rules
userId text Yes Your Kiwi username (the same one used to request the token)
password text Yes Your Kiwi password. Case sensitive
reference text Yes Your internal shipment or order number
sender text Yes Sender's name
senderAddress text Yes Sender's address
senderPhone text Yes Sender's phone number
senderCity text Yes Sender's city. For shipments from outside the USA, use MIAMI
senderState text Yes Sender's state. For shipments from outside the USA, use FL
senderCountry text Yes Sender's country, ISO 2-letter code. For shipments from outside the USA, use US
senderZip text Yes 5-digit ZIP code. For shipments from outside the USA, use 33172
senderMail text No Sender's e-mail
recipient text Yes Recipient's name
recipientAddress text Yes Recipient's address
recipientPhone text Yes Recipient's phone number
recipientCity text Yes Destination city name, as it appears in the list of destination cities, or its official code
recipientState text Conditional State, province or department. Required when recipientCity is a name; optional with the official code
recipientId text Conditional Recipient's identification number. Required for Ecuador (EC); the check digit is validated
recipientMail text No Recipient's e-mail. Recommended: it helps with last-mile delivery
destinationCountry text Yes Destination country, ISO 2-letter code: CO Colombia, EC Ecuador
units number Yes Always 1
weight number Yes Weight in pounds. From 0.001 to 110, up to 3 decimals
unitWeight text No Send LB. This method does not convert units: weight is always read in pounds and the dimensions in inches
declaredValue number Yes Declared value in USD, up to 2 decimals
contentShipping text Yes Description of the content
long number Yes Length in inches, up to 2 decimals
wide number Yes Width in inches, up to 2 decimals
high number Yes Height in inches, up to 2 decimals
shippingType text Yes SPX, DOC, CTC or BFR. See Shipping types and tariff positions
tariffPosition text Yes Tariff position. See Shipping types and tariff positions
AWBNumber number Yes 0, unless Servientrega USA assigned you a range of AWB numbers

Note

Use a dot (.) as the decimal separator in every number.

Request example

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

awb.json:

{
  "userId": "<YOUR_USERNAME>",
  "password": "<YOUR_PASSWORD>",
  "reference": "ORDER-10001",
  "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": 2.820,
  "unitWeight": "LB",
  "declaredValue": 146.78,
  "contentShipping": "CLOTHING AND ACCESSORIES",
  "long": 10.00,
  "wide": 8.00,
  "high": 4.00,
  "shippingType": "SPX",
  "tariffPosition": "98.07.20.00.00",
  "AWBNumber": 0
}

Response example

{
  "result": true,
  "entities": [
    {
      "shippingId": 8800061,
      "freightValue": 11.00,
      "overFreightValue": 0.00,
      "taxValue": 0.00,
      "valueOthers": 0.00,
      "totalValue": 11.00,
      "volumeInvoice": 0.000
    }
  ],
  "messages": [
    "Record created successfully",
    "Time execution:1564 ms."
  ],
  "notificationType": 3
}
Field Meaning
shippingId AWB number. Use it to print the label and to track the shipment
freightValue Freight
overFreightValue Additional freight
taxValue Taxes
valueOthers Other charges
totalValue Total
volumeInvoice Volume calculated from the dimensions sent (long, wide, high)

Notes