roguemobile API Documentation
Version: 0.27.9 · 2026-10-24
Base URL: https://rogue.gcsl.ai/v1
Online API reference
Account and API Key
The platform provides a channel account (your channel code) and a fixed API Key. Send both in the headers of each request. No login, temporary token or token refresh is required.
X-Partner-Id: YOUR_CHANNEL_CODE
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Test access with a balance query:
curl 'https://rogue.gcsl.ai/v1/balance' \
-H 'X-Partner-Id: YOUR_CHANNEL_CODE' \
-H 'X-API-Key: YOUR_API_KEY'
Replace the placeholders with your credentials. The key has no scheduled expiry; resetting it immediately invalidates the old value. If your channel code changes, update X-Partner-Id. Send these headers from your server over HTTPS, not from a public browser page, and never put keys in URLs. Do not combine them with an Authorization header.
All paths below are relative to /v1; do not add /v1 twice. JSON requests require Content-Type: application/json. Normal responses use data and meta; HTTP error responses use error and meta. A successful /ledger/export returns CSV. Changing the documentation language does not change API fields, state values or error codes. Base program logic on error codes, not the wording or language of the readable message.
The documentation website only executes read requests. Test POST and other write examples with a separately configured isolated test environment and test credentials; the production URL in this guide is not a sandbox.
Optional fields may be omitted; send null only where the schema explicitly permits it. For example, txid: null or change_type: null returns HTTP 400 instead of generating a transaction ID or choosing immediate renewal. Query parameters must match the documented formats and allowed values. Repeating a single-value parameter, supplying an invalid date or using an invalid boolean returns 400 instead of ignoring the invalid filter and broadening the query.
Only documented query parameters provide the corresponding filters; undeclared parameters may be ignored. For example, /ledger does not support a type filter. Use its documented from, to, page and per_page parameters. Requests rejected by the gateway before reaching the application, such as invalid URL encoding, may return plain-text errors. Check the HTTP status and Content-Type first; do not assume every error has JSON or meta.request_id.
Send a UTF-8 JSON object without duplicate member names (including names written with Unicode escapes). Authentication, signature and request-format headers must not be repeated; ambiguous requests are rejected before processing.
When service processing is paused for a channel, authentication and GET queries remain available, including balance, catalog, assigned SIMs, jobs, ledger and supplied eSIM installation details. Data sync via POST /cards/{iccid}/sync and original-job rechecks via POST /jobs/{id}/recheck also remain available; neither resubmits a service operation. Service submissions, retries and processing resumes return HTTP 403 with error.details.business_code=CHANNEL_ORDERS_PAUSED; no new service job is created or charged. A fully disabled channel cannot authenticate or use protected query or service endpoints.
Optional service address for a purchase
For activation, renewal, reactivation, Wi-Fi calling or automatic handling, supply service_address on the request or an item. A per-item address takes priority. Supply address, city, two-letter state, five-digit zip and optional address_two. A complete new address replaces the previous unit as well. With no override, existing lines use their stored address for operations that require it. Activation uses the selected catalog entry and any override must have its ZIP. The platform saves the address after the line succeeds. Reactivation uses only the three verified line identifiers. A renewal transmits only the usual identifiers and renewal fields to the carrier. Wi-Fi calling customer and catalog addresses describe the emergency address; service_address explicitly updates the general card address. Historical orders keep their own handling details.
Minimum integration flow
| Step |
Request |
What to do |
| Choose a plan and city for activation |
GET /regional-catalog |
Save the chosen catalog_entry_id; it identifies both the plan and address |
| Choose the operation when the current line status is uncertain |
GET /customers?esn=... (recommended) or GET /mdns/{mdn} |
Query as needed; confirm the matching line, then use data.status: Active for renewal, Inactive for reactivation |
| Submit a service request |
A POST example for one of the four service types below |
Include one or more items, with no fixed item-count limit; a channel-unique txid is recommended |
| Read the result |
GET /jobs/{id} or a webhook |
Save the returned data.job.id; only final item states confirm success or failure |
Line identifier: ICCID is recommended. Send the ICCID in the API's esn field as an 18–22 digit string, preserving leading zeros. Do not add an iccid field in place of esn.
| Operation |
Recommended approach |
Other supported identifiers |
| Activation |
esn (ICCID) + catalog_entry_id; both are required |
A phone number or Enrollment ID cannot replace the ICCID |
| Line query |
GET /customers?esn=ICCID |
The same endpoint also accepts mdn or enrollment_id; provide exactly one of these three query keys |
| Renewal |
Send esn (ICCID, recommended) in each item |
A registered mdn or enrollment_id is also supported |
| Reactivation |
Send esn (ICCID, recommended) in each item |
A registered mdn or enrollment_id is also supported |
An ICCID identifies the intended SIM directly, reducing ambiguity from reused phone numbers or inconsistent mappings. Renewal and reactivation do not also require the phone number. If multiple identifiers are provided, they must identify the same SIM. Line queries run live by default. This recommendation applies to line identification; job lookup still uses a job ID or transaction ID, and the usage endpoint still takes the phone number defined by that endpoint.
Renewal and reactivation use the existing line and do not require a new catalog lookup. The platform checks channel ownership, line details and the applicable quote. HTTP 202 means the job was accepted.
Supplementary lookups address specific gaps: an additional submitted phone number or Enrollment ID is not yet registered and needs identity verification; renewal or reactivation lacks the current plan; or an existing line has no local SIM record. Complete local records require no extra upstream lookup. Items with missing details are accepted in the original job and enriched separately in the background, without holding complete items. Manual WFC needs no plan quote, so a missing plan alone does not trigger a lookup; a new line or missing identity still needs verification. These lookups do not establish ownership or resubmit service requests.
First activation does not require a prior inventory import or channel assignment. Items that pass catalog, state and pricing checks are assigned to the channel identified by your authentication credentials; invalid items do not change existing ownership. Already activated SIMs and SIMs with unfinished work cannot be transferred through first activation.
When a successful activation receipt returns a phone number, the platform saves its association with the ICCID. Later service requests reuse confirmed local records without a separate query to verify the same association again. Missing phone numbers are not guessed. If evidence shows that a phone has moved to another SIM, historical records are retained and the old association is not automatically attached to the original SIM.
You can start with job queries only. To receive automatic notifications, register an HTTPS callback URL once and obtain your separate Webhook Secret. No per-order callback URL is required. Recovery endpoints are only for exceptions.
Example numbers and catalog IDs are placeholders. Only submit SIMs your channel is authorized to process. Billable operations require configured prices; manual WFC is free. Amounts are USD strings.
If a line query returns UPSTREAM_INVALID_RESPONSE with Returned line identifiers do not match., pause automatic processing for that line and ask the platform to verify the phone-to-SIM record. Do not submit or repeat a service request to resolve this query error.
Activation requires esn (ICCID) and catalog_entry_id. Renewal, reactivation and standalone WFC accept esn, mdn or enrollment_id. Multiple identifiers must refer to the same SIM. For an mdn-only request, the platform resolves the ICCID from existing line and successful order records. A missing or ambiguous mapping returns LINE_IDENTITY_CONFLICT. No other SIM is searched or used, and valid siblings continue.
Pre-submission enrichment looks up each line at most once. If verification fails, that item completes with the actual error, sends its callback and incurs no charge. Other items continue. An already submitted operation with no confirmed outcome stays pending and is checked using its original job.
Only confirmed successful items are charged. Each item is charged once at its accepted quote. Failed items are not charged; acceptance and queueing do not freeze or debit funds. Balances may be negative and do not block new or accepted work. Recharges increase the balance. Manually paused or disabled channels cannot dispatch new service work. WFC is free; record-only accounts retain their agreed billing rules.
Read the account balance from GET /balance → balance; it may be negative. unsettled_amount shows accepted, unsettled quotes for reference. available_for_orders remains for compatibility and always returns null: there is no balance-based admission limit.
Validate first, then save the job and process it. Authentication, request parameters, locally verifiable identifiers and established quotes are checked first. Invalid shared parameters or identifiers also return errors immediately; item-level plan or address errors appear as failed items while valid siblings proceed. All service operations are asynchronous: the order, established quotes and pending enrichment items are saved, and an unfinished job returns HTTP 202 with job.id. Background processing then performs the operation, charges confirmed successes and sends callbacks. If every item fails local validation, HTTP 200 contains the failure results and does not mean success. Missing data triggers only necessary lookups, not a bulk synchronization of historical records.
Saved unfinished jobs resume automatically after a system update or processing interruption; do not resubmit or call resume for these interruptions. Unsent jobs remain queued. Already submitted jobs with an uncertain result query only the original job. Completed operations are not repeated or charged again. Unacknowledged callbacks continue with the same event. A restart does not reopen items with a final receipt. Query and line synchronization endpoints return their query results directly without creating service jobs.
Plans, addresses and catalog IDs
Select an entry provided by the platform. You do not need to enter a ZIP or perform a separate ZIP lookup; the platform fills the required address fields from the catalog ID. Each catalog ID identifies one combination of plan, city, state, ZIP and street address. Your page can let users choose a plan, then a city and address from that plan's catalog entries. Submit the chosen entry's catalog_entry_id; users do not need to enter it manually. The same address with a different plan has a separate entry.
Catalog address completeness, format and ZIP consistency are validated and saved when the platform imports or edits the catalog. Activation with an ICCID and catalog ID directly uses the stored plan and address, saves the request snapshot and sends it upstream; the catalog address is not revalidated for every activation, and no upstream address-validation call is made. Admission still checks catalog existence and availability, activation eligibility, pricing. An unlinked product needs platform configuration. Channels need not supply a separate address or reread the catalog for every job. Accepted jobs retain their original snapshots.
GET /regional-catalog returns configured plan-and-address entries. Each entry includes the plan, complete address, city/state, ZIP, reference area codes and channel prices. Filter by product_code, state, area_code or keyword q. Paginate with page and per_page.
Only entries currently available for ordering are returned. Submission checks availability and pricing again. The main fields are:
| Field |
Meaning |
catalog_entry_id |
Unique regional catalog entry ID |
product_code |
Platform product identifier for classification and filtering |
plan_code / plan_id |
Plan code for query display; plan_id for a plan change during renewal. Activation uses only catalog_entry_id |
plan_name |
Display name |
service_address |
Street, city, state and ZIP |
prices |
Channel prices by operation; null means unconfigured |
zip_region |
Read-only city and area-code references, including issued-number history |
Regional catalog entries include your channel's current selling prices, not the platform's procurement costs. There is no separate /prices endpoint. The fields below are within each returned entry. Amounts are USD strings; null means unconfigured.
| Operation |
Price field in /regional-catalog |
| Physical SIM activation |
prices.activate_physical |
| eSIM activation |
prices.activate_esim |
| Renewal |
prices.renew |
| Reactivation |
prices.reactivate |
Read the channel's separately configured card prices in the top-level card_fees object alongside data. Use card_fees.physical for the price per physical SIM and card_fees.esim for the price per eSIM. Both are USD strings such as "1.25", or null when unset. They are returned even when the catalog page is empty.
Price queries help you display prices or check the current configuration; they are not a prerequisite for submitting a service request. The platform determines and saves the quote when creating the order. In an order, items[].billing.price is the item quote and items[].billing.charged_amount is the charged amount; job.billing contains batch totals. Later catalog price changes do not rewrite an existing order's quote. Separately sold physical SIM/eSIM fees are recorded separately under the established billing rules.
The list already includes complete entries. Submit the selected entry directly without a separate detail request. To retrieve a saved ID later, use the same endpoint: GET /regional-catalog?catalog_entry_id=CATALOG_ENTRY_ID. The response still contains a data array, which is empty if the ID does not exist, is disabled or is unavailable. Refresh the catalog and select an available ID. Activation requires catalog_entry_id; the platform resolves the plan and complete address. An unknown or unavailable catalog entry marks that item failed; other valid items continue in the same batch. An invalid request structure, including missing required fields or unsupported fields, rejects the entire request.
Read city, state and area-code references directly from the entry's zip_region. Use zip_region.city_issued_area_codes to display confirmed issued area codes for the same city; an empty array means no confirmed history is available. Area codes do not change a catalog ID or guarantee number availability.
Included plan allowances
Each catalog entry now includes benefits with total allowances per cycle, not a line's remaining usage. The same configured product has the same allowances across cities. Catalog IDs, plan codes, addresses and existing price fields retain their meaning.
| Field |
Meaning |
benefits.data_mb / data_unlimited |
Included data in MB and whether unlimited; all four current plans use 0 / false, with no data included |
benefits.voice_minutes / voice_unlimited |
Included voice minutes and whether unlimited |
benefits.sms / sms_unlimited |
Total included SMS and whether unlimited |
benefits.sms_scope |
shared_inbound_outbound: received and sent SMS share one allowance, not one allowance for each direction |
benefits.validity_days |
Configured validity of one cycle; currently 30 days for all four plans |
| Plan |
Data |
Voice minutes |
SMS (shared received/sent) |
Days per cycle |
| Plan 65 |
Not included |
50 |
100 |
30 |
| Plan 66 |
Not included |
50 |
1500 |
30 |
| Plan 73 |
Not included |
Unlimited |
Unlimited |
30 |
| Plan 84 |
Not included |
0 |
15 |
30 |
Plan 65 example:
{"benefits":{"data_mb":0,"data_unlimited":false,"voice_minutes":50,"voice_unlimited":false,"sms":100,"sms_unlimited":false,"sms_scope":"shared_inbound_outbound","validity_days":30}}
0 means explicitly not included. Unlimited allowances use the corresponding *_unlimited=true with a null quantity; null alone never means unlimited. Products without confirmed allowance data return null for every field in benefits, without guessing or falling back to another plan.
validity_days is the configured plan cycle, not an actual expiry date or renewal effective date. Catalog reads do not query a line or the upstream service, or calculate expiry dates. Use actual receipts for line expiry and renewal dates.
Activation
POST /jobs/activations
The platform can disable API activation of a particular plan for an individual channel. A new activation request containing any disabled plan is rejected in full before admission: HTTP 403, error.code="forbidden", error.details.business_code="PLAN_DISABLED"; item_indexes lists the affected zero-based item positions. No job, debit or upstream activation is created. Remove those items or contact the platform to enable the plan before submitting again. Explicit API retries of that plan are also rejected while disabled. Jobs already accepted continue normally. This switch does not restrict renewal, reactivation, Wi-Fi Calling or catalog queries; seeing a plan in the catalog does not override this restriction.
{
"txid": "channel-activation-001",
"items": [
{
"esn": "89000000000000000001",
"catalog_entry_id": "CATALOG_ENTRY_ID"
}
]
}
Each item requires esn (ICCID as an 18–22 digit string) and the chosen catalog_entry_id. The platform fills the plan, street, city, state and ZIP from that entry; the initial attempt uses your selection. Only confirmed rate-limit recovery may change it as described below. Activation does not accept plan_code, mdn, zip, customer or batch defaults. Extra fields return HTTP 400 with UNSUPPORTED_FIELD; they are not ignored, and no order or debit is created. Add items for batch activation; each SIM may select a different entry. Area codes are references, not guaranteed selections.
For newly accepted activation items only: when the activation result is explicitly failed with error_code=rate_limited and retryable=true, the platform recovers directly from the confirmed failure receipt within the original partner job, up to twice. No recovery cooldown or repeated admission duplicate/busy-SIM checks apply. No extra job or SIM inventory lookup is required. Confirmed failed items proceed without waiting for other items in the batch. The original account, ownership, catalog and quote must remain valid. Each round starts with the most recent successful activation batch and randomly selects an available, untried catalog for the same plan and its address. Successful batches across all partners and dates are eligible; if that batch has no suitable unused catalog, the platform checks earlier batches in order. The quoted price, ICCID and partner job identifiers stay unchanged. Without an eligible catalog, or after two unsuccessful recovery rounds, the last confirmed result is returned and an alert is recorded. During recovery the job/item remains running/pending with next_action=wait; no terminal failure webhook is sent yet. Each confirmed success is charged once. A verified success from the original task or any recovery round stops further recovery for that SIM and is notified using the original partner job and item IDs. If failure was already notified, a success correction is sent; job completion reports the final totals. Duplicate receipts do not repeat settlement. Requests already sent cannot be recalled, and results from other attempts cannot overwrite an accepted success. Actual HTTP 429 Retry-After and shared request scheduling still apply. Timeouts and unknown outcomes only trigger original-job checks, without changing catalogs. Do not resubmit.
Renewal
POST /jobs/renewals
Use this endpoint to renew the plan cycle of an existing line. When selecting an operation from a line query, use renewal for data.status=Active and reactivation for Inactive. change_type chooses immediate renewal or renewal at expiry; it does not replace reactivation. See “Choose an operation from the line status” below for the full rules.
{
"txid": "channel-renewal-001",
"change_type": "ONEXPIRY",
"items": [
{
"esn": "89000000000000000001"
}
]
}
For normal renewal, send esn (ICCID, recommended) in each item; the phone number is not also required. A registered mdn (phone number) or enrollment_id is also supported. Multiple supplied identifiers must identify the same SIM. Supply txid and explicitly select either renewal mode with change_type. The platform uses that value rather than inferring a mode from the phone number or a calculated date:
| Mode |
change_type |
Cycle and charging time |
| Immediate renewal (default) |
IMMEDIATE |
Starts a new plan cycle on the processing date and provides a new set of plan allowances. Charged upon confirmed success |
| Renewal at expiry |
ONEXPIRY |
Keeps the current cycle and adds one cycle at the existing expiry. Can be submitted early; charged upon confirmed success |
Renewal at expiry can be processed now, keeping the current cycle and adding one cycle; it does not defer submission or charging until expiry. The channel is charged the quote recorded at acceptance. Use the dates explicitly returned in the receipt; do not calculate a fixed 30-day period.
The example above explicitly selects renewal at expiry. Omitting change_type selects IMMEDIATE, immediate renewal. Existing orders retain the mode recorded when submitted. For immediate renewal:
{
"txid": "channel-renewal-immediate-001",
"change_type": "IMMEDIATE",
"items": [
{
"mdn": "2025550100"
}
]
}
For a renewal, read the US Eastern service dates in data.items[].result.service_period in a job lookup or data.service_period in an item callback. Use effective_date for the renewed cycle’s start and expiry_date for the end of purchased coverage. For GET /jobs/{id}/items, the same object is at data[].result.service_period.
Read confirmed_through_date in data.items[] on job lookup, data[] on the items endpoint, and data on new item callbacks. For a single renewal it is the confirmed expiry in US Eastern time, in YYYY-MM-DD format. It is null until the expiry is confirmed. A later renewal.item.updated can provide the date.
An unfinished item has result: null. A failed renewal has service_period: null. Business job completion callbacks carry batch totals.
Lookup excerpt
{
"data": {
"items": [
{
"status": "succeeded",
"confirmed_through_date": "2026-12-16",
"result": {
"service_period": {
"status": "confirmed",
"source": "upstream",
"period_kind": "next",
"date_timezone": "America/New_York",
"success_date": "2026-10-17",
"success_date_basis": "upstream_finished_at",
"effective_date": "2026-11-16",
"current_cycle_end_date": "2026-11-16",
"expiry_date": "2026-12-16",
"as_of_date": "2026-10-17",
"reason": null
}
}
}
]
}
}
Item callback excerpt
{
"type": "renewal.item.succeeded",
"data": {
"status": "succeeded",
"service_period": {
"status": "confirmed",
"source": "upstream",
"period_kind": "next",
"date_timezone": "America/New_York",
"success_date": "2026-10-17",
"success_date_basis": "upstream_finished_at",
"effective_date": "2026-11-16",
"current_cycle_end_date": "2026-11-16",
"expiry_date": "2026-12-16",
"as_of_date": "2026-10-17",
"reason": null
},
"result_revision": 1
}
}
Service dates and expiry (US Eastern time)
Live line queries return service dates from the identity-verified upstream response. GET /customers also returns service_periods[] in chronological order. When the carrier reports only the latest scheduled cycle, intermediate cycles use matched successful original renewals and verified carrier dates. Gaps and conflicting evidence are left unresolved. service_period is the current cycle and next_service_period is the separate upcoming cycle. Inventory responses return null periods; historical order dates remain evidence for that operation.
effective_date and expiry_date are upstream calendar dates; effective_at and expiry_at include an explicit US Eastern offset when an exact clock is known. The timezone is America/New_York; source is upstream. status is confirmed when expiry is available, unknown when it is missing, or needs_review for contradictory evidence. A confirmed expiry does not imply that a start date was supplied. Missing fields remain null. No expiry is calculated from completion time, an old estimate, a month increment, or a 30-day duration.
Successful job items and new callbacks expose the same operation-specific service_period. An ONEXPIRY receipt may establish its future effective day without supplying its expiry. That expiry stays null. An embedded old current period is not the new purchased cycle. Existing raw receipts and already queued signed callback bodies remain unchanged; this policy does not replay them. Completion timestamps remain separate from service dates. Financial date filters keep their existing timezone.
Automatic handling uses the purchased-through date for the matching subscription. When a live check is needed, Active selects ONEXPIRY renewal and a verified inactive line selects reactivation. An unresolved identity or status leaves the line unsent. The former expiry-based “resource exhaustion / suspected fraud” inference has been removed.
{
"txid": "channel-renewal-sequence-001",
"change_type": "ONEXPIRY",
"items": [
{
"esn": "89000000000000000001"
}
]
}
To renew three times, the channel's server follows this sequence:
| Request |
Example transaction ID |
Submission condition |
| First |
channel-renewal-sequence-001 |
Submit one renewal at expiry |
| Second |
channel-renewal-sequence-002 |
Confirm the first succeeded and the actual expiry was extended |
| Third |
channel-renewal-sequence-003 |
Confirm the second succeeded and the actual expiry was extended again |
Do not submit concurrent requests for the same line or repeat the line in one batch to request multiple cycles. Each separate request uses a different txid and has its own job, result callbacks and charge records. This example uses the standalone renewal endpoint. To have the platform process multiple cycles within one batch, use POST /v1/jobs/auto-handling with items[].quantity.
Use job queries or callbacks to confirm the line's final result. Submit the next request only after succeeded and an actual expiry later than the previously verified expiry. HTTP 200/202, acceptance or a batch completion event alone does not prove success. finished_at is the processing completion time, not the plan expiry. If expiry is missing, cannot be compared or has not advanced, stop consecutive submissions and verify it first. Do not calculate a date to substitute for an actual result.
Stop subsequent renewals for a line when a request fails. For an unknown result, query the original job or wait for its callback; do not resend that operation with a new transaction ID. After resolving a failure, decide whether to submit a new request based on the cycles still needed, without repeating successful operations. Evaluate each line in a batch using its own results.
Each submitted request saves its own quoted prices. Only successful items are charged; failed items are not, and funds are not frozen. The balance may become negative without stopping processing. For example, if each renewal costs US$2.85, two successes and a third failure debit US$5.70 in total. Each request uses the prices quoted at its own acceptance.
plan_change=false renews the current plan. To renew onto another plan, send plan_change=true with a plan_id from the catalog; that plan must be enabled and priced for your channel. This is a renewal with a target plan, not the unavailable standalone plan-change operation.
If a scheduled plan change is still unconfirmed, a renewal without an explicit target fails per item with PLAN_CONFIRMATION_REQUIRED, without processing or charging the item. Other valid items in the batch continue; a request can return HTTP 200 even when all items failed, so inspect each result. After checking the intended plan, use a new txid with plan_change=true and the target plan_id. Alternatively, call POST /cards/{iccid}/sync when needed; the marker clears only when the scheduled target is confirmed active. Renewal submissions for registered SIMs with complete local details do not automatically query every line or require a sync.
Reactivation
POST /jobs/reactivations
Use this endpoint to restore a previously activated line that is currently inactive. When selecting an operation from a line query, use reactivation for data.status=Inactive and renewal for Active. Inactive does not mean a new SIM has never been activated, and it does not guarantee restoration; inspect the final item result. This endpoint does not use change_type.
{
"txid": "channel-reactivation-001",
"items": [
{
"esn": "89000000000000000001"
}
]
}
Restores the original line at its current plan's renewal price. Do not supply a new plan. Send esn (ICCID, recommended) in each item; the phone number is not also required. A registered mdn or enrollment_id is also supported. Eligibility depends on the actual line state; acceptance does not guarantee restoration.
The platform resolves the ICCID from confirmed records and uses that ICCID for reactivation. The channel may supply its registered phone number or ICCID. An unclear mapping waits for verification; the platform does not guess a phone number or SIM. The original channel request and accepted service parameters are retained.
For a standalone reactivation, data.items[].confirmed_through_date on job lookup, data[].confirmed_through_date on GET /v1/jobs/{id}/items, and data.confirmed_through_date on a new item callback carry the verified expiry in US Eastern time (YYYY-MM-DD). The value is null until verified. A later reactivation.item.updated returns the date with the original job_id and item_id and a higher result_revision.
Each reactivation line sent for processing contains only the verified ICCID (esn), phone number (mdn), and enrollment_id. This also applies when automatic handling selects reactivation. No address or ZIP is required. If a complete new service_address is supplied, the platform saves it on the SIM after success. It stays on the local card and is omitted from the reactivation request.
Inspect items[].result.wifi_calling. A WFC failure does not reverse a successful reactivation, which remains billable.
Enable Wi-Fi Calling
POST /jobs/wifi-calling
{
"txid": "channel-wfc-001",
"items": [
{
"mdn": "2025550100"
}
]
}
Use esn (ICCID, recommended), a registered mdn or enrollment_id. This endpoint enables Wi-Fi Calling; no action selector is required. This operation is free to the channel, does not debit the balance and creates no debit ledger entry. It still creates item-level function-call records, job results and signed callbacks.
For manual Wi-Fi calling, address fields are resolved in the following order.
| Priority |
Address source |
Meaning |
| 1 |
Fields explicitly supplied in this request |
items[].customer overrides defaults; items[].zip takes precedence for ZIP |
| 2 |
The locally registered SIM service address |
Use the complete, valid address saved after that SIM's successful activation or later line synchronization |
| 3 |
The same SIM's latest successful activation snapshot |
If the local SIM address is missing or invalid, use the latest successful activation address for the same ICCID; failed orders are excluded |
| 4 |
The line's current WFC/service address |
If neither local source has a valid address, leave missing fields for the current line record to supply |
To use a catalog address:
{
"txid": "channel-wfc-catalog-001",
"items": [
{
"esn": "89000000000000000001",
"catalog_entry_id": "CATALOG_ENTRY_ID"
}
]
}
With catalog_entry_id, the platform validates an available entry for this channel, snapshots its complete address at acceptance, and uses that address for WFC. The line plan does not change, and the catalog price is not charged. Later catalog edits do not alter accepted jobs, including identity-enrichment waits and retries. A missing or unavailable entry fails that item. Do not combine the ID with item customer or zip; batch address defaults apply only to items without a catalog ID. Omitting the ID preserves existing address resolution. WFC remains free and asynchronous; confirm success from the job result or callback.
Select the ID from GET /regional-catalog. An invalid catalog entry or unverifiable address returns that item’s catalog error. Other valid items continue.
Use this WFC job's result to confirm the repair. The original reactivation job retains its historical wifi_calling result; a later repair does not rewrite it.
Read business success separately from WFC registration. A receipt may contain wifi_calling.status=enabled or already_enabled alongside a line.wifi_calling_enabled=false snapshot that has not yet updated. Do not repeat activation, renewal or reactivation because of this. When automatic verification or repair is needed, the platform independently checks current details for the same SIM: a complete matching WFC=true result skips enablement; Active with an explicit false permits enablement followed by verification. Unverified details do not authorize enablement. Temporary query failures wait for retry in the original task; unresolved issues raise an alert. WFC handling does not change business success or its charge, or delay its callback. Use the latest valid line query to confirm registration. An explicitly submitted WFC job still processes the requested address; check that job separately.
Batch activation and reactivation: submit and query
One POST creates one batch with one txid and one job. Each SIM or phone number is a separate object in the items array. Use the dedicated operation endpoints for one operation per batch. Automatic handling accepts mixed renewals and reactivations under a single batch ID, up to 1,000 items. The dedicated endpoints accept at least one item and have no fixed item-count limit, but the complete UTF-8 JSON body must not exceed 200,000 bytes. Do not repeat the same SIM within a batch.
Replace YOUR_CHANNEL_CODE, YOUR_API_KEY, SIM IDs, phone numbers and CATALOG_ENTRY_ID below. Use a channel-unique batch txid for each new service request. Supply it once at the top level; the platform generates item transaction IDs. Use the same channel account and Key for POST and GET requests.
1. Batch activation: submit multiple ICCIDs
Each first-activation item requires esn (an 18–22 digit ICCID string) and catalog_entry_id. Select a plan and address with GET /v1/regional-catalog, then use the returned catalog ID for each SIM. Items may select the same or different entries. The platform supplies the plan and address from the selected entry.
Save the following as a UTF-8 file named activation-batch.json, replacing the ICCIDs and catalog IDs:
{
"txid": "channel-activation-002",
"items": [
{
"esn": "89000000000000000001",
"catalog_entry_id": "CATALOG_ENTRY_ID"
},
{
"esn": "89000000000000000002",
"catalog_entry_id": "CATALOG_ENTRY_ID"
}
]
}
Run this command from the directory containing the file:
curl --request POST 'https://rogue.gcsl.ai/v1/jobs/activations' \
--header 'X-Partner-Id: YOUR_CHANNEL_CODE' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-binary '@activation-batch.json'
Keep esn quoted as a string, never a JSON number. Include catalog_entry_id in every item. Do not send mdn, plan_code, zip, customer or batch defaults for activation. Processing is always asynchronous.
2. Batch reactivation: submit multiple existing phone numbers
Use this operation for previously activated lines that are now inactive. When choosing from a line query, data.status=Inactive selects reactivation; renew an Active line through /v1/jobs/renewals. Reactivation restores the original line and plan.
Save the following as reactivation-batch.json and replace the phone numbers. Each mdn is a ten-digit US phone-number string without +1, spaces or hyphens:
{
"txid": "channel-reactivation-002",
"items": [
{
"mdn": "2025550100"
},
{
"mdn": "2025550101"
}
]
}
curl --request POST 'https://rogue.gcsl.ai/v1/jobs/reactivations' \
--header 'X-Partner-Id: YOUR_CHANNEL_CODE' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-binary '@reactivation-batch.json'
For an mdn-only request, the platform resolves the ICCID from existing line and successful order records. A missing or ambiguous mapping returns LINE_IDENTITY_CONFLICT. No other SIM is searched or used, and valid siblings continue.
3. Save the job ID and query the complete batch
Both endpoints return data.job and data.items. Save data.job.id together with your txid. HTTP 202 means accepted only. HTTP 200 can also contain failures; always inspect item states.
Replace JOB_ID with data.job.id from submission. One request returns the complete batch:
curl 'https://rogue.gcsl.ai/v1/jobs/JOB_ID' \
--header 'X-Partner-Id: YOUR_CHANNEL_CODE' \
--header 'X-API-Key: YOUR_API_KEY'
If the submission connection drops or times out before you receive a job ID, query using the original batch txid. For the reactivation example:
curl 'https://rogue.gcsl.ai/v1/jobs/channel-reactivation-002' \
--header 'X-Partner-Id: YOUR_CHANNEL_CODE' \
--header 'X-API-Key: YOUR_API_KEY'
For activation, replace the final path segment with channel-activation-002. In your integration, use your actual saved transaction ID. GET /v1/jobs?txid=channel-reactivation-002 also retrieves the batch result. Query the original job after an HTTP 409 duplicate transaction ID. Do not switch transaction IDs and resubmit merely because submission timed out or a lookup temporarily found no job; contact support if acceptance remains uncertain.
4. Read each item's result and charge
This reactivation batch has one successful item and one item awaiting its single enrichment lookup by registered ICCID. The latter has no established quote yet. The numbers and prices are illustrative.
{
"data": {
"job": {
"id": "ord_batch_example",
"txid": "channel-reactivation-002",
"partner_id": "your_channel",
"type": "reactivation",
"status": "running",
"totals": {
"total": 2,
"succeeded": 1,
"failed": 0,
"pending": 1
},
"billing": {
"amount": "2.60",
"charged_amount": "2.60",
"currency": "USD",
"quote_pending": true
},
"attention_required": false
},
"items": [
{
"id": "item_batch_1",
"job_id": "ord_batch_example",
"job_txid": "channel-reactivation-002",
"txid": "channel-reactivation-002_00000001",
"esn": "89000000000000000001",
"request": {
"mdn": "2025550100"
},
"status": "succeeded",
"result": {
"mdn": "2025550100",
"retryable": false
},
"billing": {
"price": "2.60",
"charged_amount": "2.60",
"currency": "USD",
"quote_pending": false
}
},
{
"id": "item_batch_2",
"job_id": "ord_batch_example",
"job_txid": "channel-reactivation-002",
"txid": "channel-reactivation-002_00000002",
"esn": "89000000000000000002",
"request": {
"mdn": "2025550101"
},
"status": "pending",
"result": null,
"billing": {
"price": "0.00",
"charged_amount": "0.00",
"currency": "USD",
"quote_pending": true
},
"last_error": null
}
]
},
"meta": {
"request_id": "req_batch_example",
"job_id": "ord_batch_example",
"txid": "channel-reactivation-002"
}
}
Once all items finish, the batch is succeeded, failed or partial. Partial means both successful and failed items are present.
| Read this field |
Channel action |
data.job.status and data.job.totals |
queued / running means unfinished. succeeded means all succeeded, failed means all failed, and partial means all finished with both successes and failures. |
data.items[].status |
Evaluate every item: succeeded is success; retain the error for failed; continue querying the original job or await callbacks for pending / processing. |
data.items[].result.mdn |
For first activation, read the assigned phone number. For reactivation, read the original line number actually returned. |
data.items[].request, esn and txid |
Correlate by item txid and request. An unconfirmed ICCID may be esn=null; result=null while waiting, so do not read result.error_details. If a final failure includes error_details.item_index, the index starts at 0. |
data.items[].billing.charged_amount and data.job.billing.charged_amount |
Item and batch amounts actually charged; only successful items are charged. billing.quote_pending=true means no valid quote has been established. A temporary price=0.00 does not mean free service. |
data.items[].result.error_code, error, next_action and retryable |
Read errors inside result only for a final failure. Waiting items have result=null; read the outer item last_error and next_action instead. Never include successful or unresolved items in a batch resubmission. |
One pending or unsuccessful item does not block other items. Authentication errors, invalid batch parameters and duplicate transaction IDs or SIMs retain their batch-level handling.
Both operations use the same job-query and item-state rules; activation returns job.type=activation. Channels with callbacks configured may also receive activation.item.succeeded, activation.item.failed and activation.job.completed; reactivation uses reactivation.*. A job-completed event can mean partial success or total failure, so inspect individual results. Without a callback URL, your channel must query the job.
Reading results
GET /jobs/{id}: retrieve by the returned job ID or transaction ID.
GET /jobs?txid=...: look up a batch or item transaction ID.
GET /jobs?status=running: list your channel's jobs. Default page size is 100. Use page, per_page and pagination.has_more to continue.
GET /jobs/{id}/items?status=failed: retrieve failed items in the job. This endpoint returns all matching items in the job without pagination.
An item txid returns only that item's details with match=item_txid. A job ID or batch txid returns the complete batch. One job query reads all items; separate per-SIM queries are unnecessary.
All GET job queries return the latest stored results, including pending jobs, without querying or submitting upstream work. Background processing and callbacks continue updating results. Use POST /jobs/{id}/recheck if an earlier check of the original job is required.
Successful JSON responses use data and meta. Service results contain data.job and data.items. Use job.id to query the job and items[].id to retry an eligible item.
| Level |
State |
Meaning |
| job |
queued |
Queued for processing |
| job |
running |
Processing or waiting for the original submitted job |
| job |
succeeded |
All items succeeded |
| job |
failed |
All items failed |
| job |
partial |
All items finished, with both successes and failures |
| item |
pending / processing |
Unfinished; no charge yet |
| item |
succeeded |
Successful; charged at the item's quoted price |
| item |
failed |
Failed; no charge |
Complete items proceed at the accepted quote. Incomplete items receive one asynchronous lookup. billing.quote_pending=true means that no quote has been established and the provisional price is 0.00. Failed enrichment incurs no charge and does not submit the operation.
job.billing.amount is the sum of established, admitted item quotes. A locally failed item that could not be quoted has a zero amount, which is not a free offer. Manual WFC is explicitly free. charged_amount is the amount actually debited. items[].billing.price is the item's quote. result preserves verified result fields, such as phone number, Enrollment ID and expiry dates when returned. Not every endpoint returns an expiry date. finished_at is a processing completion timestamp, not a service expiry date.
An eSIM card fee correction appears as card_fee_refund on the original item. A positive change returns the difference to the channel wallet and reduces net consumption for that period. The original debit remains visible.
For accounts with an agreed record-only billing arrangement, each successful operation subtracts its quoted amount from the bookkeeping balance, which may become negative. No money is collected: charged_amount remains 0.00. Ledger entries with kind=record have negative change and recorded_amount values; historical zero-change entries are preserved and corrected using a separate record_adjustment entry. The ledger summary excludes these amounts from actual consumption and includes their signed total in recorded_amount: closing balance = opening balance + recharges - consumption + recorded_amount. Upstream service costs still apply. This arrangement cannot be selected or changed through service-request parameters.
If a result explicitly returns a malformed phone number, or a renewal, reactivation or WFC result returns a number different from the original, the item remains awaiting verification without a charge and the original job is checked. An omitted optional phone-number field is not a number conflict; this does not trigger a new service submission.
A single item's txid equals the batch txid. For multiple items, each item uses the batch txid, an underscore and the last eight ICCID digits. Returned item transaction IDs can therefore be up to 73 characters. If ICCID suffixes collide within a batch, submit those SIMs in separate batches.
Common service rules
- Each request creates one job with one or more
items and no fixed item-count limit. Results and charges are recorded per SIM.
- We recommend supplying a channel-unique
txid for every batch: 1–64 letters, digits, periods, underscores, colons or hyphens. Resubmitting the same txid returns HTTP 409. Query the original job instead.
- All service operations are queued asynchronously. A saved job returns 202 with its original job ID. If every item fails local validation, 200 contains the failed item results. HTTP 200 does not indicate business success.
- Each activation item requires
esn (ICCID) and catalog_entry_id. Renewal, reactivation and manual WFC accept esn, mdn (ten-digit US phone number) or enrollment_id. Multiple supplied identifiers must identify the same SIM. Only operate on SIMs your channel is authorized to process. For an older registered SIM without a saved number, use /cards/{iccid}/sync when needed.
- Pre-submission enrichment looks up each line at most once. If verification fails, that item completes with the actual error, sends its callback and incurs no charge. Other items continue. An already submitted operation with no confirmed outcome stays pending and is checked using its original job.
- In a batch, line lookup, identifier or ownership, address, plan and pricing validation failures are recorded against the affected item; valid items continue together. Authentication, invalid batch structure or shared parameters, duplicate transaction IDs or SIMs still reject the batch. An identifier or ownership error in a single-item request may also be returned directly before a job is created.
- An item awaiting enrichment or failing lookup without a verified ICCID returns
esn=null and retains its request; a failure also includes result.error_details.item_index (zero-based). In a multi-item request, its item txid is the batch transaction ID followed by _line and the original position (starting at 1); ICCIDs verified at submission use the last-eight-digit suffix. Resolving the ICCID later never changes the original item id or txid. Correlate results by original index or item transaction ID rather than assuming ICCID is always present. A pre-submission lookup error closes that item and is included in its callback. Failed items contribute no quoted amount to the valid total and are not charged.
- Quotes are saved when established. There is no balance check at acceptance or dispatch; balances may become negative. Only confirmed successful items are charged once. Failed items are not charged; partial success charges only successful items.
- A SIM cannot have overlapping unfinished operations. Work on different SIMs is scheduled fairly across channels with bounded concurrency. Jobs awaiting upstream results retain their SIM lock without occupying active request slots. Active request limits or upstream rate limits may require waiting. New jobs do not wait for funds; balances may be negative. Uncertain submissions only query the original job and are not resubmitted. No funds are frozen or debited early; confirmed success is charged once. WFC is free and follows the same request limits and SIM exclusion.
- Activation, renewal and reactivation use your channel's price list. Channels using the unified plan-price setup are not charged SIM or eSIM sales fees again through these operations.
- Area codes are references only. Do not submit
area_code to choose a number. The actual assigned number and area code depend on the completed activation.
Recovery
Internal processing retries do not require another channel submission: wait for the original job's final result. An increased internal attempt count does not create a new order or another charge.
After a service restart, jobs proved not yet dispatched return to the queue automatically. Jobs that may have been sent, or have no dispatch-phase evidence, are checked through their original job only. Channels do not need to create another txid.
After automatic recovery, a confirmed failure is reported on its original job and item and raises an alert without waiting for staff approval. Successful items are notified and settled once at the accepted price. Internal Wi-Fi Calling repair runs separately and has no channel callback. Pre-submission enrichment looks up each line at most once. If verification fails, that item completes with the actual error, sends its callback and incurs no charge. Other items continue. An already submitted operation with no confirmed outcome stays pending and is checked using its original job. Five minutes without progress raises an alert while the original submitted job continues to be checked.
A request rejected before a job exists returns an HTTP error. Business-parameter rejections from authenticated channels are also recorded in exceptions. Without a job there is no item callback; use meta.request_id and the error code for investigation. Correcting parameters of an existing failed job requires a new request with a new txid; explicitly call retry only when reusing the stored parameters after review.
Address fields are validated before enrichment. Standalone WFC is free and returns confirmed failures such as an inactive line. A later activation number uses the existing update event. Failed delivery retries the original event.
All system messages in API responses and callbacks are in English, including error.message, items[].result.error and last_error. Original business error codes and English reasons are preserved with sensitive credentials filtered. Non-English service errors use an English explanation for known error codes, or English guidance when unclassified. Original diagnostics and Chinese explanations are available only in the operations console; they are not included in channel responses or callbacks. Switching documentation languages does not change runtime responses.
Error messages state only the cause, such as Invalid phone number. or Plan not found. Processing guidance is returned separately in next_action. A confirmed failure without a detailed cause uses a brief message such as Renewal failed.; no cause is guessed. Unconfirmed results remain in progress, not failed.
When a business result provides different error and last_error messages, job queries retain each explanation separately. An item failure callback uses the same error as the queried result.error.
HTTP errors use error.details.business_code and error.details.next_action. Failed items and item callbacks use error_code, error and next_action. Unfinished items expose their current explanation through last_error and next_action. When known, HTTP details or item result.error_details include field, fields and item_index; item_index is the zero-based position in the original channel items array. Determine the outcome from states and error codes, not message wording.
Common query, identifier and configuration errors:
| Error code |
Channel action |
CARD_NOT_FOUND |
Check the phone number or ICCID. For a phone-number-only request, try the confirmed ICCID; contact the platform if identification still fails. |
CARD_OWNERSHIP_CONFLICT |
This channel cannot process the SIM. Confirm the ICCID and contact the platform. |
UPSTREAM_ACCOUNT_UNASSIGNED, UPSTREAM_ACCOUNT_CONFIGURATION |
Platform service configuration is missing or unavailable. Provide the ICCID and meta.request_id to the platform; do not repeatedly try different parameters. |
UPSTREAM_ACCOUNT_UNCONFIRMED |
The registered account could not be verified. The affected item returns an error and raises an alert without submission or charge. |
LINE_IDENTITY_CONFLICT |
If the phone number and SIM records conflict, only the affected item waits for platform confirmation, without dispatch or charge. After confirmation, the original item continues; other items proceed normally. Job queries report LINE_IDENTITY_CONFLICT. Do not resubmit. |
CURRENT_PLAN_UNKNOWN |
The current plan cannot be confirmed. Provide the ICCID and any existing job ID to the platform for verification. |
UPSTREAM_QUERY_TIMEOUT |
The query timed out. Wait and repeat the query. If a service job already exists, keep querying that job; do not resubmit the service request because a query timed out. |
UPSTREAM_TIMEOUT |
The service request timed out. Follow the original job status and next_action. A timeout does not mean the service failed; do not submit a duplicate request. |
| next_action |
Channel action |
| correct_and_resubmit |
Correct confirmed failed items. Use a new txid if a job was created; an unused txid can be retained when no job exists. Submit only failed items that need a new operation. |
| query_original |
Wait for a callback or query the original job; do not repeat the operation with another transaction ID. |
| retry_original |
Explicitly retry the original item only if its parameters remain suitable; eligibility checks still apply. |
| recharge_and_resubmit |
Add funds and resubmit a request that was not accepted. |
| recharge_and_resume |
Add funds and resume the original paused job. |
| wait |
Wait according to Retry-After or job status; for an existing job, continue querying that job. |
| contact_support |
Contact the platform about account, configuration or unclassified errors; do not blindly resubmit. |
next_action is guidance, not an automatic rebooking command. Follow item states and error codes. Do not include successful, processing or unresolved items when resubmitting failed items. Failed items are not charged; confirmed success is charged once. Redelivering a notification does not repeat the operation or charge.
For example, an invalid phone number in the first item returns HTTP 400 before a job is created:
{
"error": {
"code": "bad_request",
"message": "Invalid phone number.",
"details": {
"business_code": "INVALID_MDN",
"item_index": 0,
"field": "mdn",
"next_action": "correct_and_resubmit"
}
},
"meta": {
"request_id": "req_example"
}
}
For the following three operations, omit the request body or send an empty JSON object {}; do not resend the original business parameters. A request body requires Content-Type: application/json. Nonempty objects or malformed bodies return 400, bodies over 200,000 bytes return 413, and non-JSON content types return 415.
POST /jobs/{id}/recheck: query the original job without resubmitting the service request. A newly confirmed success is charged once; repeated queries do not debit again. Dispatched jobs wait for the final callback, with an original-batch fallback lookup after five minutes without a final result. Uncertain submissions, incomplete callbacks or conflicting evidence can be checked sooner. After 20 attempts, including initial dispatch, attention_required=true and five-minute fallback checks continue; the service is never automatically rebooked. Jobs awaiting manual account verification also have attention_required=true, but remain unsent and do not query service results until confirmed.
POST /jobs/{id}/resume: compatibility endpoint for unfinished jobs paused for insufficient balance under an older version. It resumes the original job with the original quote, without a balance check. Normal new jobs do not need it.
POST /jobs/{id}/items/{itemId}/retry: only for failed items with result.retryable=true and an existing original job/item identity. attempt_count is not mandatory. After reviewing the problem, you can explicitly request a retry while other items in the same batch remain in flight; the retry is queued until earlier processing completes. Original parameters and prices are retained; local ownership, line state, original plan and balance are checked. Successful, processing and unresolved items cannot be retried. Changed parameters require a new job. HTTP 200 means scheduled, not completed; query the job or wait for a webhook to confirm the result.
For duplicate txid (409) or a submission timeout, query the original transaction instead of resubmitting with a new ID. After 401, check the channel account and API Key, including whether the key was reset. Follow Retry-After after 429. error.details.business_code identifies the specific business reason. For support, provide meta.request_id, txid and the job ID, never secret keys.
Webhooks
Register an HTTPS callback URL for your channel, or override it for a job with webhook_url. Events are sent after results are verified and successful items are charged. Duplicate events do not debit again. If neither a job URL nor a channel URL is configured, the platform receives and retains the result; no notification is sent to your server. Query the original job for its result.
Once an event is recorded, delivery is triggered immediately. Due notifications are sent continuously without a fixed per-second or per-cycle count limit. Failed notifications wait for their retry deadline below; actual delivery time depends on the receiver and network.
A verified final item result correlated to the current request updates the order directly, without a mandatory second lookup. For unresolved work, a batch summary alone, missing correlation data, conflicting content or an ambiguous old-versus-new manual retry result requires an original-job lookup; missing callbacks also have a query fallback. For activation rate-limit recovery, a verified delayed success follows the correction rule under activation. Other contradictory results received after a confirmed final state preserve the original settlement and raise an exception for investigation; they do not automatically change the status or charge again. Event creation time is not a substitute for a missing processing completion time or service expiry date.
Events: activation.item.succeeded, activation.item.failed, activation.item.updated, activation.job.completed. Replace activation with renewal or reactivation for those operations; use wifi_calling for manual WFC activation. Each renewal request has its own result events. For consecutive renewals, confirm success and an actual expiry extension before submitting the next request with a new transaction ID.
For first activation, submit the same ICCID (items[].esn) and catalog entry for both card types. On new activation.item.succeeded, activation.item.failed and activation.item.updated events, data.sim_type is esim or physical, using the inventory classification recorded when the item was accepted. An unconfirmed type is null. The batch completion event carries only the existing batch fields. A retry of an event queued before this change can omit sim_type. The channel uses its separately supplied LPA for eSIM installation.
Headers:
X-RM-Event: matches JSON type.
X-RM-Delivery-Id: identifies this delivery attempt and changes on redelivery. Deduplicate events using JSON id.
X-RM-Signature: sha256=<hex signature>.
Calculate HMAC-SHA256 over the untouched raw request body using your channel Webhook Secret. Do not parse and reserialize the JSON before verification; do not prefix a timestamp. After verification, durably deduplicate by id and return HTTP 2xx. Return 2xx for valid duplicate events too. After a failed initial delivery, the platform automatically retries up to five times at intervals of 30, 60, 120, 240 and 480 seconds, with exponential backoff capped at 15 minutes: at most six attempts including the initial delivery. An administrator can redeliver the same event from the admin console. Redelivery only sends the notification again; it never repeats the service operation or its charge. Events can arrive more than once or out of order. A valid, complete final item callback can confirm the service result directly. Query the job if events are missing, conflict or cannot be ordered reliably. Read the job's billing when you need to verify the quote or charged amount.
Callbacks do not send X-Partner-Id or X-API-Key, and created_at records when the event was created. The receiver verifies the separate signature described above.
{
"id": "evt_example",
"created_at": "2026-10-02T12:00:00Z",
"type": "activation.item.succeeded",
"data": {
"job_id": "ord_example",
"item_id": "item_example",
"job_txid": "channel-activation-001",
"txid": "channel-activation-001",
"esn": "89000000000000000001",
"sim_type": "physical",
"status": "succeeded",
"mdn": "2025550100",
"plan_code": "97",
"plan_id": "6641",
"zip": "90034",
"started_at": "2026-10-02T11:59:58Z",
"finished_at": "2026-10-02T12:00:00Z",
"attempt_count": 1,
"result_revision": 1
}
}
Result metadata and supplemental notifications
Per-item callbacks return data.started_at, data.finished_at and data.attempt_count, matching the corresponding lookup item. The timestamps describe service processing, not notification delivery. Preserve their returned timezone offsets. Missing values are null; a recorded attempt count of 0 stays 0. attempt_count counts service processing attempts, not webhook retries. created_at remains the event creation time.
plan_code, plan_id and zip use the same canonical values in the outer lookup item, its result, and callback data. Each field uses the saved result value first, then result.line, then the accepted request snapshot; missing values are null. zip is a five-digit string, including any leading zero. The line snapshot can describe an earlier line state. Use the canonical fields above for this operation and service_period for its US Eastern dates.
If additional verified result information arrives after the initial notification, the platform sends activation.item.updated, renewal.item.updated, reactivation.item.updated or wifi_calling.item.updated. Its data is the complete latest item-result snapshot, including unchanged fields. The confirmed status does not change. It does not repeat the service, charge again or resend job.completed. For example, an initially unavailable renewal effective date may later be supplied in renewal.item.updated.
When a successful renewal or reactivation has incomplete cycle dates, the platform checks the original line in the background. Automatic handling uses the same rule for the operation performed on each item and sends auto_handling.item.updated for a supplement. Once verified for that operation, service_period.effective_date and service_period.expiry_date appear in the original job lookup and the supplemental callback. effective_at and expiry_at are included when the carrier provides exact times. success_date records the original handling day. The cycle fields come from carrier evidence, and unavailable fields are null while verification is pending or inconclusive.
For legacy Bearer API key integrations, a period confirmed after order.completed is sent as event: "order.item.updated", using the legacy envelope and signature. data.item_id matches the original data.items[].id, and data.service_period contains the period.
An activation rate-limit recovery may receive verified delayed success after a failure notification. This correction uses activation.item.succeeded with a higher result_revision, the original job/item IDs, and a new event ID; it is not an item.updated metadata event. The job completion totals are emitted when all items are final. Use the highest item revision when failure and success notifications arrive out of order. If job summaries arrive out of order, query the original job for current totals.
data.result_revision starts at 1 for the initial item notification and increases for each genuine supplement or delayed activation success correction. Lookups expose the latest generated revision as items[].result_revision; unfinished items and historical results without a versioned notification return null. A supplement has a new event id; retrying delivery of that event preserves its ID, revision and payload. Deduplicate by event ID and store the highest revision per item_id. Verify and acknowledge older valid events with HTTP 2xx without overwriting newer data or charging again. Query the original job if an event has no revision or conflicts with stored results. Update any strict event-type allowlist and use the current verification example in the download package.
Only results whose initial notification uses this versioned contract receive supplemental notifications. Previously generated historical callbacks remain unchanged and are not resent. Completed-job lookups read the saved result; they do not start new processing or keep querying the service just to obtain optional fields.
For example, an initial item can have unknown cycle dates. When earlier service evidence establishes the cycle, the updated event contains the US Eastern dates.
{
"id": "evt_renewal_update",
"type": "renewal.item.updated",
"created_at": "2026-10-17T06:00:10Z",
"data": {
"job_id": "ord_renewal_example",
"item_id": "item_renewal_example",
"job_txid": "channel-renewal-001",
"txid": "channel-renewal-001",
"esn": "89000000000000000001",
"status": "succeeded",
"mdn": "2025550100",
"plan_code": "97",
"plan_id": "6641",
"zip": "90034",
"started_at": "2026-10-17T05:59:58Z",
"finished_at": "2026-10-17T06:00:00Z",
"attempt_count": 1,
"result_revision": 2,
"retryable": false,
"service_period": {
"status": "confirmed",
"source": "upstream",
"period_kind": "next",
"date_timezone": "America/New_York",
"success_date": "2026-10-17",
"success_date_basis": "upstream_finished_at",
"effective_date": "2026-11-16",
"current_cycle_end_date": "2026-11-16",
"expiry_date": "2026-12-16",
"as_of_date": "2026-10-17",
"reason": null
}
}
}
Use webhook-verify.mjs in the download package. With Node.js 22+, run node --test webhook-verify.test.mjs to verify the sample.
Queries, inventory and ledger
| Method |
Path |
Purpose |
| GET |
/status |
Service status; no authentication required |
| GET |
/customers?esn=... |
Channel line details; esn (ICCID) is recommended; mdn or enrollment_id is also supported. Provide exactly one query key |
| GET |
/mdns/{mdn} |
Line details by phone number |
| GET |
/mdns/{mdn}/usage |
Usage within 90 days; summary by default, from/to for daily records |
| GET |
/esns/{esn}/status |
SIM inventory status and the current upstream cycle dates, when available |
| GET |
/cards |
Local inventory pagination or single lookup, including handling and independent expiry_info dates |
| POST |
/cards/lookup |
Local batch lookup by phone / ICCID |
| POST |
/cards/{iccid}/sync |
Sync an assigned SIM's line, plan and address; no charge |
| GET |
/cards/{iccid}/esim |
Retrieve registered eSIM installation details; no new code is generated |
If the SIM type is unknown, installation-detail queries return SIM_TYPE_UNCONFIRMED; contact the platform to confirm the type or register supplier installation details. The platform does not generate an installation code. This does not change existing order prices or charges.
| GET | /balance | Account balance and available funds for new orders |
| GET | /ledger | Paginated funds added, charges and running balances |
| GET | /ledger/summary | Totals for the same filters |
| GET | /ledger/export | CSV for all matching entries |
| GET | /regional-catalog | Plans, addresses, entry IDs and area-code references |
The top-level summary reports physical SIMs (total, activated, unused). by_type lists physical SIMs, eSIMs and SIMs of unknown type separately. Blank SIMs are counted only. The default list contains used SIMs. With stock_state=unused, data is empty. pagination.total counts visible records only. Only a successful first activation consumes one unused SIM from the handling channel’s display balance. A new stock upload increases the uploading channel’s total once.
GET /cards returns sim_type as physical, esim, or null. null means the card type is not yet confirmed; do not assume it is a physical SIM or eSIM.
Line queries may include data.wifi_calling_enabled, the line's Wi-Fi Calling / E911 registration indicator. true means the account record has an Active WFC feature or a complete WFC address; false means the line was found without either indicator; null means the line was not found. An omitted field must not be treated as false. This does not report the device's live Wi-Fi Calling switch. To request activation, use POST /jobs/wifi-calling and check that job's final result.
Choose an operation from the line status
When your channel needs to choose between renewal and reactivation for an existing number, GET /customers?esn=... is recommended. Alternatively, use the registered phone number with GET /mdns/{mdn}. Both return the data.status used for this decision. First confirm data.found=true and that the returned phone number and ICCID match the intended line. Channel ownership restrictions still apply to these queries.
For an mdn query, the platform resolves the phone number to its confirmed ICCID within your channel, then queries that SIM. It does not switch to another SIM based on a phone-number search. If no mapping exists or the ICCID cannot be resolved uniquely, verify the mapping or supply an explicit esn. Returned ICCID and phone number must still match; queries do not rewrite bindings or historical orders.
Usage queries first verify the requested phone number through its registered ICCID; mismatched or missing lines stop the usage query. Enrollment ID queries also verify that the returned Enrollment ID matches the request.
| Line query result |
Meaning |
Endpoint your channel should call |
Active |
The line is currently active |
Renew the plan cycle: POST /jobs/renewals |
Inactive |
An existing line is currently inactive; this does not mean the SIM has never been activated or identify the reason for deactivation |
Restore the inactive line: POST /jobs/reactivations |
found=false, missing, null, empty or any other status |
The operation cannot be determined reliably |
Verify first; do not automatically submit either operation |
| Query failure or conflicting identifiers that cannot be verified |
A valid result for the intended line has not been established |
Resolve the query or data issue before selecting an operation |
Ignore only letter case and leading/trailing whitespace, then compare the entire value. For example, ACTIVE matches Active, and inactive matches Inactive. Do not use a substring check for “active”: “inactive” contains the same substring. This rule applies only to data.status from the line queries above.
Your channel selects the POST endpoint from the query result. The platform does not automatically turn a submitted renewal into a reactivation or switch in the opposite direction. If the intended operation is already known, a line query is not required before every submission; scheduled line-status polling is not required either. Selecting an endpoint does not confirm business success. Read the final items[].status or webhook result; only successful items are charged.
Within renewal, change_type=IMMEDIATE renews immediately and ONEXPIRY renews at expiry; both are renewal operations. Choose between renewal and reactivation from the line status; an expiry date is not required for that choice. Line queries do not guarantee an expiry date. A missing date does not mean the line has expired. timestamp is the query time and finished_at is the job completion time; neither is the service expiry. When checking the actual expiry or an extension after consecutive renewals, obtain the actual returned date instead of calculating one.
Line status versus SIM inventory status
GET /esns/{esn}/status also returns data.status, but this field describes SIM inventory status and has a different meaning from the same field in a line query:
| SIM inventory status |
Meaning |
FREE |
The inventory marks the SIM as Free; this does not mean it has never been activated. A previously used SIM whose prior line was disconnected may also return this value. It does not establish eligibility for first activation |
ACTIVE |
The inventory query reports an activated or occupied SIM; the line is not necessarily active now |
NOTFOUND |
The SIM was not found in inventory; do not interpret this as line status Inactive |
ERROR |
The inventory query failed; do not use it to choose renewal or reactivation |
Upstream SIM inventory retains its native status. This endpoint returns service_period: null and next_service_period: null; obtain actual line dates through the live comprehensive query.
For example, inventory may return FREE together with provision_status=Used: the SIM has been used and its prior line may be disconnected. This does not identify an unused new SIM. provision_status and message provide context for the inventory result; they do not replace the current line status. Use GET /customers?esn={ICCID} (recommended) or GET /mdns/{mdn}, confirm found=true and matching returned identifiers, then choose renewal or reactivation from line data.status.
A SIM inventory query may return ACTIVE while its number's line query returns Inactive. In that case, choose reactivation from the line query's Inactive. Local SIM states from GET /cards also do not replace a current line query. Interpret the endpoint and field together; do not treat every field named status as interchangeable.
Line, phone-number and usage queries return HTTP 409 with error.details.business_code=AMBIGUOUS_IDENTIFIER if historical records match multiple SIMs and the current SIM cannot be determined. Verify the current phone-to-SIM record first.
For POST /cards/{iccid}/sync, send an empty object {} with Content-Type: application/json. It only retrieves and synchronizes the registered line; it cannot submit a new number or change the plan. A nonempty request object returns HTTP 400.
Ledger from and to are inclusive local dates in America/New_York, matching Washington, DC reconciliation dates and accounting for daylight saving time. Filtering uses actual posting/debit time; timestamps may remain UTC ISO representations of the same instant. Summary covers all filtered entries, independent of pagination. Amounts are USD strings.
The limit is 120 requests per minute per channel, excluding authenticated GET job queries. JSON bodies must not exceed 200,000 bytes. Requests may queue during congestion.
Available: activation, renewal, reactivation, free manual WFC activation, and the queries and account functions above. Standalone deactivation, add-ons, standalone plan changes and manual WFC deactivation remain unavailable. Billable operations reduce the balance only on confirmed success. No automatic wallet funding or online payment collection is included.
Ledger scope: data_scope=wallet_ledger covers movements since ledger_started_at, not pre-wallet history. The period recharge equals opening_transfer + new_deposits. An entry with entry_type=opening_transfer carries a historical balance forward; its existing kind=recharge is preserved, but it is not a new payment. CSV retains its existing columns and order. Read data_scope and entry_type from the JSON response of /ledger.
history contains verified pre-wallet initial_deposit, additional_deposits, total funds, consumption, carried-forward opening_balance and item_count. It is not included in period totals (included_in_period=false). No history returns null; inconsistent history returns status=needs_review without unverified amounts. lifetime ignores date filters and gives cumulative funds, consumption, recorded_amount and current balance, with the opening transfer counted only once. It is null while historical evidence needs review. For example, historical funds of 1,000.00 minus consumption of 800.00 produce a 200.00 opening transfer; a later 50.00 charge leaves a balance of 150.00. Wallet totals are recharge 200.00 and consumption 50.00; lifetime totals are funds 1,000.00 and consumption 850.00. This is a display reconciliation, not another credit or debit.
For /cards, status records inventory use only: unassigned, free, or used. It does not indicate Active/Inactive. upstream_line_status is removed; last_synced_at records profile verification time. Use the live comprehensive query for current line status, periods, usage and remaining resources.
The result in job lookups and callbacks belongs to that service operation, not the current line status at lookup time. For supplemental results, use the newer result_revision. An older response arriving late does not overwrite a newer saved line status.
Synchronous line lookups
GET /customers and GET /mdns/{mdn} return the result or error from the current request. When all available identifiers report no match, the result is found=false.
The platform verifies channel ownership and queries the registered account by ICCID first. If the line is missing, incomplete or inconsistent, it tries the original enrollment ID and then the original phone number when available. Each lookup sends one identifier once. The first complete result that matches the original line ends the lookup. A rate limit, timeout or temporary network error ends the request immediately and is logged without a staff alert. Unresolved identity conflicts, account errors and platform faults raise alerts.
Synchronous GET requests do not create recovery jobs or send callbacks. A new channel request starts a new lookup. Honor Retry-After when present.
For a query callback, explicitly submit POST /query-jobs. A configured callback URL receives its result. If no URL is registered, poll the original query job.
Local inventory, usage and sync endpoints retain their respective response formats.
Independent asynchronous batch lookup
Use POST /query-jobs to query multiple lines and receive a callback. Submit 1–100 items and a txid unique within your channel. The platform saves the batch and immediately returns 202 with a query job ID; lookups run in the background. Query jobs do not create business orders or business charges. Line GETs return their result or error synchronously.
{
"txid": "lookup-20261027-001",
"items": [
{"esn": "89000000000000000001"},
{"mdn": "2025550002"},
{"enrollment_id": "EXAMPLE-ENROLLMENT-3"}
],
"webhook_url": "https://your-server.example/query-events"
}
POST /query-jobs returns 202 after saving 1–100 query items. Each line follows the same ICCID, original enrollment ID and original phone number lookup order as a synchronous lookup. An unsuccessful item returns review, error_code and message with a null result. Once every item finishes, query.job.completed is delivered. Queries are free.
| Endpoint |
Purpose |
GET /query-jobs/{id} |
Read a batch and its items by query job ID or original txid |
POST /query-jobs/{id}/recheck with {} |
After correction, recheck only review rows in a completed batch |
GET /query-jobs/{id}/callbacks |
Read query callback delivery status |
POST /query-jobs/{id}/callbacks/retry with {} |
Retry failed callbacks after the receiver recovers; does not repeat lookups |
A pending batch has unfinished rows. Succeeded means every row succeeded, partial means mixed results, and review means no row succeeded. Use only succeeded item results. An explicit recheck starts a new revision for unsuccessful rows and preserves successful rows.
When no rows remain waiting, the platform emits query.job.completed. Its data has the same batch result shape, including job and items. Signature headers remain X-RM-Event, X-RM-Delivery-Id and X-RM-Signature, with HMAC-SHA256 over raw JSON bytes. Deduplicate by event id and acknowledge with 2xx. Automatic delivery tries up to six times. Delivery retries keep the same event and payload; a newly completed recheck revision uses a new event ID. Keep the highest revision for each data.job.id; acknowledge an older valid event with 2xx without replacing newer data or triggering a service operation.
Omitting webhook_url uses your registered channel URL. If none is registered, the platform receives and stores the callback; poll the original query job to obtain your result. Reusing a txid returns 409; read the original job. Do not use business /jobs retry endpoints for query jobs.
Advanced options and compatibility
These options are not required for the normal flow above.
- Reactivation accepts legacy
defaults, items[].customer and items[].zip for local card updates. Only the verified esn, mdn and enrollment_id are sent for reactivation. Manual WFC can use these address fields for emergency registration. Activation uses the selected catalog entry and supports an explicit service_address within the same ZIP.
- All service operations are asynchronous. Omit
mode or send async. Legacy sync is still accepted but behaves the same as async and does not wait for completion.
- If body
txid is absent, Idempotency-Key or the txid header is used; otherwise an ID is generated. Supplying body txid is recommended so that you can recover an uncertain submission by querying it.
- Existing token clients may keep
POST /auth with partner_id and api_key, then Authorization: Bearer <token> (30-minute expiry). This compatibility endpoint allows up to 20 requests per minute for each client-IP/account combination; unknown accounts share one bucket per client IP. New fixed-key integrations do not call it. Token and fixed-header integrations share the same current request, response and webhook contract.
- The older
Authorization: Bearer <API Key> contract keeps its legacy response and webhook formats; activation also requires the ICCID array esns and catalog_entry_id, and no longer accepts a separate plan or address; see the legacy compatibility OpenAPI. When migrating from that contract, update all three formats; do not change the header alone. The fixed-header method requires both account and key, with no Authorization header.
Omitted attempt_count does not block ordinary final results; an explicitly lower count is evidence of an older result. For a temporary service rejection that explicitly confirms non-acceptance and is safe to retry, the platform may send again after a delay using the original transaction identity. This is not an automatic retry of a failed business operation; the channel should keep querying its original txid. For network failures, unreadable success bodies or other uncertain outcomes, the platform only queries the original job and does not resubmit the operation.
Retained compatibility fields
New integrations use the main fields above. The following published fields remain accepted or returned for existing clients; OpenAPI marks them as deprecated without removing support.
| Field |
Compatibility behavior |
Activation catalog_revision |
Accepted but not compared for admission. The platform validates the current catalog_entry_id, availability, quote and funds, then saves that snapshot. An old revision alone does not reject the request. |
Catalog query orderable |
Omit it. Legacy true and false both return only orderable entries; disabled or unavailable IDs are never returned. |
Catalog query verification_status, source |
Existing filters keep their original behavior. New integrations select by plan, city, state or area code. |
Request mode |
Omit it. Existing async and sync values both queue asynchronously. |
WFC feature_action |
Omit it. Existing Active is accepted; Inactive remains unsupported. |
Catalog id, revision |
id remains equal to catalog_entry_id; use catalog_entry_id. revision remains available for old readers and is not required for submission. |
Balance available |
Remains equal to balance, including negative values. available_for_orders always returns null. |
Catalog prices.plan_change |
Retained only for compatibility; it does not offer a standalone plan-change operation. Renewal with a plan change uses plan_change=true and plan_id. |
| Catalog verification/source metadata |
verification_status, checked_at, sync, verification counts in summary and area-code sample/source details remain available for old readers. They are not required for selecting or submitting a catalog entry. |
Catalog available, orderable, unavailable_reason |
Retained for existing readers. The channel list only contains orderable entries; admission still validates the selected entry. |
Normal processing is submit → query the original job or receive its callback. recheck and card sync are optional exception tools, not prerequisites for each request. resume is retained only for unfinished jobs paused for insufficient balance under an older version; it preserves the original job and quote without rechecking the balance.
Basic records and live queries
Confirmed ICCID mappings, channel ownership, plan catalogs and addresses are read from local records. Platform balances, ledger entries and job results also use the latest local records, updated by processing and callbacks; job lookup does not repeat a service operation.
GET /customers, GET /mdns/{mdn} and GET /esns/{esn}/status query live by default and save the new result, with no extra parameter required. Line status, WFC and any expiry information in the response use this result without filling gaps from earlier queries. queried_at is the time of this query. Status reflects that point in time and may change afterwards. Local inventory records and sync snapshots from /cards are not a substitute for current line status.
A failed query returns an error, not a previous successful result. Preserve absent or null WFC and expiry fields; do not fill them from earlier records, calculate an expiry date or infer deactivation yourself. Use data.status from this customer/line query to choose renewal or reactivation.
For example, GET /customers?esn=ICCID queries live. Phone number, ICCID and Enrollment ID queries follow the same rule.
Usage is always queried live. An identity check within the preceding minute may be reused only for the same service account, ICCID and phone; new service work, changed identifiers or conflicts require another check. This bound applies only to usage identity verification and does not trigger periodic refresh.
Inventory dates and latest handling
GET /cards and staff number lists retain identity, channel/account, inventory use and historical handling details. They do not return authoritative current line status or live periods; historical/estimated expiry is exposed separately in expiry_info: service_period and next_service_period are null. latest_handling is a recorded handling date, never back-calculated from expiry. Ordinary renewal/reactivation and explicit retries verify the upstream line before sending. Automatic handling follows the purchased-through date and lookup rules below. A failed query cannot fall back to an old local state. Original query, order, billing and signed callback evidence is preserved.
Automatic handling for activated lines
POST /v1/jobs/auto-handling accepts previously activated physical SIMs and eSIMs in the authenticated channel inventory, including verified historical registrations. Use your channel account and fixed Key or the existing compatible token. Submit 1 to 1,000 lines as strings using mdn or esn (ICCID). If both are supplied they must identify the same line. One optional txid identifies the batch. If omitted, the service uses the Idempotency-Key header, then the txid header, then generates an ID. Save data.job.id and data.job.txid from the response.
{"txid":"FW-1028","items":[{"mdn":"2025550140","quantity":2},{"esn":"89000000000000000049"}]}
Automatic handling uses the purchased-through date for the same line, account and plan. A successful monthly activation, reactivation or renewal can establish the date using US Eastern calendar months. A line with remaining coverage goes to ONEXPIRY renewal. An expired line goes to reactivation. When only a date is known, a line due today is checked live. Lines with usable dates are submitted first. Lines with missing or conflicting evidence are checked live before submission. Both groups keep the original channel job and item IDs. A confirmed failure can switch operation once when the receipt or a fresh check establishes the opposite line status. An uncertain submission stays on its original task for verification. Renewals use ONEXPIRY. Reactivation restores the existing plan. For immediate renewal, submit IMMEDIATE to /v1/jobs/renewals. Unactivated, unavailable and duplicate lines receive individual failures while eligible siblings proceed. Acceptance returns 202. An entirely rejected batch returns 200 with individual failures.
Use GET /v1/jobs/{id} or GET /v1/jobs?txid=FW-1028 to read the same batch. Each items[].operation is renewal, reactivation, or null until a line is admitted. A single item uses its batch txid. Multiple items append _line1, _line2 in input order. Events auto_handling.item.succeeded, auto_handling.item.failed, and auto_handling.item.updated carry job_id, job_txid, item_id, operation, esn, mdn, status, and billing in data. Success includes the item service period and failure includes its reason. One auto_handling.job.completed event summarizes the batch. The usual signatures and delivery retries apply. Deduplicate events by ID and apply supplements by result_revision. Each successful item settles once. The automatic item also returns the submitted identifiers in data.request. For an admitted renewal, change_type is ONEXPIRY.
Set items[].quantity to an integer from 1 to 12 (default 1). Use one row per phone/SIM and at most 1,000 requested cycles per batch. With quantity 2, an active line receives two ONEXPIRY renewals; a verified inactive line is reactivated first and then receives one ONEXPIRY renewal. Each later cycle waits for the previous success to be verified on the same line. If a cycle fails definitively, later cycles for that line stop, without affecting the other lines. An uncertain sent result stays on its original task.
Each admitted cycle is a separate result item and callback under the original job. Multi-cycle items include cycle.index and cycle.quantity; subsequent cycle txids add _p2, _p3, and so on to the line txid. Batch totals count result items. For a partially completed line, only successful cycles are charged.
confirmed_through_date covers the same line in this original job. It advances through consecutive verified cycles from cycle 1. If cycles 1 and 2 have verified expiries and cycle 3 is pending or failed, the field returns cycle 2’s expiry. Each item still carries its own service_period. The callback shows the value at the time of the event. Query the original job for the latest value, including any dates verified after batch completion.
A duplicate channel txid returns 409. Query the original batch. Supply a stable ID or idempotency header on the first request to recover a lost HTTP response. If both were omitted and the response was lost, phone numbers alone cannot distinguish a replay from another purchase. An uncertain upstream outcome is reconciled using its original task.
Local single-card and batch inventory lookup with historical expiry
This section extends the existing /cards pagination contract. Local inventory reads never call the carrier, create query jobs/orders/callbacks, or debit a balance. Channel ownership applies to every result.
| Purpose |
Request |
| Paginated inventory |
GET /v1/cards?page=1&per_page=200 |
| One phone |
GET /v1/cards?mdn=2025550100 |
| One ICCID |
GET /v1/cards?iccid=89000000000000000001 |
| Batch of specified identifiers |
POST /v1/cards/lookup |
Send exactly one mdn or iccid for a single lookup, or omit both to list inventory. Duplicate parameters are rejected. Identifiers are strings: 10 digits for mdn, 18–22 for iccid. Single reads preserve the data array and pagination envelope. A missing or foreign-channel card returns an empty array. Phone reads use the latest confirmed local binding; querying an old SIM cannot replace that binding. Unresolved identities return LOCAL_IDENTITY_UNCONFIRMED or an existing identity-conflict error. ICCID reads remain attached to the specified card.
The original page, per_page (maximum 200), stock_state, summary and pagination remain. Follow pagination.has_more; total counts listable rows. Pages are separate local observations, not a cross-page frozen snapshot; deduplicate/reconcile by ICCID during concurrent changes. Unused stock remains quantity-only, including specific and batch reads.
Batch body, with the original X-Partner-Id, X-API-Key and Content-Type: application/json:
{"items":[{"mdn":"2025550100"},{"iccid":"89000000000000000001"}]}
Accepts 1–200 entries. Mixed identifier types, input order and duplicate positions are preserved. Each data entry contains request, found, card and error. card has the full /cards shape. Missing and foreign-channel entries return found=false and card=null. An unresolved identity affects only that entry; invalid input rejects the request. Batch summary contains requested, found, not_found and needs_review. Read-only channels may call this read-only POST; disabled channels cannot.
Existing identifiers, plan/scheduled plan, SIM type, stock-use status, address/catalog, last_synced_at and latest_handling day fields remain. New fields:
| Field |
Meaning |
| allocated_at |
Local allocation time, or null when absent; distinct from handling and expiry |
| latest_handling.handled_at / time_basis |
Carrier completion, actual manual time, first success confirmation or historical evidence; null when no exact time is known |
| latest_handling.source / job_id / txid |
Order/history provenance and this channel's reference; null when unavailable |
| latest_handling.effective_date |
Explicit successful receipt start date, distinct from submission and expiry |
| expiry_info.expiry_date / expiry_at / expiry_date_range |
Local end of purchased coverage; a date range is retained when no single day is justified, and no exact time is fabricated |
| expiry_info.status |
confirmed (saved historical carrier evidence), estimated (local successful handling), or unknown |
| expiry_info.source / basis / confirmed_at |
Provenance, calculation basis and actual confirmation time; estimates are not confirmations |
| expiry_info.current_cycle_end_date / current_cycle_status |
Current-cycle boundary kept separate from future purchased coverage |
| expiry_info.last_observed_at / as_of_date / date_timezone |
Last saved query, calculation date and America/New_York |
| expiry_info.reason |
Machine-readable missing evidence, unresolved renewal mode, unconfirmed history or conflict |
| binding_status / pending_handling.count |
Current/historical/unconfirmed binding and count of unfinished operations |
Successful activation, actual reactivation and IMMEDIATE start a new cycle. ONEXPIRY uses an explicit receipt start or the previous boundary. Known Plan 65/66/73/84 estimates add Eastern calendar months with month-end clamping; unsupported durations remain unknown. Confirmed observations override matching identity/cycle estimates, while a current-cycle query does not erase already purchased future renewals. Failed, pending, scheduled-only, WFC, no-new-cycle Already Active confirmations and repeated callbacks never add a cycle.
Imported recorded-only entries without success evidence and renewals with unknown mode are not assumed to purchase coverage. A first success confirmation may be shown when the provider omitted completion time, but estimates retain the request-to-confirmation day interval instead of treating a late confirmation as a new activation. Day-only history never fabricates an exact midnight time. confirmed describes historical evidence, not current Active/Inactive status. Reading inventory does not start a purchase. An authorized automatic order can use a matching historical date to select its first operation. Inventory service_period and next_service_period remain null. Newly saved normal query evidence is incorporated on the next local read.
HUIYINBI Snail and GCSL balances
Enabled HUIYINBI accounts keep their original channel, API key, order ownership, channel prices and unified query endpoints.
- GET /v1/balance returns only snail_balance, gcsl_balance and currency inside data. Both balances are signed USD strings. The balance, available and aggregate fields are omitted. HUIYINBI clients must read the two new fields; other channels retain their existing response.
- Snail funds use the Snail1 upstream account; GCSL funds use JW. GCSL is a funding account within HUIYINBI, not a transfer of ownership to a different channel.
- Confirmed historical or import accounts take precedence. New physical stock defaults to GCSL/JW, with an explicit Snail/Snail1 option at import. All eSIM uses GCSL/JW.
- Only a first physical activation without a confirmed account selects by plan: Plan65 uses Snail/Snail1 and other plans use GCSL/JW. Later renewals, reactivations and plan changes retain the established account.
- Recharge and charges are independent per account. Insufficient funds do not stop service: the selected balance may become negative, without borrowing from the other account or switching upstream accounts.
- Each successful item is charged once at its accepted price. Pending work queries its original task. A confirmed failure may receive at most one additional attempt under the existing retry eligibility rules. Refunds return to the original funding account. In-flight orders retain their original upstream account and price without being recreated or charged twice.
- Existing paginated inventory, single MDN/ICCID lookup, batch inventory and live queries remain unified without a new account parameter. GET /v1/ledger retains its original entries and pagination; payment_source identifies snail or gcsl.
Other channels with the legacy SIM-type allocation retain business_funds.accounts.physical/esim. Channels without either feature retain their original response.