Trace Connect APIs
- Introduction
- Authentication using JWT
- OAuth 2.0
- Basic APIs
- Advanced APIs
Basic APIs
List Farmers Endpoint
This API endpoint allows you to retrieve a list of farmers within the supply chain system. By sending a GET request to the specified endpoint, you can obtain information about multiple farmer submissions. The API supports secure authentication through an API key included in the request header.
GET
/
supply-chains
/
farmers
/
Copy
curl --request GET \
--url http://localhost:3000/connect/v1/supply-chains/farmers/ \
--header 'Authorization: <api-key>'
Copy
{
"count": 123,
"next": "<string>",
"previous": "<string>",
"results": [
{
"id": "<string>",
"entity_card": {
"id": "<string>",
"card": {
"id": "<string>",
"card_id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"display_id": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"entity": "<string>"
},
"submission": {
"id": "<string>",
"form_details": {
"id": "<string>",
"products": [
{
"id": "<string>",
"premiums": "<string>",
"is_active": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"fields": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"key": "<string>",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"form_type": "TRANSACTION",
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"values": [
{
"id": "<string>",
"field_details": {
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"field": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"value": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>",
"form": "<string>",
"product": "<string>"
},
"phone": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"image": "<string>",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"number": "<string>",
"email": "jsmith@example.com",
"identification_no": "<string>",
"reference_number": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"gender": "<string>",
"consent_status": "GRANTED",
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>"
}
]
}
Authorizations
Query Parameters
Filter by first name.
Filter by last name.
Filter by number.
Filter by updated timestamp after a specified time.
Filter by created timestamp after a specified time.
Number of results to return per page.
The initial index from which to return the results.
Response
200 - application/json
The response is of type object
.
Copy
curl --request GET \
--url http://localhost:3000/connect/v1/supply-chains/farmers/ \
--header 'Authorization: <api-key>'
Copy
{
"count": 123,
"next": "<string>",
"previous": "<string>",
"results": [
{
"id": "<string>",
"entity_card": {
"id": "<string>",
"card": {
"id": "<string>",
"card_id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"display_id": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"is_active": true,
"creator": "<string>",
"updater": "<string>",
"entity": "<string>"
},
"submission": {
"id": "<string>",
"form_details": {
"id": "<string>",
"products": [
{
"id": "<string>",
"premiums": "<string>",
"is_active": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"name": "<string>",
"description": "<string>",
"image": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"fields": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"field_config": [
{
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"key": "<string>",
"visibility": true,
"required": true,
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"form_type": "TRANSACTION",
"creator": "<string>",
"updater": "<string>",
"owner": "<string>"
},
"values": [
{
"id": "<string>",
"field_details": {
"id": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"label": "<string>",
"label_en_us": "<string>",
"label_en_uk": "<string>",
"label_fr": "<string>",
"label_nl": "<string>",
"label_ind": "<string>",
"type": "TEXT",
"key": "<string>",
"required": true,
"default_value": "<string>",
"options": "<string>",
"creator": "<string>",
"updater": "<string>"
},
"field": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"value": "<string>",
"creator": "<string>",
"updater": "<string>"
}
],
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"creator": "<string>",
"updater": "<string>",
"form": "<string>",
"product": "<string>"
},
"phone": "<string>",
"updated_on": "2023-11-07T05:31:56Z",
"created_on": "2023-11-07T05:31:56Z",
"image": "<string>",
"description": "<string>",
"house_name": "<string>",
"street": "<string>",
"city": "<string>",
"sub_province": "<string>",
"province": "<string>",
"latitude": 123,
"longitude": 123,
"zipcode": "<string>",
"country": "<string>",
"number": "<string>",
"email": "jsmith@example.com",
"identification_no": "<string>",
"reference_number": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"gender": "<string>",
"consent_status": "GRANTED",
"creator": "<string>",
"updater": "<string>",
"buyer": "<string>"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.