Requests API
Anything somebody asks of the workspace, from any channel, in one list: orders, bookings, complaints, favours.
The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.
GET/v1/requests
List requests
The requests in the workspace, newest first. By default the ones that still need attention. Pass state (comma separated: new, open, waiting, resolved, closed, cancelled, refused, disputed, reversed), kind or lead_stage to narrow. Needs requests:read.
Paged: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total.
Scope requests:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
state | query | string | No | One or more states, comma separated. |
kind | query | string | No | The kind of request. |
lead_stage | query | string | No | Only sales leads at this stage. |
limit | query | integer | No | How many items to return. Default 50, at most 100. |
cursor | query | string | No | The `next_cursor` of the previous page. Opaque; never built by the client. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/requests
Open a request
Opens a request from a channel. Sending the same origin again returns the request it opened; a follow-up from a requester who has an open request of the same kind joins it instead of opening another. Needs requests:write.
Scope requests: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. |
GET/v1/requests/{id}
Get a request
One request with its plan, requester channels, links, clocks and lead record. Needs requests:read.
Scope requests:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The request. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/requests/{id}/actions
Move, assign or close a request
Exactly one of: state (move the coarse state; reason is needed for cancelled, refused, disputed and reversed), stage (move to a later stage of the plan), lead_stage (move the lead; reason is needed for lost), assign_to or unassign, or close_note (close it on your word). Stages only move forward, and a request that has a legal clock cannot close until it is met. Needs requests:write.
Scope requests:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The request. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/requests/{id}/assessment
Assess how risky a commitment is
Scores a request from your own record of how this requester behaved and from what is asked, and plans what happens before it goes out: pay first by default for high risk, a short confirmation by message or call only when risk is high. The score is yours; the requester never sees it. No name, region, language or group feeds it. Whether cash on delivery exists comes from the country pack. Needs requests:read.
Scope requests:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The request. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/requests/{id}/confirmation
Get a request's confirmation
Where the confirmation stands. A request moves to dispatched only on a confirmed yes for exactly what it is now. Needs requests:read.
Scope requests:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The request. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/requests/{id}/confirmation
Ask the requester to confirm
Assesses the request and, when the plan asks for a confirmation, opens it and asks the requester on the channel they came in on: a message with a link and the numbered reply (1 Yes, 2 No), or a short call. Asking twice returns the same confirmation. Needs requests:write.
Scope requests:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The request. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/requests/{id}/confirmation/answer
Record the requester's answer
For an answer that came by phone and you are relaying. A yes after the window closed only closes the confirmation: running late is not a refusal; a no is remembered. Needs requests:write.
Scope requests:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The request. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |