Everything the portal’s Order Numbers page does, your own systems can do through the API. The full reference lists every call and its fields. This page covers how they fit together. Once a number is yours, Managing numbers by API covers routing, emergency addresses, SMS delivery and releasing it.
Scopes
voice:readfinds areas, searches numbers, reads orders and looks numbers up.voice:createholds a number and places an order.
A key acts for your whole account, so a partner’s limits in the portal don’t apply to it.
Ordering a local number for a customer’s address
- Search for the address with
GET /addresses/search. - Send its
fullAddresstoGET /numbers/areas?address=. You get the numbering areas (SZUs) that serve it, best match first. Our supplier answers this, so it can take up to a minute. - Search the first area with
GET /numbers/available?type=fixed&szu=…. AddblockSize=10orblockSize=100for a block. You get up to five numbers, or the block you would get, each with its monthly and setup price per number, without GST, the GST, and with GST. - To pick one of our numbers, hold it with
POST /numbers/holds. It is yours for 24 hours (heldUntil), and nobody else can take it. A hold can’t be extended. - Order with
POST /numbers: the type, area and size, theholdIdor, as below, theofferId, the trunk’ssipUsername, and the emergency address the number is listed at. AnIdempotency-Keyis required, so a retry never orders twice. - The order answers
202with aLocation. Read it withGET /numbers/orders/{id}until it iscompleted, with each number and its route, orfailed, with the reason.
Leave the hold out to take the next number we hold. Send spare: true
instead of a trunk and address to keep the numbers on no service, routed to
Disconnected until you route them.
Numbers from our supplier
Where we hold no stock for an Australian geographic number, the search shows
what our supplier offers, marked source: supplier, with an offerId.
Nothing is reserved with the supplier until you order. The order buys the
number, then sets it up as usual. Our supplier’s numbers can’t be held before
you order, and can’t go into a bundle.
If the order buys the number and then can’t be placed, the 422 gives an
error.holdId and error.heldUntil. The number you bought is held for you
until then. Fix what was wrong and order again with that holdId and the
same type, area and size. The number is used without being bought again.
Orders in a bundle
Send bundle with the bundle’s id to add the order to it. The order is a
draft and nothing is allocated until the bundle is released, so the
numbers don’t go live before the service they are for. A bundle that has been
submitted takes nothing more.
When a hold has run out
An order naming a hold that has run out answers 422 with the code
hold_expired. Hold the number again if it is still free, or choose another.
How many numbers you can hold
Your account can hold 50 numbers at once. Numbers being ordered count too.
One more hold answers 409 saying you are at your limit. Order one of the
numbers you hold, or wait for a hold to run out, then try again. Ask us if
you need a higher limit.
Looking up a number before a port
POST /numbers/lookup takes a batch of Australian numbers and says, for
each, which carrier it was assigned to, who serves it now, its numbering
area, whether it is already porting, and whether we already hold it, with how
current the answer is (asAt). portable is a hint from those last two
answers only, not a check that a port will be accepted.
Each number counts against your account’s daily lookup allowance, the same
one the portal’s Number Lookup uses. A batch that would go over it is refused
whole with 429. error.allowance gives how many you have used, the limit
and how many you asked for. Retry-After gives the seconds until it resets
at midnight Brisbane time.
Emergency addresses from an address search
When you create or change an emergency address, send the gnafId of an
address search result as serviceAddress.gnafPid and leave the other address
fields out. We fill the building, unit, level, street number, street name and
type, locality, state and postcode in the shape the emergency register needs,
as the portal does when you pick an address. A field you send beside it wins.
The same works for a directory address, as directoryAddress.gnafPid.