Marketing API
Offers with limits the owner approves, single-use codes, loyalty points, referrals, reviews and winning customers back, within consent and the country rules.
The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.
GET/v1/marketing
Marketing
The campaigns, the loyalty programme, the referral rewards, the review settings and the winning-back rule in one look. Needs miniself:read.
Scope marketing: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. |
GET/v1/marketing/campaigns
Campaigns
The offers, newest first. Needs miniself:read.
Scope marketing: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. |
POST/v1/marketing/campaigns
Draft an offer
Drafts an offer with its limits, who it is for and the words, made from the limits. Nothing is sent. Needs miniself:write.
Scope marketing: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/marketing/campaigns/{id}
An offer
One offer with its limits, its results in five lines and the people it is for now. Needs miniself:read.
Scope marketing:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
PUT/v1/marketing/campaigns/{id}/bounds
Change the limits
Changes the limits as a new version. The approval is asked for again, and an offer that was running stops until it is. Needs miniself:write.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/campaigns/{id}/submit
Put it to the owner
Asks the owner to approve the offer. Needs miniself:write.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/campaigns/{id}/approve
Approve the offer
Approves exactly the version of the limits named. Nothing starts without it. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/campaigns/{id}/start
Start the offer
Starts an approved offer inside its dates and sends the first wave to those it may reach. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/campaigns/{id}/pause
Pause the offer
Holds a running offer. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/campaigns/{id}/resume
Resume the offer
Lets a paused offer go on. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/campaigns/{id}/end
End the offer
Ends the offer now and reports how it went. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/redeem
Use a code
Uses a single-use code for the person whose number it is shown from. It works once, inside the offer dates, budget and uses, and comes out as a line for the bill. Needs miniself:write.
Scope marketing: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. |
POST/v1/marketing/purchases
Count a paid bill
Counts a paid bill for a customer. It earns points when there is a programme, starts the hold of a referral and wins back a customer who was written to. The same bill is counted once. Needs miniself:write.
Scope marketing: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. |
POST/v1/marketing/refunds
Take a refunded bill back
Takes back the unspent points a bill earned and cancels a referral reward not yet paid. Needs miniself:write.
Scope marketing: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. |
POST/v1/marketing/sync
Read the books
Reads the books for paid bills and refunds. With days_back it learns who buys from the past, gives no points and writes to nobody. Needs the right to change settings.
Scope marketing: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/marketing/customers/{contact}
A customer
What the offers know about a customer. Needs miniself:read.
Scope marketing:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
contact | path | string | Yes | The contact. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
PUT/v1/marketing/customers/{contact}
Mark a customer
Marks a customer as a child, as having a number that does not work, who they live with and pay from, and their language. Needs miniself:write.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
contact | path | string | Yes | The contact. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
PUT/v1/marketing/loyalty
Set the loyalty programme
Sets how points or stamps are earned, what a reward costs, when points expire and the most that may be owed. Needs the right to change settings.
Scope marketing: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/marketing/loyalty/{contact}
A customer's points
The points a customer has, those about to lapse and the reward. Needs miniself:read.
Scope marketing:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
contact | path | string | Yes | The contact. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/loyalty/{contact}/redeem
Take a reward
Spends the cost of a reward from the customer's points, oldest first. Needs miniself:write.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
contact | path | string | Yes | The contact. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
PUT/v1/marketing/referral
Set the referral rewards
Sets the rewards, the hold and the most one referrer may earn. The hold is at least the country return window. Needs the right to change settings.
Scope marketing: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/marketing/referrals
Referrals
Who brought whom and where each reward stands. Needs miniself:read.
Scope marketing: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. |
POST/v1/marketing/referrals
Record a referral
Records that a customer brought a friend. A person cannot refer themselves, a household member, someone who already buys or someone already referred. Needs miniself:write.
Scope marketing: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. |
POST/v1/marketing/referrals/{id}/paid
Mark a reward paid
Says the reward was given. Only a reward whose hold has ended can be marked. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
GET/v1/marketing/reviews
Reviews
The review settings, the asks and the reviews, newest first. Needs miniself:read.
Scope marketing: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. |
POST/v1/marketing/reviews
Add a review
Adds a review read off a public page. A calm reply is drafted for the owner. Needs miniself:write.
Scope marketing: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. |
PUT/v1/marketing/reviews/settings
Set up reviews
Sets the public link, the days to wait before asking and how replies are made. Needs the right to change settings.
Scope marketing: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. |
POST/v1/marketing/reviews/asks
Ask for a review
Schedules the ask for a finished job, two to five days later. Everyone is asked. Needs miniself:write.
Scope marketing: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/marketing/reviews/asks/{id}
One review request
A review request and its state. Needs miniself:read.
Scope marketing:read. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/reviews/asks/{id}/answer
Record how it went
Records how the customer said it was. Below four they are offered a fix and the owner is told; everyone gets the public link. Needs miniself:write.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
POST/v1/marketing/reviews/{id}/reply
Answer a review
Approves the words of a reply, says it was posted, or ignores the review. A reply never offers anything for a rating. Needs the right to change settings.
Scope marketing:write. Accepts: API key or personal access token. Open in the API reference
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The id. |
AirFone-Version | header | string | No | The API version to use, as a date. Defaults to the version the account was pinned to. |
PUT/v1/marketing/reactivation
Set winning customers back
Sets after how many days of silence a customer is written to, once. Needs the right to change settings.
Scope marketing: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. |
POST/v1/marketing/replies
A reply to an offer
Reads a customer's reply. A request to stop, in any of the country's words, closes every channel to offers for them at once. Needs miniself:write.
Scope marketing: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. |