DEV Cropnuts Portal API
api
v1 > all-fields > list
Returns Fields for the logged in user. If user is commercial agent, returns fields for the sales region If user is DU agent, returns fields for the client If user is business partner, returns fields for the business partner
v1 > batch > details > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
batch_code required |
v1 > batch > status > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
batch_code required |
v1 > batch-results > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > batch-samples > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
batch_code | |
batch_date required | |
group_code required | |
farm_code required | |
client_id required | |
ref_no | |
app_version | |
samples required | |
account_number required | |
amount required |
v1 > batch-update > update
Update Batch to set the LPO use the ref_no field
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
batch_code required | A unique value identifying this Batch. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
ref_no required |
v1 > batch-update > partial_update
Update Batch to set the LPO use the ref_no field
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
batch_code required | A unique value identifying this Batch. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
ref_no |
v1 > client > farms > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > client-batches > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required |
v1 > client-crops > read
Returns Crops for a given Client ID
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required |
v1 > client-details > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > client-pricelist > read
Using Function CustomerPriceList
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required |
v1 > client-results > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > clients > create
With clients that the user has access to
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
client_id required | |
client_code required | |
physicaladdress required | |
country_id required | |
region_code required | |
client_name required | |
user_portal_access required | |
country_name required | |
lporequired required |
v1 > clients > read
With clients that the user has access to
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required | A unique value identifying this Client. |
v1 > clients > update
With clients that the user has access to
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required | A unique value identifying this Client. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
client_id required | |
client_code required | |
physicaladdress required | |
country_id required | |
region_code required | |
client_name required | |
user_portal_access required | |
country_name required | |
lporequired required |
v1 > clients > partial_update
With clients that the user has access to
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required | A unique value identifying this Client. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
client_id | |
client_code | |
physicaladdress | |
country_id | |
region_code | |
client_name | |
user_portal_access | |
country_name | |
lporequired |
v1 > clients > delete
With clients that the user has access to
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
client_id required | A unique value identifying this Client. |
v1 > contact-details > read
ContactDetailsListView allows users to update contact details via PUT requests.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > contact-details > update
ContactDetailsListView allows users to update contact details via PUT requests.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > contacts > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
contact_code | |
owner_code required | |
surname | |
other_names | |
country_id required | |
contact_type required | |
cns_staff required | |
receive_price_list required | |
all_farms required | |
receive_invoice required | |
receive_report required | |
receive_schedule required | |
sms_on_payment required | |
sms_on_analysis_scheduled required | |
sms_on_report_emailed required | |
sms_recommendations required | |
sms_on_batch_login required | |
sms_on_batch_arrival required | |
sms_invoice required | |
email_on_payment required | |
email_on_analysis_scheduled required | |
email_on_report_emailed required | |
email_on_batch_arrival required | |
email_on_invoice required | |
access_all_crops required | |
access_all_sample_types required | |
contact_has_portal_access required | |
phone1 | |
phone2 | |
email |
v1 > contacts > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
contact_code required | A unique value identifying this Contact. |
v1 > contacts > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
contact_code required | A unique value identifying this Contact. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
contact_code | |
owner_code required | |
surname | |
other_names | |
country_id required | |
contact_type required | |
cns_staff required | |
receive_price_list required | |
all_farms required | |
receive_invoice required | |
receive_report required | |
receive_schedule required | |
sms_on_payment required | |
sms_on_analysis_scheduled required | |
sms_on_report_emailed required | |
sms_recommendations required | |
sms_on_batch_login required | |
sms_on_batch_arrival required | |
sms_invoice required | |
email_on_payment required | |
email_on_analysis_scheduled required | |
email_on_report_emailed required | |
email_on_batch_arrival required | |
email_on_invoice required | |
access_all_crops required | |
access_all_sample_types required | |
contact_has_portal_access required | |
phone1 | |
phone2 | |
email |
v1 > contacts > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
contact_code required | A unique value identifying this Contact. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
contact_code | |
owner_code | |
surname | |
other_names | |
country_id | |
contact_type | |
cns_staff | |
receive_price_list | |
all_farms | |
receive_invoice | |
receive_report | |
receive_schedule | |
sms_on_payment | |
sms_on_analysis_scheduled | |
sms_on_report_emailed | |
sms_recommendations | |
sms_on_batch_login | |
sms_on_batch_arrival | |
sms_invoice | |
email_on_payment | |
email_on_analysis_scheduled | |
email_on_report_emailed | |
email_on_batch_arrival | |
email_on_invoice | |
access_all_crops | |
access_all_sample_types | |
contact_has_portal_access | |
phone1 | |
phone2 | |
email |
v1 > contacts > delete
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
contact_code required | A unique value identifying this Contact. |
v1 > create-batch > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
batch_date required | |
group_code required | |
client_id required | |
farm_code required | |
ref_no | |
bill_ref_number | |
amount |
v1 > create-farm > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
client_id required | |
farm_name required | |
phone required | |
postal_address required | |
physical_address required | |
email required | |
country_id required | |
salesregion_code required | |
crop_codes |
v1 > create-watersource > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
source_name required | |
farm_code required | |
latitude | |
longitude |
v1 > crop > growth-stages > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > crops > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
crop_code required | |
crop_name |
v1 > crops > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
crop_code required | A unique value identifying this Crop. |
v1 > crops > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
crop_code required | A unique value identifying this Crop. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
crop_code required | |
crop_name |
v1 > crops > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
crop_code required | A unique value identifying this Crop. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
crop_code | |
crop_name |
v1 > crops > delete
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
crop_code required | A unique value identifying this Crop. |
v1 > download > read
Fetch report by barcode
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
batch_code required | |
type required |
v1 > farm > batches > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > farm > fields > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > farm > watersources > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
v1 > farm-crops > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
farm_code required |
v1 > fields > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
field_name required | |
farm_code required | |
field_boundary required | |
field_size_acres |
v1 > sampledetails > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
sampledt_code required | |
analysisdt_code | |
guide | |
result | |
comments | |
recheck | |
guide_low | |
guide_high | |
unit_code | |
status_code | |
result_symbol | |
qc | |
corrected_target | |
standard_target | |
recommendations | |
initial_result | |
initial_result_symbol | |
very_low_guide | |
very_high_guide | |
sample required |
v1 > sampledetails > read
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
sampledt_code required | A unique value identifying this Sample Details. |
v1 > sampledetails > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
sampledt_code required | A unique value identifying this Sample Details. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
sampledt_code required | |
analysisdt_code | |
guide | |
result | |
comments | |
recheck | |
guide_low | |
guide_high | |
unit_code | |
status_code | |
result_symbol | |
qc | |
corrected_target | |
standard_target | |
recommendations | |
initial_result | |
initial_result_symbol | |
very_low_guide | |
very_high_guide | |
sample required |
v1 > sampledetails > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
sampledt_code required | A unique value identifying this Sample Details. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
sampledt_code | |
analysisdt_code | |
guide | |
result | |
comments | |
recheck | |
guide_low | |
guide_high | |
unit_code | |
status_code | |
result_symbol | |
qc | |
corrected_target | |
standard_target | |
recommendations | |
initial_result | |
initial_result_symbol | |
very_low_guide | |
very_high_guide | |
sample |
v1 > sampledetails > delete
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
sampledt_code required | A unique value identifying this Sample Details. |
v1 > samples > create > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
batch_code | |
sample_code | |
field_code | |
source_code | |
crop_code | |
crop_code2 | |
location required | |
depth_code | |
crop_codes | |
additional_crops | |
comments | |
sample_name | |
client_id required | |
group_code required | |
sample_condition | |
sample_barcode | |
analysis_ids required | |
growth_code | |
previous_crop required | |
next_crop required | |
ward_id | |
tree_crop | |
tree_population | |
date_of_planting | |
previous_yield | |
farmer_code |
v1 > update-amount > partial_update
Updates the amount to be paid for the batch
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
batch_code required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
amount required |
v1 > update-farm > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
farm_code required | A unique value identifying this Farm. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
farm_code required | |
client_id | |
sector_code required | |
farm_name | |
postaladdress | |
physicaladdress | |
email | |
phone1 | |
website | |
salesregion_code | |
country_id required |
v1 > update-farm > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
farm_code required | A unique value identifying this Farm. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
farm_code | |
client_id | |
sector_code | |
farm_name | |
postaladdress | |
physicaladdress | |
email | |
phone1 | |
website | |
salesregion_code | |
country_id |
v1 > update-field > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
field_code required | A unique value identifying this Field. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
field_code | |
field_name | |
farm_code | |
tree_crop | |
date_of_planting | |
fieldboundary | |
field_size_acres |
v1 > update-field > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
field_code required | A unique value identifying this Field. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
field_code | |
field_name | |
farm_code | |
tree_crop | |
date_of_planting | |
fieldboundary | |
field_size_acres |
v1 > update-watersource > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
source_code required | A unique value identifying this Water Sources. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
source_code required | |
source_name | |
farm_code | |
latitude required | |
longitude required |
v1 > update-watersource > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
source_code required | A unique value identifying this Water Sources. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
source_code | |
source_name | |
farm_code | |
latitude | |
longitude |
finanicial-dahboards
getbase64
handle_json
me
user
login > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | |
password required |
logout > list
Calls Django logout method and delete the Token object assigned to the current User object.
Accepts/Returns nothing.
logout > create
Calls Django logout method and delete the Token object assigned to the current User object.
Accepts/Returns nothing.
password-change > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
old_password required | Enter old password |
new_password1 required | Enter new password |
new_password2 required | Confirm new password |
password-reset > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
new_password1 required | Enter new password |
new_password2 required | Confirm new password |
password-reset > verify-code > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
code required | 4 digit code sent via email |
password-reset > verify-email > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | Valid email address |