Offline Numbers API
Manage static tracking phone numbers for offline media channels: print, billboards, business cards, and more.
Introduction #
The Optico Offline Numbers API manages static tracking phone numbers, permanently assigned to specific destination numbers for offline media such as print ads, billboards, business cards, and catalogues. Unlike online tracking numbers (assigned dynamically per web visitor), offline numbers are persistent and tied to a named campaign or destination.
https://www.optico.fr
Transport & Conventions
| Method | All endpoints use GET |
| Parameters | Query string parameters |
| Response format | application/json |
| Timeout | 5 seconds recommended |
Authentication #
Every request must include the key parameter, the Offline Numbers API key for the domain. This key is available in your domain settings in the Optico backend.
/offline-numbers-api?key=offl_b7e2c8a14f9dcdef&action=check&tracking_number=0899123456
{"status": "error", "error": "Access denied to this API"}.Errors #
Response envelope
Every request returns 200 OK with a JSON envelope. Branch on the status field; on error, the error field carries the reason.
Success
{ "status": "success", "phone_number": "0612345678", "tracking_number": "0899123456" }
Error
{ "status": "error",
"error": "No tracking number available" }
Common error messages
| Message | Cause | Fix |
|---|---|---|
Invalid API key | The key is missing, revoked, or does not belong to this domain. | Use the Offline Numbers API key from your domain settings. |
Access denied to this API | The Offline Numbers API is not enabled for the domain. | Contact Optico to enable the API on the domain. |
No tracking number available | The private pool for the requested type is exhausted. | Request additional numbers from Optico, or pick a different prefix. |
Tracking number already assigned | The number you are trying to assign is already in use. | Use reassign to change its destination, or unassign first. |
Unknown tracking number | The given tracking_number is not part of this domain's pool. | Check the number with /offline-numbers-api/list. |
Idempotency
Read actions (check, /list) are safe to call repeatedly. Write actions (assign, unassign, reassign, redirect_setup) return the current state on success; re-issuing an unassign or redirect_setup after success is a no-op. assign allocates a new number from the pool each time it succeeds; do not retry blindly on timeout, call check first.
Retries & timeouts
Use a 5-second client timeout. Retry on network timeout or HTTP 5xx only for read actions. For assign, treat a timeout as "unknown" and call check with the destination phone_number to discover whether a number was allocated before retrying.
Rate limits
No fixed public rate limit is enforced. These endpoints are administrative; typical use is a handful of requests per day, not per second. Contact support before scripting bulk reassignments.
Endpoints #
| Endpoint | Method | Purpose |
|---|---|---|
/offline-numbers-api | GET | Manage tracking numbers: assign, unassign, reassign, check, and more. |
/offline-numbers-api/list | GET | List all tracking and destination phone numbers for a domain. |
GET /offline-numbers-api #
Common Parameters
| Parameter | Type | Description |
|---|---|---|
key | string Required | Offline Numbers API key for the domain. |
action | string Required | One of: assign, unassign, reassign, check, redirect_setup. |
phone_number | string | The destination (real) phone number to forward calls to. |
tracking_number | string | The Optico tracking phone number (from the private pool). |
description | string | Label for the tracking number (e.g. campaign name, ad placement). |
type | integer | Tracking number prefix type. See table below. |
cost_group | string | For surtax type numbers, optionally filter by cost group. E.g. A299. |
allow_redirect | 0 or 1 | Set whether calls should redirect when the callee is not responding. |
timetable | array|int | Timetable for the redirect feature. Pass 0 to unset, or an array of day/range entries e.g. timetable[monday]=10:00-12:00;17:15-18:24. |
Type and Prefix Reference
| ID | Prefix | ID | Prefix | ID | Prefix | ID | Prefix |
|---|---|---|---|---|---|---|---|
| 1 | 0800 | 2 | 0810 | 3 | 09 | 4 | 0820 |
| 5 | 0899 | 6 | 01 | 7 | 02 | 8 | 03 |
| 9 | 04 | 10 | 05 | 11 | 0892 | 12 | 0897 |
| 17 | 0826 | 18 | 0805 | 20 | 0811 | 21 | 0821 |
| 22 | 0825 | 23 | 004420 | 24 | 0049 | 25 | 004990 |
| 26 | 0034900 | 27 | 004491 | 28 | 00349 | 29 | 0044800 |
| 30 | 0032 | 31 | 0891 | 32 | 0890 | 33 | 0895 |
| 34 | 0806 |
Success Response Fields
| Field | Description |
|---|---|
status | success or error |
phone_number | Destination phone number (the real number). |
tracking_number | Assigned Optico tracking number. |
allow_redirect | Current redirect setting (0 or 1). |
timetable | Active timetable (0 if empty, otherwise JSON array of day/range entries). |
Action: assign #
Assign a tracking number from the domain's private pool to a destination phone number.
| Parameter | Required for this action |
|---|---|
phone_number | Required |
description | Required |
type | Required |
allow_redirect, cost_group, timetable, operator | Optional |
/offline-numbers-api?key=offl_key&action=assign&phone_number=0612345678&description=Magazine+Ad&type=1&allow_redirect=1
{ "status": "success", "phone_number": "0612345678", "tracking_number": "0899123456", "allow_redirect": "1" }
Action: unassign #
Release a tracking number back to the private pool. Provide either tracking_number or phone_number.
/offline-numbers-api?key=offl_key&action=unassign&tracking_number=0899123456
Action: reassign #
Change the destination phone number for an existing tracking number.
| Parameter | Required |
|---|---|
phone_number | Required |
tracking_number | Required |
description, allow_redirect | Optional |
Action: check #
Query the current status of a tracking number or destination phone. Provide either tracking_number or phone_number.
{ "status": "success", "phone_number": "0612345678", "tracking_number": "0899123456", "allow_redirect": "1" }
Action: redirect_setup #
Update the call forwarding redirect flag and/or the timetable for an existing tracking number.
| Parameter | Required |
|---|---|
allow_redirect | Required |
tracking_number or phone_number | Required (one of) |
timetable | Optional |
{ "status": "success", "phone_number": "0612345678", "tracking_number": "0899123456",
"allow_redirect": "1", "timetable": [{ "day": "mon", "from": "09:00", "to": "18:00" }] }
GET /offline-numbers-api/list #
Returns all tracking numbers (both assigned offline numbers and unassigned pool numbers) associated with the domain.
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string Required | Offline Numbers API key. |
details | 0 or 1 Optional | If 1, returns full details per number. Default returns a simple mapping. |
Simple response (details=0)
{
"0899123456": "0612345678",
"0899789012": "0698765432"
}
Tracking number → destination phone
Detailed response (details=1)
{
"tracking_number_details": [{
"tracking_phone": "0899123456",
"destination_phone": "0612345678",
"description": "Magazine Ad",
"product_name": "example.com",
"last_update": "2019-10-01 12:00:00"
}]
}