Order data can be sent from an ERP system into Eton directly via calling the Eton API.
💡 This is an example of the standard built-in import format. Customized imports can be created in an integration module to support various ways of getting the orders into the system.
Creating an Integration User
The first step in setting up an automated order import is to create a user account for the integration. We only need to assign a name and an account type at this stage.
Navigate the menu to Administration > Users > Users
Click the âž• button to add a new user.
We only need to select the account type "Eton API Account". There are no special permissions needed for the JSON Import so we can leave the roles empty.
Press the save button to save the account, then open it back up again.
The "Generate Token" button should now be enabled. Press it to generate a token that can be used to access the API directly. It will show up in a popup that you can copy the text from. Save this for the next part.
Sending a Request
We are now ready to craft the HTTP request that will send order data to Eton. This part will get a bit technical.
The request looks like the following
POST http://[HOST]/api/1.0/order/importJson
Replace [HOST] with the IP or hostname of the Eton server in your local network.
HTTP Request Headers
Header | Value |
---|---|
Content-Type | application/json |
Eton-Authentication-Token | [MY TOKEN] |
Replace [MY TOKEN] with the token we generated in the previous step.
💡 In the default settings, the generated token has a limited lifetime. See token refresh mechanism.
Minimal Request Body
[
{
"orderNumber": "[ORDER NUMBER]",
"orderLines": [
{
"orderLineNumber": "[ORDER LINE NUMBER]",
"criteria": {
"[CRITERIA TYPE NAME]": "[CRITERIA VALUE]"
},
"articleNumber": "[ARTICLE NUMBER]",
"quantity": [ORDER LINE QUANTITY]
}
]
}
]
Replace the placeholders like [ARTICLE NUMBER] in the above with your actual data. Keep quotes as they are.
💡 This is only import for the orders, it assumes the articles have already been created ahead of time and exist in the system. See the different guides for step-by-step on how to set these up.
💡 Multiple orders may be sent at once in the same request, since the outer element is a JSON list.
💡 If an order that already exists in the system is sent again, the system will try to update it to the most recent data. If the order has already begun production, only some data may be updated.
Here is a more concrete example of a raw request that updates the order we created in a previous guide - Creating an Order - with a new criteria, but keeps the other information the same.
POST https://eton.systems/api/1.0/order/importJson HTTP/1.1
Content-Type: application/json
Host: eton.systems
Eton-Authentication-Token: abcd/1234/abcd/1234/abcd/1234/abcd/1234/
[
{
"orderNumber": "100",
"orderLines": [
{
"orderLineNumber": "1",
"criteria": {
"Thread Color": "Blue"
},
"articleNumber": "Article 1",
"quantity": 10
},
"orderDate": "2025-07-22 10:13:04.8629388 +02:00",
"customer": "Company A"
]
}
]
Field Specification
The order object holds the following properties
Field | Value | Type |
---|---|---|
orderNumber | Order number (required) | string |
originalOrderNumber | Original Order Number (optional) | string |
orderLines | List of order lines (required) | array |
orderDate | Date of order received outside of Ingenious (optional) | date string* |
firstManufacturingDate | Date to start manufacturing order (optional) | date string* |
deliveryDate | Planned delivery date (optional) | date string* |
customer | Customer name (optional) | string |
* see example above for valid date-string
The order line object may hold the following properties
Field | Value | Type |
---|---|---|
orderLineNumber | Order Line Number (required) | string |
originalOrderLineNumber | Original Order Line Number (optional) | string |
quantityPerCarrier | Number of products in each carrier (optional, default 1) | number |
articleNumber | Name of article (required) | string |
articleDescription | Description of new article (*optional) | string |
articleRouteName | Route name for new article (*optional) | string |
quantity | Number of pieces to produce (required) | number |
criteria | Dictionary of order line criterias (required, but may be empty) | dictionary** |
routeName | Order line level override of route (optional) | string |
** Send an empty dictionary - "criteria": { }
- if there are no criterias on the order line. If values need to be provided, the criteria type name is used as key and criteria value as value, e.g. "criteria": { "Color": "Blue" }
💡 The fields marked as *optional are only used when a new article is created. That happens when you try to import an article number that doesn't exist in the system.
Token Refresh Mechanism
The generated API token has a limited lifetime which defaults to 1 year.
When about half this time has passed, the system will generate a new token, which will be sent as a response header - following the same format as the request header.
Header | Value |
---|---|
Eton-Authentication-Token | [NEW TOKEN] |
If you see this header in the response, swap the saved token out for the new one to extend the validity.
Optionally, if you can't implement this part, it's possible to keep using the same token indefinitely by setting a really long lifetime.
Navigate the menu to Administration > Users > Account Providers
Click the row "Eton API Account", now edit the field "Login Idle Timeout Minutes" and set it to a really big value.