Retrieve Farmer Registration Template
GET /api/v1/trades/farmers-template/{countryCode}/{format}
Description
Retrieves a template that can be used for farmer registrations within a specific country. This template will include predefined fields and formats that comply with local agricultural and registration regulations, facilitating standardization and ease of use during the registration process.
URL Parameters:
countryCode(required): The country code for which the farmer registration template is desired. This must be included in the URL path and represents the country-specific regulations or data fields relevant to farmer registrations.format(required): The file format of the template to be retrieved. This must be included in the URL path and typically could be formats likePDF,DOCX,XLSX, etc., depending on what formats the system supports.
Example Request:
curl -G "http://[base_url]/api/v1/trades/farmers-template/{countryCode}/{format}" \
-H "Authorization: Bearer [access_token]"
Responses:
- 200 OK: Successfully retrieved the farmer registration template. The response includes the template file in the requested format, either as a direct download or as a link to download the file.
Example Response: The actual response would depend on the file format requested and how your system handles file deliveries. For instance, it might provide a direct file download or a JSON object with a URL to download the file:
{
"downloadUrl": "http://example.com/download/farmers-template-{countryCode}.{format}"
}
Error Responses:
- 400 Bad Request: Incorrect parameters provided, such as an unsupported country code or format.
- 404 Not Found: Template not found for the provided country code and format.
- 403 Forbidden: The user does not have permission to access the template.
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/trades/farmers-template/{countryCode}/{format} \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!