Appearance
Crops
Description
Fields
| Field | Description | Data Type |
|---|---|---|
| id | Unique identifier for the object | Integer |
| name | Name of the item | String |
| domainId | Domain identifier | String |
| 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 Crops
http
GET /cropsResponse
json
{
"data": [
{
"id": 8,
"name": "88-",
"domainId": "AGG",
"createdAt": "2024-12-19T11:59:50.810Z",
"updatedAt": "2024-12-19T12:39:53.834Z",
"deletedAt": null
}
],
"meta": {
"itemsPerPage": 20,
"totalItems": 8,
"currentPage": 1,
"totalPages": 1,
"sortBy": [
[
"createdAt",
"DESC"
]
]
},
"links": {
"current": "http://api-dev.aggraria.digital/v1.0/crops?page=1&limit=20&sortBy=createdAt:DESC"
}
}Create Crops
http
POST /cropsRequest body
json
{
"id": 9,
"name": "99"
}Response body
json
{
"id": 9,
"name": "99",
"domainId": "AGG",
"updatedAt": "2024-12-20T01:31:31.728Z",
"createdAt": "2024-12-20T01:31:31.728Z",
"deletedAt": null
}Update Crops
http
PATCH /crops/<id>Request body
json
{
"name": "99"
}Response body
json
{
"generatedMaps": [],
"raw": [],
"affected": 1
}Delete Crops
http
DELETE /crops/<id>Response body
json
{
"generatedMaps": [],
"raw": [],
"affected": 1
}