Campaigns
Marketing Campaigns
List all campaigns
GET https://app.gem-books.com/api/campaigns
This endpoint allows you to get the list of your campaigns. The campaigns are returned, sorted by code (A-Z).
Query Parameters
page
string
The number of page you wish to see. Default is 1.
per_page
string
The number of the desired result per page. Default is 20. Maximum is 100
Headers
Authentication*
string
Bearer token.
Accept*
string
Should be application/json.
{
"data": [
{
"id": 19,
"name": "Votre opinion compte pour nous",
"active": 1,
"date_start": "2024-12-01",
"date_end": "0000-00-00",
"client_type": "0",
"client_lead": "",
"clent_reference": "",
"client_labels": "",
"client_needs": "",
"client_notes": "",
"has_entreposages": 0,
"type": "sms",
"automatic": 1,
"automatic_type": 2,
"automatic_value": 1,
"image": "",
"subject": "Votre rendez-vous arrive à grand pas ",
"content": "<p>Bonjour {client},<br /><br />Votre rendez vous pour le véhicule {car} est prévu pour le {date}.<br />Si vous n'êtes pas dans la possibilité de vous présenter à votre rendez-vous, il serait apprécié de nous appeler afin de nous en informer.</p>",
"history": [],
"history_sms": [],
"system_id": 99598
},
{
"id": 18,
"name": "",
"active": 1,
"date_start": "0000-00-00",
"date_end": "0000-00-00",
"client_type": "0",
"client_lead": "",
"clent_reference": "",
"client_labels": "",
"client_needs": "",
"client_notes": "",
"has_entreposages": 0,
"type": "social_medias",
"automatic": 1,
"automatic_type": 1,
"automatic_value": 0,
"image": "",
"subject": "Votre opinion compte pour nous",
"content": "<p>Bonjour {client},<br /><br />Suite à votre rendez-vous récent, nous aimerions avoir votre opinion sur notre service.<br />S'il est possible pour vous de prendre quelques minutes pour nous écrire sur notre page Google, cela serait grandement apprécié.</p>",
"history": [
{
"id": 341,
"date": "2024-11-08 11:01:13",
"subject": "",
"from": "noreply@gem-books.com",
"to": "nomistim9000@gmail.com",
"cc": "",
"html": "",
"attachement": "0",
"clientID": 1,
"idmessage": null,
"date_read": null,
"system_id": 99598
},
{
"id": 340,
"date": "2024-11-08 11:00:58",
"subject": "",
"from": "noreply@gem-books.com",
"to": "koko@gmail.com",
"cc": "",
"html": "",
"attachement": "0",
"clientID": 4,
"idmessage": null,
"date_read": null,
"system_id": 99598
}
],
"history_sms": [],
"system_id": 99598
},Retrieve a campaign
GET https://app.gem-books.com/api/campaigns/:id
This endpoint allows you to get the details of the campaign.
Path Parameters
id
string
The ID of the campaign to retrieve
Headers
Authentication
string
Bearer token.
Accept
string
Should be application/json.
Create a campaign
POST https://app.gem-books.com/api/campaigns
This endpoint allows you to create a campaign. Returns the created campaign.
Headers
Authentication
string
Bearer token.
Accept
string
Should be application/json.
Content-type
string
Should be application/json.
Request Body
code
string
Code of campaign
name
string
Name of campaign
Update a campaign
PUT https://app.gem-books.com/api/campaigns/:id
This endpoint allows you to update a specific campaign. Returns the updated campaign.
Path Parameters
id
string
ID of campaign to update
Headers
Authentication
string
Bearer token.
Accept
string
Should be application/json.
Content-type
string
Should be application/json.
Last updated