Appearance
Campaigns
Description
Fields
| Field | Description | Data Type |
|---|---|---|
| id | Unique identifier for the object | Integer |
| name | Name of the campaigns | String |
| domainId | Domain identifier | String |
| active | State if is active | Boolean |
| createdAt | Timestamp of when the object was created | String |
| updatedAt | Timestamp of the last update to the object | String |
| deletedAt | Timestamp of when the object was deleted, or null if not deleted | String or null |
List Campaigns
http
GET /campaignsResponse
json
{
"data": [
{
"id": 6,
"name": "2029",
"domainId": "AGG",
"active": false,
"createdAt": "2024-12-16T09:08:12.537Z",
"updatedAt": "2024-12-16T09:08:12.537Z",
"deletedAt": null
}
],
"meta": {
"itemsPerPage": 200,
"totalItems": 6,
"currentPage": 1,
"totalPages": 1,
"sortBy": [
[
"createdAt",
"DESC"
]
]
},
"links": {
"current": "http://api-dev.aggraria.digital/v1.0/campaigns?page=1&limit=200&sortBy=createdAt:DESC"
}
}Create Campaigns
http
POST /campaignsRequest body
json
{
"id": 10,
"name": "1010",
"active": true
}Response body
json
{
"id": 10,
"name": "1010",
"domainId": "AGG",
"active": true,
"updatedAt": "2024-12-20T01:50:08.191Z",
"createdAt": "2024-12-20T01:50:08.191Z",
"deletedAt": null
}Update Crops
http
PATCH /campaigns/<id>Request body
json
{
"name": "1010-",
"active": false
}Response body
json
{
"generatedMaps": [],
"raw": [],
"affected": 1
}Delete Crops
http
DELETE /campaigns/<id>Response body
json
{
"generatedMaps": [],
"raw": [],
"affected": 1
}