VRt.Agro [AG] (6.20.2289)

Veeroute Support Team: servicedesk@veeroute.comLicense: Proprietary

Veeroute Agro API.

Description

The service is designed to calculate the work plan of production facilities.

Objects overview

objects

Field

  • produces a certain crop of a certain moisture content
  • products from the field can only be moved to the Elevator or Factory

Elevator

  • consists of Gates, Dryers, short-term and long-term storage areas
  • dries the grain (if the moisture content of the crop is more than acceptable)
  • stores dry grain in short-term storage places (warehouses), while unloading and loading grain is allowed within one day
  • stores dry grain in long-term storage places (sleeves, trenches, mounds)
  • when stored in one storage, only one type of culture can be located
  • sells surplus grain to the Market
  • production processes inside the facility: drying, loading / unloading to a storage location, storage

Factory

  • consists of Gates, Dryers, Bunkers, Consumers
  • [if drying is present] dries the grain (if the moisture content of the crop is more than allowed)
  • stores dry grain in Bunkers (short-term storage tied to a specific crop)
  • maintains a minimum supply of grain for consumption in the Bunkers
  • Consumes grain from Bunkers
  • buys the missing grain from the Market
  • production processes inside the facility: drying, loading / unloading to a storage location, storage, consumption

Market

  • buys grain from elevators
  • sells grain to factories

Project

The project reflects the planned sequence of operations on agricultural crops, the types of operations are described below.

HARVEST

Crop harvesting:

  • between production facilities (Field and Elevator or Field)
  • the operation takes place within one day
  • on the Field there is a determination of grain moisture
Object (target_key)Subobject (target_detail_key)
SourceField-
DestinationElevator or FactoryGate

DRY

Drying culture:

  • inside the production facility (Elevator or Field)
  • duration of the operation - days
  • during the drying process, the mass and type of humidity changes (WET -> DRY)
  • the source indicates the mass of raw culture
  • in the appointment, the resulting mass of dry culture is indicated
Object (target_key)Subobject (target_detail_key)
SourceElevator or FactoryGate
DestinationElevator or FactoryDryer

LOAD

Loading culture from the Gate to the Storage Location (long-term, short-term, silo):

  • between parts of one production facility (Elevator or Field)
  • the operation takes place within one day
Object (target_key)Subobject (target_detail_key)
SourceElevator or FactoryGate or Dryer
DestinationElevator or FactoryStorage location (long-term, short-term, bunker)

UNLOAD

Unloading the culture from the storage place to the gate:

  • between parts of one production facility (Elevator)
  • the operation takes place within one day
Object (target_key)Subobject (target_detail_key)
SourceElevatorStorage location (long-term, short-term, bunker)
DestinationElevatorGate

STORE

Culture storage:

  • the operation takes place within one day
  • storage location does not change
Object (target_key)Subobject (target_detail_key)
SourceElevator or FactoryStorage location (long-term, short-term, bunker)
DestinationElevator or FactoryThe same storage location

RELOCATE

Transportation between production facilities:

  • between production facilities (Elevator and Field)
  • the operation takes place within one day
Object (target_key)Subobject (target_detail_key)
SourceElevatorGate
DestinationFactoryGate

CONSUMPTION

Field crop consumption:

  • between parts of one production facility (Field)
  • the operation takes place within one day
  • consumption comes from the Bunker
  • in addition, we can consume directly from the Gate or Dryer without laying in the Bunker
Object (target_key)Subobject (target_detail_key)
SourceFactoryHopper or Gate or Dryer
DestinationFactoryConsumer

SELL

Sale of culture:

  • between production facilities (Elevator and Market)
  • the operation takes place within one day
Object (target_key)Subobject (target_detail_key)
SourceElevatorGate
DestinationMarketContract

BUY

Buying culture:

  • between production facilities (Market and Factory)
  • the operation takes place within one day
Object (target_key)Subobject (target_detail_key)
SourceMarketContract
DestinationFactoryGate

Entity relationship diagram

erd

Plan

Production plan calculation.

Planning (SYNC)

Production plan calculation.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Data for calculation.

required
Array of objects (crop) [ 1 .. 501 ] items unique

List of crops.

required
Array of objects (field) [ 1 .. 20001 ] items unique

List of fields.

Array of objects (elevator) [ 1 .. 501 ] items unique

List of elevators.

required
Array of objects (factory) [ 1 .. 501 ] items unique

List of factories.

required
Array of objects (market) [ 1 .. 501 ] items unique

List of markets.

required
Array of objects (movement_matrix) [ 1 .. 8040402 ] items unique

Matrix describing the cost (in kilometers and monetary units) of moving grain between objects (in both directions). If there is no corresponding entry in the matrix between the objects, the movement of grain between them is considered impossible.

Array of objects (leftover) [ 0 .. 25001 ] items

List of leftovers.

required
object (plan_settings)

Plan settings.

Responses

Response Schema: application/json
required
object (tracedata)

Data for request tracing.

required
Array of objects (project) [ 0 .. 1000001 ] items

Production plan. The sequence of work.

required
object (plan_statistics)

General statistics.

Array of objects (entity_warning_list) [ 0 .. 100001 ] items

List of warnings. Depending on the flag calculation_settings.treat_warnings_as_errors - triggered checks are interpreted as errors or result in the removal of incorrect data from the calculation.

object (unplanned_items)

Unplanned items list.

progress
required
integer<int32> (calculation_progress) [ 0 .. 100 ]

Calculation progress as a percentage. The progress displays the current number of completed steps.

required
object (calculation_info)

Calculation information.

Request samples

Content type
application/json
{
  • "crops": [
    ],
  • "fields": [
    ],
  • "elevators": [
    ],
  • "factories": [
    ],
  • "markets": [
    ],
  • "movement_matrix": [
    ],
  • "leftovers": [
    ],
  • "plan_settings": {
    }
}

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "project": [
    ],
  • "statistics": {
    },
  • "progress": 100,
  • "info": {
    },
  • "warnings": [ ]
}

Planning (ASYNC)

The result can be obtained using the result method, removing - with delete.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Data for calculation.

required
Array of objects (crop) [ 1 .. 501 ] items unique

List of crops.

required
Array of objects (field) [ 1 .. 20001 ] items unique

List of fields.

Array of objects (elevator) [ 1 .. 501 ] items unique

List of elevators.

required
Array of objects (factory) [ 1 .. 501 ] items unique

List of factories.

required
Array of objects (market) [ 1 .. 501 ] items unique

List of markets.

required
Array of objects (movement_matrix) [ 1 .. 8040402 ] items unique

Matrix describing the cost (in kilometers and monetary units) of moving grain between objects (in both directions). If there is no corresponding entry in the matrix between the objects, the movement of grain between them is considered impossible.

Array of objects (leftover) [ 0 .. 25001 ] items

List of leftovers.

required
object (plan_settings)

Plan settings.

Responses

Response Schema: application/json
required
object (tracedata)

Data for request tracing.

id
required
string<uuid> (calculation_id)

Calculation identifier.

Request samples

Content type
application/json
{
  • "crops": [
    ],
  • "fields": [
    ],
  • "elevators": [
    ],
  • "factories": [
    ],
  • "markets": [
    ],
  • "movement_matrix": [
    ],
  • "leftovers": [
    ],
  • "plan_settings": {
    }
}

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "id": "11111111-2222-3333-4444-555555555555"
}

Calculation state

Read calculation state by the calculation identifier.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string<uuid> (calculation_id)
Example: 11111111-2222-3333-4444-555555555555

Calculation identifier.

Responses

Response Schema: application/json
required
object (tracedata)

Data for request tracing.

progress
required
integer<int32> (calculation_progress) [ 0 .. 100 ]

Calculation progress as a percentage. The progress displays the current number of completed steps.

required
object (calculation_info)

Calculation information.

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "progress": 52,
  • "info": {
    }
}

Cancel calculation

Cancel calculation process by the calculation identifier.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string<uuid> (calculation_id)
Example: 11111111-2222-3333-4444-555555555555

Calculation identifier.

Responses

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "message": "bad task data",
  • "schema_errors": [ ],
  • "logical_errors": [ ],
  • "warnings": [ ]
}

Getting the result

Getting the result based on the calculation identifier.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string<uuid> (calculation_id)
Example: 11111111-2222-3333-4444-555555555555

Calculation identifier.

Responses

Response Schema: application/json
required
object (tracedata)

Data for request tracing.

required
Array of objects (project) [ 0 .. 1000001 ] items

Production plan. The sequence of work.

required
object (plan_statistics)

General statistics.

Array of objects (entity_warning_list) [ 0 .. 100001 ] items

List of warnings. Depending on the flag calculation_settings.treat_warnings_as_errors - triggered checks are interpreted as errors or result in the removal of incorrect data from the calculation.

object (unplanned_items)

Unplanned items list.

progress
required
integer<int32> (calculation_progress) [ 0 .. 100 ]

Calculation progress as a percentage. The progress displays the current number of completed steps.

required
object (calculation_info)

Calculation information.

Response Schema: application/json
required
object (tracedata)

Data for request tracing.

required
Array of objects (project) [ 0 .. 1000001 ] items

Production plan. The sequence of work.

required
object (plan_statistics)

General statistics.

Array of objects (entity_warning_list) [ 0 .. 100001 ] items

List of warnings. Depending on the flag calculation_settings.treat_warnings_as_errors - triggered checks are interpreted as errors or result in the removal of incorrect data from the calculation.

object (unplanned_items)

Unplanned items list.

progress
required
integer<int32> (calculation_progress) [ 0 .. 100 ]

Calculation progress as a percentage. The progress displays the current number of completed steps.

required
object (calculation_info)

Calculation information.

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "project": [
    ],
  • "statistics": {
    },
  • "progress": 100,
  • "info": {
    },
  • "warnings": [ ]
}

Result removal

Removal of the planning result by the calculation identifier.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string<uuid> (calculation_id)
Example: 11111111-2222-3333-4444-555555555555

Calculation identifier.

Responses

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "message": "bad task data",
  • "schema_errors": [ ],
  • "logical_errors": [ ],
  • "warnings": [ ]
}

Data validation

Checking data before planning.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Data for calculation.

required
Array of objects (crop) [ 1 .. 501 ] items unique

List of crops.

required
Array of objects (field) [ 1 .. 20001 ] items unique

List of fields.

Array of objects (elevator) [ 1 .. 501 ] items unique

List of elevators.

required
Array of objects (factory) [ 1 .. 501 ] items unique

List of factories.

required
Array of objects (market) [ 1 .. 501 ] items unique

List of markets.

required
Array of objects (movement_matrix) [ 1 .. 8040402 ] items unique

Matrix describing the cost (in kilometers and monetary units) of moving grain between objects (in both directions). If there is no corresponding entry in the matrix between the objects, the movement of grain between them is considered impossible.

Array of objects (leftover) [ 0 .. 25001 ] items

List of leftovers.

required
object (plan_settings)

Plan settings.

Responses

Response Schema: application/json
required
object (tracedata)

Data for request tracing.

required
Array of objects (entity_warning_list) [ 0 .. 100001 ] items

List of warnings. Depending on the flag calculation_settings.treat_warnings_as_errors - triggered checks are interpreted as errors or result in the removal of incorrect data from the calculation.

Request samples

Content type
application/json
{
  • "crops": [
    ],
  • "fields": [
    ],
  • "elevators": [
    ],
  • "factories": [
    ],
  • "markets": [
    ],
  • "movement_matrix": [
    ],
  • "leftovers": [
    ],
  • "plan_settings": {
    }
}

Response samples

Content type
application/json
{
  • "tracedata": {
    },
  • "warnings": [ ]
}

Clipping (SYNC)

Data clipping.

Authorizations:
ApiKeyAuth
path Parameters
clip_key
required
string [ 1 .. 1024 ] characters
Example: crop_key_1

Target essence key.

query Parameters
clip_strategy
string (clip_strategy)
Example: clip_strategy=CROP_WITH_TRANSIT_ELEVATORS

Data clipping strategy.

Request Body schema: application/json
required

Data for clipping.

required
Array of objects (crop) [ 1 .. 501 ] items unique

List of crops.

required
Array of objects (field) [ 1 .. 20001 ] items unique

List of fields.

Array of objects (elevator) [ 1 .. 501 ] items unique

List of elevators.

required
Array of objects (factory) [ 1 .. 501 ] items unique

List of factories.

required
Array of objects (market) [ 1 .. 501 ] items unique

List of markets.

required
Array of objects (movement_matrix) [ 1 .. 8040402 ] items unique

Matrix describing the cost (in kilometers and monetary units) of moving grain between objects (in both directions). If there is no corresponding entry in the matrix between the objects, the movement of grain between them is considered impossible.

Array of objects (leftover) [ 0 .. 25001 ] items

List of leftovers.

required
object (plan_settings)

Plan settings.

Responses

Response Schema: application/json
required
Array of objects (crop) [ 1 .. 501 ] items unique

List of crops.

required
Array of objects (field) [ 1 .. 20001 ] items unique

List of fields.

Array of objects (elevator) [ 1 .. 501 ] items unique

List of elevators.

required
Array of objects (factory) [ 1 .. 501 ] items unique

List of factories.

required
Array of objects (market) [ 1 .. 501 ] items unique

List of markets.

required
Array of objects (movement_matrix) [ 1 .. 8040402 ] items unique

Matrix describing the cost (in kilometers and monetary units) of moving grain between objects (in both directions). If there is no corresponding entry in the matrix between the objects, the movement of grain between them is considered impossible.

Array of objects (leftover) [ 0 .. 25001 ] items

List of leftovers.

required
object (plan_settings)

Plan settings.

Request samples

Content type
application/json
{
  • "crops": [
    ],
  • "fields": [
    ],
  • "elevators": [
    ],
  • "factories": [
    ],
  • "markets": [
    ],
  • "movement_matrix": [
    ],
  • "leftovers": [
    ],
  • "plan_settings": {
    }
}

Response samples

Content type
application/json
{
  • "crops": [
    ],
  • "fields": [
    ],
  • "elevators": [
    ],
  • "factories": [
    ],
  • "markets": [
    ],
  • "movement_matrix": [
    ],
  • "leftovers": [
    ],
  • "plan_settings": {
    }
}

System

System functions. Auxiliary functionality common to all services.

Checking the availability

Checking the service availability.

Responses

Response Schema: application/json
health
required
number<double> [ 0 .. 1 ]

Current health.

Response samples

Content type
application/json
{
  • "health": 0.999
}

Getting the service version

Getting the service version.

Responses

Response Schema: application/json
major
required
integer<int32> [ 1 .. 100 ]

Product version. Within a single version, compatibility of common data structures between services is guaranteed. A version change indicates changes that are incompatible with previous versions of the product (and all services).

minor
required
integer<int32> [ 0 .. 111 ]

Minor version of the service. A version change indicates new functionality. The update is backward compatible with the major version of the service.

build
required
string [ 1 .. 64 ] characters

Build version.
Contains backwards compatible bug fixes and docs update.

Response samples

Content type
application/json
{
  • "major": 4,
  • "minor": 4,
  • "build": "1754RC"
}

Getting the documentation

Getting the file with this service documentation.

path Parameters
filename
required
string [ 6 .. 128 ] characters
Example: file_en.html

File name.

Responses

Response Schema:
string (file_html)

File with data in HTML format.

Response samples

Content type
application/json
{
  • "resource_id": "resource_id",
  • "detail": {
    }
}