Prescriptions > Operations Planning Endpoints

About

All HTTP methods should be prepended by this service's endpoint:

https://api.withleaf.io/services/prescription/api

See below the REST resources and their endpoints available in this service.

Operations planning

This feature has the following endpoints available:

DescriptionEndpoints
Create operation planning on John DeerePOST /users/{leafUserId}/operationsPlanning/JohnDeere
Get all operation planningGET /users/{leafUserId}/operationsPlanning

Create operation planning on John Deere

 POST /users/{leafUserId}/operationsPlanning/JohnDeere

Creates an operation planning on John Deere, it is the equivalent to John Deere Work Plans.

Request examples

curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{ "fieldId": "UUID", "applicationPrescriptions": [ { "prescriptionId": "UUID", "prescriptionUnits": "String", "prescriptionUse": "String", "productId": "UUID" }], "instructions": "String", "seedingPrescriptions": [ { "prescriptionId": "UUID", "prescriptionUnits": "String", "prescriptionUse": "String", "varietyId": "String" } ], "workOrder": "String", "instructions": "string", "year": 2024 }' \
'https://api.withleaf.io/services/prescription/api/users/{leafUserId}/operationsPlanning/JohnDeere'

Response

{
"id": "UUID",
"leafUserId": "UUID",
"provider": "String",
"providerPlanId": "UUID",
"createdAt": "ISO Date",
"organizationId": "Integer",
"fieldId": "UUID",
"applicationPrescriptions": [
{
"prescriptionId": "UUID",
"prescriptionUnits": "String",
"prescriptionUse": "String",
"productId": "UUID"
}
],
"instructions": "String",
"seedingPrescriptions": [
{
"prescriptionId": "UUID",
"prescriptionUnits": "String",
"prescriptionUse": "String",
"varietyId": "String"
}
],
"workOrder": "String",
"instructions": "string",
"year": 2024
}

Get all operation planning

 GET /users/{leafUserId}/operationsPlanning

List the existing operation plans.

Request examples

curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/beta/prescription/api/users/{leafUserId}/operationsPlanning'

Response

[
{
"id": "UUID",
"leafUserId": "UUID",
"provider": "String",
"providerPlanId": "UUID",
"createdAt": "ISO Date",
"organizationId": "Integer",
"fieldId": "UUID",
"applicationPrescriptions": [
{
"prescriptionId": "UUID",
"prescriptionUnits": "String",
"prescriptionUse": "String",
"productId": "UUID"
}
],
"instructions": "String",
"seedingPrescriptions": [
{
"prescriptionId": "UUID",
"prescriptionUnits": "String",
"prescriptionUse": "String",
"varietyId": "String"
}
],
"workOrder": "String",
"instructions": "string",
"year": "Integer"
}
]