Campanhas
GET https://webpush.ecocard.bio/api/campaigns/
curl --request GET \
--url 'https://webpush.ecocard.bio/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://webpush.ecocard.bio/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
Parâmetros | Detalhes | Descrição |
---|---|---|
page | Opcional Inteiro | O número da página que deseja resultados. O padrão é 1 . |
results_per_page | Opcional Inteiro | Quantos resultados você deseja por página. Os valores permitidos são: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . O padrão é 25 . |
{
"data": [
{
"id": 1,
"user_id": 1,
"website_id": 1,
"name": "API Sample",
"title": "Sample message",
"description": "This is coming from the API.",
"url": "https://example.com",
"image_url": null,
"segment": "all",
"settings": {
"is_scheduled": 0,
"ttl": 2419200,
"urgency": "normal",
"is_silent": 0,
"is_auto_hide": 0,
"button_title_1": "",
"button_url_1": "",
"button_title_2": "",
"button_url_2": ""
},
"subscribers_ids": [
1,2,3,4,5
],
"sent_subscribers_ids": [],
"total_sent_push_notifications": 0,
"total_push_notifications": 1,
"total_displayed_push_notifications": 0,
"total_clicked_push_notifications": 0,
"total_closed_push_notifications": 0,
"status": "draft",
"scheduled_datetime": "2024-08-09 00:16:22",
"last_sent_datetime": null,
"last_datetime": null,
"datetime": "2024-08-09 00:16:22"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://webpush.ecocard.bio/api/campaigns?&page=1",
"last": "https://webpush.ecocard.bio/api/campaigns?&page=1",
"next": null,
"prev": null,
"self": "https://webpush.ecocard.bio/api/campaigns?&page=1"
}
}
GET https://webpush.ecocard.bio/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://webpush.ecocard.bio/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://webpush.ecocard.bio/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"user_id": 1,
"website_id": 1,
"name": "API Sample",
"title": "Sample message",
"description": "This is coming from the API.",
"url": "https://example.com",
"image_url": null,
"segment": "all",
"settings": {
"is_scheduled": 0,
"ttl": 2419200,
"urgency": "normal",
"is_silent": 0,
"is_auto_hide": 0,
"button_title_1": "",
"button_url_1": "",
"button_title_2": "",
"button_url_2": ""
},
"subscribers_ids": [
1,2,3,4,5
],
"sent_subscribers_ids": [],
"total_sent_push_notifications": 0,
"total_push_notifications": 1,
"total_displayed_push_notifications": 0,
"total_clicked_push_notifications": 0,
"total_closed_push_notifications": 0,
"status": "draft",
"scheduled_datetime": "2024-08-09 00:16:22",
"last_sent_datetime": null,
"last_datetime": null,
"datetime": "2024-08-09 00:16:22"
}
}
POST https://webpush.ecocard.bio/api/campaigns
Parâmetros | Detalhes | Descrição |
---|---|---|
website_id | Obrigatório Inteiro | - |
name | Obrigatório Cadeia | - |
title | Obrigatório Cadeia | - |
description | Obrigatório Cadeia | - |
url | Opcional Cadeia | - |
image | Opcional Arquivo | - |
button_title_1 | Opcional Cadeia | - |
button_url_1 | Opcional Cadeia | - |
button_title_2 | Opcional Cadeia | - |
button_url_2 | Opcional Cadeia | - |
is_scheduled | Opcional Boolean | - |
scheduled_datetime | Opcional Cadeia | - |
is_silent | Opcional Boolean | - |
is_auto_hide | Opcional Boolean | - |
ttl | Opcional Cadeia | Valores permitidos: 0 , 900 , 1800 , 3600 , 10800 , 21600 , 43200 , 86400 , 259200 , 432000 , 604800 , 1209600 , 2419200 |
segment | Opcional Cadeia | Valores permitidos: all , custom , filter , INT segment_id |
subscribers_ids | Opcional Cadeia | Disponível quando: segment = custom |
filters_custom_parameter_key[index] | Opcional Cadeia | Disponível quando: segment = filter |
filters_custom_parameter_value[index] | Opcional Cadeia | Disponível quando: segment = filter |
filters_custom_parameter_value[index] | Opcional Cadeia | Disponível quando: segment = filter |
filters_cities[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_countries[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_continents[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_device_type[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_languages[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_operating_systems[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_browsers[] | Opcional Cadeia | Disponível quando: segment = filter |
save | Opcional Boolean | Guardar rascunho |
send | Opcional Boolean | Enviar campanha. |
curl --request POST \
--url 'https://webpush.ecocard.bio/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
--url 'https://webpush.ecocard.bio/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
{
"data": {
"id": 1
}
}
POST https://webpush.ecocard.bio/api/campaigns/{campaign_id}
Parâmetros | Detalhes | Descrição |
---|---|---|
website_id | Opcional Inteiro | - |
name | Opcional Cadeia | - |
title | Opcional Cadeia | - |
description | Opcional Cadeia | - |
url | Opcional Cadeia | - |
image | Opcional Arquivo | - |
button_title_1 | Opcional Cadeia | - |
button_url_1 | Opcional Cadeia | - |
button_title_2 | Opcional Cadeia | - |
button_url_2 | Opcional Cadeia | - |
is_scheduled | Opcional Boolean | - |
scheduled_datetime | Opcional Cadeia | - |
is_silent | Opcional Boolean | - |
is_auto_hide | Opcional Boolean | - |
ttl | Opcional Cadeia | Valores permitidos: 0 , 900 , 1800 , 3600 , 10800 , 21600 , 43200 , 86400 , 259200 , 432000 , 604800 , 1209600 , 2419200 |
segment | Opcional Cadeia | Valores permitidos: all , custom , filter , INT segment_id |
subscribers_ids | Opcional Cadeia | Disponível quando: segment = custom |
filters_custom_parameter_key[index] | Opcional Cadeia | Disponível quando: segment = filter |
filters_custom_parameter_value[index] | Opcional Cadeia | Disponível quando: segment = filter |
filters_custom_parameter_value[index] | Opcional Cadeia | Disponível quando: segment = filter |
filters_cities[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_countries[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_continents[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_device_type[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_languages[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_operating_systems[] | Opcional Cadeia | Disponível quando: segment = filter |
filters_browsers[] | Opcional Cadeia | Disponível quando: segment = filter |
save | Opcional Boolean | Guardar rascunho |
send | Opcional Boolean | Enviar campanha. |
curl --request POST \
--url 'https://webpush.ecocard.bio/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
--url 'https://webpush.ecocard.bio/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
{
"data": {
"id": 1
}
}
DELETE https://webpush.ecocard.bio/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://webpush.ecocard.bio/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://webpush.ecocard.bio/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \