Packs API
Country and industry packs as data.
The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.
GET/v1/packs/process-coverage
Which processes the country pack can run
For each process, how many slots it reads in the pack and which of them are blank. Without pack, the workspace's own country is used, with its own rows first; each trade pack the workspace loaded is reported as a process of its own. A blank slot makes the dependent action wait for a person; nothing is guessed. Needs the right to read packs.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
processes | query | string | No | Comma separated process ids, for example `P10,P12`. Default every process the catalogue names. |
pack | query | string | No | The pack, two letters. Default the workspace's country. |
as_of | query | string | No | Read the pack as of this day. Default today. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/country/{code}
Read a country pack
Every slot of the pack as the engine reads it on the day: the row in force, with your workspace's own row first. A slot with nothing to read says needs_human. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | path | string | Yes | The pack, two letters, for example NP. |
as_of | query | string | No | Read the pack as it stood on this day. Today when left out. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/country/{code}/slots/{slot}
Read one slot with its trail
The slot as read on the day, every shared row it ever had (newest start first), and your workspace's own rows. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | path | string | Yes | The pack, two letters, for example NP. |
slot | path | string | Yes | The slot, for example TAX.9. |
as_of | query | string | No | Read the pack as it stood on this day. Today when left out. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/country/{code}/slots/{slot}/rows
Get your workspace's own rows for a slot
The rows your workspace added for the slot, newest start first. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | path | string | Yes | The pack, two letters, for example NP. |
slot | path | string | Yes | The slot, for example TAX.9. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/packs/country/{code}/slots/{slot}/rows
Add your workspace's own row for a slot
Adds a row that is read before the shared row, for your workspace only. The shared row is not changed. Needs packs:write and the admin role. A row carries its source and a reason.
Scope packs:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | path | string | Yes | The pack, two letters, for example NP. |
slot | path | string | Yes | The slot, for example TAX.9. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/country/{code}/ready/{needed_for}
Check a country is ready for an action
Lists the launch-blocking slots of the action (outbound_message, call_or_distress, payment, deadline, selling_goods, employing_staff, collecting_debts) that have nothing to read. An action with any missing slot stays off. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | path | string | Yes | The pack, two letters, for example NP. |
needed_for | path | string | Yes | The action. |
as_of | query | string | No | Read the pack as it stood on this day. Today when left out. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/loaded
See which packs your workspace loads
The country packs (your location unless you chose others) and the published industry packs your workspace loads, and the country slots those trades read that the country leaves blank. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
as_of | query | string | No | Read the pack as it stood on this day. Today when left out. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/industry/{key}
Read a published industry pack
The latest published version of an industry pack, with its sixteen sections. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes | The pack, for example `health`. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/packs/choices
Get the packs your workspace chose
The country and industry packs your workspace chose. A workspace may hold several of each. Needs packs:read.
Scope packs:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
PUT/v1/packs/choices
Choose the packs your workspace loads
Replaces the choice. An industry key must name a published pack. Needs packs:write and the admin role.
Scope packs:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |