Beta > Input Endpoints
About
All HTTP methods should be prepended by this service's endpoint:
See below the REST resources and their endpoints available in this service.
Products
Endpoints
Description | Endpoints |
---|---|
Get all products | GET /products |
Get summarized products | GET /users/{leafUserId}/products/summary |
Search for products | GET /products/search |
Get a product | GET /products/{id} |
Get matching products from an operation | GET /users/{leafUserId}/products/matching/operations/{operationId} |
Updated product matches | PATCH /products/matching/operations/{operationId}/matches/{matchId} |
Get product matches historical | GET /products/matching/operations/{operationId}/matches/{matchId}/historical |
Get all products
 GET /products
List of products from providers (for now only for John Deere) in a Leaf User level. This way, on this endpoint the user can search for all products that are available from traditional providers (e.g. John Deere), so here we do not include specific providers such as Agrian and CDMS.
Parameter (to filter by) | Values |
---|---|
leafUserId | uuid of one of your users |
provider | JohnDeere |
size | an integer specifying the size of the page (max is 100) |
page | an integer specifying the page being fetched (default is 0) |
sort | the sorting order of the results; can be multi-value, where the first value to be passed will take priority over the next values; you can also specify the order as asc or desc with asc being the default. Example: id, desc |
Request examples
- cURL
- Python
- JavaScript
Response
Get summarized products
 GET /users/{leafUserId}/products/summary
List of products extracted from machine file.
Parameter (to filter by) | Values |
---|---|
name | part of the product name |
page | an integer specifying the page being fetched (default is 0) |
size | an integer specifying the size of the page (max is 100) |
sort | the sorting order of the results; can be multi-value, where the first value to be passed will take priority over the next values; you can also specify the order as asc or desc with asc being the default. Example: id, desc |
Request examples
- cURL
- Python
- JavaScript
Response
Search for products
 GET /products/search
Search for products by name, partial values are supported. Agrian and CDMS products are currently available to everyone, and John Deere products from the Operation Center at the Leaf User level.
Parameter (to filter by) | Values |
---|---|
name | part of the product name to be searched (required) |
maxResults | the number of results that should be returned (max value is 100). The default is 10 |
Request examples
- cURL
- Python
- JavaScript
Response
Get a product
 GET /products/{id}
Get a product by its id. The data is obtained from different product databases.
Request examples
- cURL
- Python
- JavaScript
Response
Get matching products from an operation
 GET /products/matching/operations/{operationId}
This endpoint can be used as the input validator, getting the standard products that best match the products from a Field Operation. Information such as the registration number and labels can be obtained from this endpoint using the id
.
Request examples
- cURL
- Python
- JavaScript
Response
Updated product matches
 PATCH /products/matching/operations/{id}/matches/{matchId}
Updated Leaf predictions or approves them.
Request body
To approve Leaf prediction:
Or, to change prediction:
Request examples
- cURL
- Python
- JavaScript
Response
Get product matches historical
 GET /products/matching/operations/{operationId}/matches/{matchId}/historical
Get a product's change history.
Request examples
- cURL
- Python
- JavaScript
Response
Varieties
Description | Endpoints |
---|---|
Get all varieties | GET /varieties |
Get a variety | GET /varieties/{id} |
Get summarized varieties | GET /users/{leafUserId}/varieties/summary |
Search for varieties | GET /varieties/search |
Get all varieties
 GET /varieties
List of varieties available from providers (for now only for John Deere).
Parameter (to filter by) | Values |
---|---|
leafUserId | uuid of one of your users |
provider | JohnDeere |
size | an integer specifying the size of the page (max is 100) |
page | an integer specifying the page being fetched (default is 0) |
sort | the sorting order of the results; can be multi-value, where the first value to be passed will take priority over the next values; you can also specify the order as asc or desc with asc being the default. Example: id, desc |
Request examples
- cURL
- Python
- JavaScript
Response
Get a variety
 GET /varieties/{id}
Get a variaty by the given id.
Request examples
- cURL
- Python
- JavaScript
Response
Get summarized varieties
 GET /users/{leafUserId}/varieties/summary
List of varieties extracted from machine file.
Parameter (to filter by) | Values |
---|---|
name | part of the product name |
crops | desired crop name |
page | an integer specifying the page being fetched (default is 0) |
size | an integer specifying the size of the page (max is 100) |
sort | the sorting order of the results; can be multi-value, where the first value to be passed will take priority over the next values; you can also specify the order as asc or desc with asc being the default. Example: id, desc |
Request examples
- cURL
- Python
- JavaScript
Response
Search for varieties
 GET /varieties/search
Search for varieties by name, partial values are supported. Varieties from John Deere Operation Center are available at the Leaf User level.
Parameter (to filter by) | Values |
---|---|
name | part of the variety name to be searched (required) |
maxResults | the number of results that should be returned (max value is 20). The default is 10 |
crop | the name of the crop of the varieties of interest |
Request examples
- cURL
- Python
- JavaScript
Response
Tank Mixes
Description | Endpoints |
---|---|
Get all tank mixes | GET /tankMixes |
Search for tank mixes | GET /tankMixes/search |
Get all tank mixes
 GET /tankMixes
List of tank mixes available from providers (for now only for John Deere).
Parameter (to filter by) | Values |
---|---|
leafUserId | uuid of one of your users |
provider | JohnDeere |
size | an integer specifying the size of the page (max is 100) |
page | an integer specifying the page being fetched (default is 0) |
sort | the sorting order of the results; can be multi-value, where the first value to be passed will take priority over the next values; you can also specify the order as asc or desc with asc being the default. Example: id, desc |
Request examples
- cURL
- Python
- JavaScript
Response
Search for tank mixes
 GET /tankMixes/search
Search for tank mixes by name, partial values are supported. Tank mix from John Deere Operation Center are available at the Leaf User level.
Parameter (to filter by) | Values |
---|---|
name | part of the tank mix name to be searched (required) |
maxResults | the number of results that should be returned (max value is 20). The default is 10 |
Request examples
- cURL
- Python
- JavaScript