General information

Sending production orders to Evocon is possible via REST API. The source of the production orders is an SQL query to the database of the ERP system or an API push integration from the ERP. By default the data that is sent to Evocon is a list of active orders for all stations. The API also supports integrations where the ERP sends API POST request for each order individually to activate or close it in Evocon.

Evocon expects the current list of active orders that are connected to the production stations. In case an order is closed on the ERP side, it should not be sent to Evocon with the next update. And in this case, the order is also hidden from the orders selection view in Evocon.

Using Evocon API

Sending production orders

Authentication scheme: Basic authentication

<aside> ❗ When making API requests using Authorization header, the credentials must be created by connecting the API key and Secret key by colon : and base64 encoding the result. For example: EVO123456789**:**SeCrEtKeY123 would become RVZPMTIzNDU2Nzg5OlNlQ3JFdEtlWTEyMw==

This would be used in request headers as ’Authorization: Basic RVZPMTIzNDU2Nzg5OlNlQ3JFdEtlWTEyMw==’

When using the built-in Basic Authentication fields in an application like Excel then Username is API key and password is Secret key.

</aside>

URL https://api.evocon.com/api/import/prodorders?createProduct=true&deactivateOrders=true

Method POST

Supported data types application/json

Parameters

Parameter name Description Comments
createProduct Specifies if products that are connected to orders should be added if they are not found in Evocon.

true - creates and activates orders. Also creates products and product-station connections if they do not exist. Updates and overwrites product-station connections that exist.

false - only creates orders for products that are already in Evocon with connections to the stations. | Optional, default is false. But suggested value for the most simple workflow requires it to be true. | | deactivateOrders | Specifies if current active orders should be closed or not.

true - other orders not part of the request that are active are deactivated.

false - other orders not part of the request that are active stay active. | Optional, default is true. | | | | |

Body An array of production orders.

Field name Description Comments Connected entity
productionOrderId
(mandatory) Unique identifier for the production order. This is one of the fields that operators see when they choose the active order in Evocon. The maximum length is 200 characters. It is advised to only use latin letters and numbers in the productionOrderId field. Otherwise, requesting statistics using the productionOrderId may not work without additional steps. Production order
productSku
(mandatory) Unique identifier of the product that is connected to this production order. This is one of the fields that operators see when they choose the active order in Evocon. Product
productName
(mandatory) Common name for the product connected to this production order. This is one of the fields that operators see when they choose the active order in Evocon. Needed only when creating products using createProduct=true in flag in URL Product
stationId
(mandatory) Station identificator (station parameter “alias” that you can get from https://api.evocon.com/api/stations. Used for connecting an order to Station resource in Evocon. Evocon support can map the station identificator used in the ERP system to Evocon station. Evocon can use the stationId of ERP. We have a field in our database to match the ERP resource or workcenter id to Evocon id. Production order
runTimeUnit
(mandatory) Defines the unit for runTime (cycle time) value. It must be one of the following strings:
◦ second_per_unit
◦ unit_per_second
◦ unit_per_minute
◦ unit_per_hour | Needed only when creating products using createProduct=true in flag in URL | Product route |

| runTime (mandatory) | Cycle time or the time used to produce a unit in “run time unit”. | Needed only when creating products using createProduct=true in flag in URL | Product route | | cycleTimeCritical (mandatory) | Defines the time after which a production delay becomes a stop and needs a stop reason from operators. In this example, if the line is stopped for more than 3 minutes ( seconds), it is considered a stop. | Needed only when creating products using createProduct=true in flag in URL | Product route | | unitID (mandatory) | Defines the name of the unit. It can be pcs, min, m, stk, kg... | Used only when creating products using createProduct=true in flag in URL | Product | | unitQuantity (mandatory) | Defines the value of 1 sensor signal registered by Evocon device. For example, if we measure meters and use an encoder with 100 pulses per rotation, and the wheel connected to the encoder has 20cm (0.2m) circumference then this value is 0.2/100=0.002 (meters per signal). In most cases where 1 signal = 1 product, the value is 1. | Used only when creating products using createProduct=true in flag in URL | Product route | | productGroupAlias (mandatory) | The product group alias defines the group the product belongs to. If the productGroupAlias is not found, a new global product group will be created in Evocon with the sent name and alias. | Used only when creating products using createProduct=true in flag in URL | Product | | plannedStartTime (mandatory) | Timestamp when the order should start is expected in ISO format (YYYY-MM-DDTHH:MM:SS). Production orders with dates closer to now are at the top. Orders with future dates are at the bottom. | If ordering sequence isn't important, send a generic timestamp such as “2025-01-01T00:00:00” | Production order | | plannedQty (mandatory) | Defines the target planned quantity needed to complete this order. If there is no target specified, use 0. | | Production order | | setupTime (optional) | Time in seconds for setup | Used only when creating products using createProduct=true in flag in URL | Production order | | active (optional) | Optional parameter to activate/deactivate an order | Must be specified per order if deactivateOrders parameter is false. | Production order | | productionOrderNote (optional) | Optional parameter to send additional instructions or information with the order. Visible in shift view orders selection modal. | | Production order | | alternativeUnitId (optional) | Name of the alternative unit. It can be pcs, min, m, stk, kg,… | Used with the following 2 items to set up alternative unit conversion. | Product | | unitConversion (optional) | Multiplier to convert from main unit to alt. unit or vice versa. | Must be sent if alternativeUnitId is sent. | Product route | | unitConversionType (optional) | If unitConversionType = "0" then unitConversion value is x in "x main unit = 1 alt unit" If unitConversionType = "1" then unitConversion value is x in "x alt unit = 1 main unit” | Must be sent if alternativeUnitId is sent. If main unit is "meters", alt unit id is "pcs" and unitConversionType = "0", and unitConversion = "2.5", it means that 2.5 meters = 1 piece.

If main unit is "meters", alt unit id is "pcs" and unitConversionType = "1", and unitConversion = "2.5", it means that 2.5 pieces = 1 meter. | Product route | | scrapUnitQuantity (optional) | Used in some advanced configurations. Enables overwriting the unitQuantity field in case scrap signal is measured in different unit from the production signal. | For example if the products are counted in single pieces when they enter a production line, but counted as boxes at the end of the line. | Product route | | lotCode (optional) | lotCode field used for as an identifier of the Lot/Batch | It is advised to only use latin letters and numbers in the lotCode field. Otherwise, requesting statistics using the lotCode may not work without additional steps. | Production order |

Examples

cURL full-example (sends production orders and product information to Evocon)

curl --request POST \
  --url "<https://api.evocon.com/api/import/prodorders?createProduct=true&deactivateOrders=true>" \
  --header 'Authorization: Basic <ACCESS_TOKEN_HERE>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "productSku": "OP1",
		"productName": "OrderProduct1",
    "plannedQty": "100",
    "setupTime": "15",
    "stationId": "1",
    "unitID": "pcs",
    "unitQuantity": "1",
    "productGroupAlias": "Imported",
    "cycleTimeCritical": "180",
    "runTime": "420",
    "runTimeUnit": "second_per_unit",
    "productionOrderId": "ORDER_000001",
    "plannedStartTime": "2028-05-05T10:00:00",
		"productionOrderNote": "Very urgent!",
		"alternativeUnitId":"kg",
    "unitConversion":"0.5",
    "unitConversionType":"0",
    "lotCode": "LOT001"
  },{
    "productSku": "OP2",
    "productName": "OrderProduct2",
    "plannedQty": "200",
    "setupTime": "30",
    "stationId": "1",
    "unitID": "pcs",
    "unitQuantity": "1",
    "productGroupAlias": "Imported",
    "cycleTimeCritical": "180",
    "runTime": "420",
    "runTimeUnit": "second_per_unit",
    "productionOrderId": "ORDER_000002",
    "plannedStartTime": "2028-05-05T10:00:00",
		"productionOrderNote": "<https://someserver.com/instructions.pdf>",
		"alternativeUnitId":"kg",
    "unitConversion":"0.5",
    "unitConversionType":"0",
     "lotCode": "LOT001"
  },
]'