Skip to main content

Tickets

Some things Axis does straight away, like renaming a pool. Others have to be done by the mobile network: switching a SIM on or off, sending it an SMS, putting it on a plan. Those can't finish within your request, so Axis sends them to the network as a ticket and answers 202 Accepted at once. The network usually finishes within seconds, occasionally a few minutes.

What raises a ticket​

ActionEndpointTicket type
Suspend a SIMPOST /sims/{id}/suspendsuspend
Reactivate a SIMPOST /sims/{id}/activateactivate
Send an SMSPOST /sims/{id}/smssend_sms
Refresh a connectionPOST /sims/{id}/refreshrefresh
Put a SIM with no plan on onePUT /sims/{id}/planprovision
Add or remove a Fixed Public IPPOST / DELETE /sims/{id}/fixed-public-ipadd_fixed_public_ip, remove_fixed_public_ip

Two more appear in a SIM's ticket history at the start of a month, when a change you queued earlier takes effect (see Change a SIM's plan): unprovision when a SIM comes off its plan, and reprovision when it moves to another pool or tariff.

The answer you get​

HTTP/1.1 202 Accepted
Location: /api/v1/tickets/3f2b8c1e-7d4a-4f9e-9b61-2c0d5e8a7f13
{
"id": "3f2b8c1e-7d4a-4f9e-9b61-2c0d5e8a7f13",
"simId": 4183,
"type": "suspend",
"status": "processing",
"createdAt": "2026-10-08T14:30:02Z",
"provisioning": null
}

How a ticket ends​

StatusMeaning
pendingAccepted by Axis, about to go to the network
processingWith the network
completedDone: the SIM is in its new state
failedThe network couldn't do it. The SIM is as it was; try again, or contact support if it keeps failing
cancelledCancelled before the network started on it

Finding out when it's done​

Best: webhooks. Set a webhook URL and Axis posts ticket.completed or ticket.failed as soon as the network finishes. No polling, nothing missed. See Webhooks.

Or poll the ticket. Ask every few seconds until it's no longer pending or processing, and give up after a few minutes:

async function waitForTicket(id, { everyMs = 5000, timeoutMs = 5 * 60_000 } = {}) {
const until = Date.now() + timeoutMs;
while (Date.now() < until) {
const res = await fetch(`https://app.zentarinetworks.com/api/v1/tickets/${id}`, {
headers: { Authorization: `Bearer ${process.env.AXIS_API_KEY}` },
});
const ticket = await res.json();
if (!['pending', 'processing'].includes(ticket.status)) return ticket; // completed, failed or cancelled
await new Promise((r) => setTimeout(r, everyMs));
}
throw new Error(`Ticket ${id} still running after ${timeoutMs / 1000}s`);
}

You can also list a SIM's tickets with GET /tickets?simId=4183, and every SIM has processingTickets: how many of its tickets are still with the network.

One change of each kind at a time​

While a SIM has a ticket of one type still running, another of the same type is refused with 409 conflict. For example, a second suspend while the first is with the network. Wait for the first to finish. Different actions can overlap (you can send an SMS while a refresh is running).

Cancelling a ticket​

POST/api/v1/tickets/{id}/cancelTry it →

Only while it's pending or processing and the network hasn't started on it. Otherwise you get 409. In practice most tickets finish too quickly to cancel.