AWB Generation
You can let Shadowfax assign an AWB automatically at order creation, or pre-generate AWB numbers and pass one in order_details.awb_number when you place the order. Two endpoints cover this, and they behave differently — pick based on what you need.
Pool Replenishment (Conditional)
Requests a batch of AWBs, topped up from your existing unused pool. If you already have enough unused AWBs sitting idle, this can return those instead of minting new ones — it only generates fresh numbers when your unused pool is below the requested count.
Code
Code
count defaults to 10, max 100,000 per call. Use this when you just need a working pool of AWBs on hand and don't care whether they're brand new.
See Generate AWBs (Pool Replenishment) in the API Reference.
Fresh Generation (Always New)
Requests AWBs that are guaranteed newly minted, regardless of how many unused ones you already have. This is asynchronous — you submit a request, then poll for the result.
1. Submit the request:
Code
Code
request_type is fwd or rev. awb_count defaults to 1000, max 100,000. delay_time (seconds) is how long to wait before polling — it scales with request size and how many of your requests are already queued.
2. Poll for the result:
Code
Code
While the batch is still generating, this returns "status": "PENDING" with "retry_flag": true — wait and poll again. Use this when you specifically need guaranteed-fresh AWBs (for example, reconciling with an external system that can't tolerate reused numbers) rather than just topping up a working pool.
See Request Fresh AWBs and Poll for Result in the API Reference.