Orders API
General Information
Stanley/Stella EDI is an FTP Service that lets you place direct orders (as text files) without need to log on our webshop. It is very convenient since after a one-shot development you will gain the ability to pass orders directly from your system, and get information back from us (like : order status update or financial documents)
The system mainly consists in three steps:
-
you create a text file that suits the specifications below
-
you upload it on our ftp server
-
we process the file and create your order
-
If anything goes wrong, you get an error file by EDI and email that gives you information on the error
When ordering by EDI, the same information as a classic order is also provided (you get the confirmation emails, shippings, etc...)
Integration
Preparing your system
The EDI is based on structured data and uses Stanley/Stella naming convention as described on this page. You can also get the list of codes by various other means:
-
On the FTP server, in the "StockOverview" folder
EDI File specifications
Because it is directly copied onto our system the EDI files you create should comply with the following specifications. Examples are provided below
-
File encoding : files are by default imported using ANSI Windows Latin-1 character encoding. Files can also be UTF8 encoded, but the file name must then end with UTF8:
-
-
filename.txt -> imported using ANSI charachter set
-
filenameUTF8.txt -> imported using UTF8 character set
-
-
File extension : .txt
-
Date format : DD/MM/YYYY
-
Decimals are delimited by a comma (123456,78)
-
The file contains one line per code
-
Each line starts with a code immediately followed by the hyphen character immediately followed by the field value (no spaces)
-
Optional fields should not be present if empty
-
Customer number field (0101) should match with the FTP username
-
No line should be empty
In order to correctly map your system with our, please refer to this mapping file which gives extended information :
Sample EDI Ordering File
File naming : sample_order_0001.txt
This is an example of a correct EDI ordering file. The file name can be any string.
Please note the last line is mandatory.
0001-*** HEADER *** 0101-R00000
0114-MY REFERENCE
0001-*** HEADER ***
0001-*** TO BE SHIPPED TO ***
0602-SPECIFIC
0603-John Doe
0604-Some_adress
0606-9999
0607-Some_City
0608-BE
0609-John Doe
0001-*************
0001-*** LINES ***
0501-STSM522
0502-C0031M
0503-2
0504-Order two Stanley Strolls Navy Medium
0001-*** LINES ***
0501-STSM522
0502-C0021M
0503-4
0504-Order four Stanley Strolls Black Medium
9999-*end of order*
Sample EDI Order Confirmation
File naming : YYYYMMDHHMMSS_SOYY_000000_CREATED.txt
This file is created when your order is correctly processed. It is the order as recorded in our system. It should contain the same data as your file. Note that this response also contains the calculated transport costs.
0001-*** HEADER *********************************** 0100-CREATED
0101-R00000
0102-SO17-037032
0104-
0107-NORMAL
0114-MY REFERENCE
0001-**********************************************
0001-*** TO BE BILLED TO ************************** 0201-R00000
0203-John Doe
0204-billing_address
0205-
0206-9999
0207-Some_City
0208-BE
0209-Invoicing
0001-**********************************************
0001-*** TO BE SHIPPED TO ************************* 0603-John Doe
0604-Some_address
0605-
0606-9999
0607-Some_City
0608-BE
0609-John Doe
0001-**********************************************
0001-*** LINES ************************************ 0501-STSM522
0502-C0031M
0503-2
0504-Order two Stanley Strolls Navy Medium
0001-**********************************************
0001-*** TRANSPORT ********************************
0501-STSM522
0502-C0021M
0503-4
0504-Order four Stanley Strolls Black Medium
0701-6,50
0702-7,87
0001-**********************************************
9999-*end of order*
Sample EDI Picking message
File naming : YYYYMMDHHMMSS_SOYY_000000_RDYTOSHIP.txt
This file is created when your order is released to our warehouse and they are picking/packing your goods and placing them on the transport
0001-*** HEADER *********************************** 0100-READYTOSHIP
0101-R00000
0102-SO00-000000
0104-08/28/17
0107-NORMAL
0114-MY REFERENCE
0001-**********************************************
0001-*** TO BE BILLED TO ************************** 0201-R00000
0203-MY COMPANY
0204-Some_address
0205-
0206-9999
0207-Some_City
0208-BE 0209-
0001-**********************************************
0001-*** TO BE SHIPPED TO ************************* 0603-MY COMPANY
0604-Some_address
0605-
0606-9999
0607-Some_City
0608-BE
0609-John Doe
0001-**********************************************
0001-*** LINES ************************************ 0501-STSM522
0502-C0031M
0503-2
0001-**********************************************
0501-STSM522
0502-C0021M
0503-4
0001-**********************************************
9999-*end of order*
Sample EDI Shipping confirmation
File naming : YYYYMMDHHMMSS_SOYY_000000_SHIPPED.txt
This file is created when your order have left our warehouse and are being shipped to you. Note this file also contains your tracking number.
0001-*** HEADER *********************************** 0100-SHIPPED
0101-R00000
0102-SO00-000000
0104-08/28/17
0107-NORMAL
0114-MY REFERENCE
0116-YOUR_TRACKING_NUMBER
0001-**********************************************
0001-*** TO BE BILLED TO ************************** 0201-R00000
0203-MY COMPANY
0204-Some_address
0205-
0206-9999
0207-Some_City
0208-BE
0209-
0001-**********************************************
0001-*** TO BE SHIPPED TO ************************* 0603-MY COMPANY
0604-Some_address
0605-
0606-9999
0607-Some_City
0608-BE
0609-John Doe
0001-**********************************************
0001-*** LINES ************************************ 0501-STSM522
0502-C0031M
0503-2
0001-**********************************************
0501-STSM522
0502-C0021M
0503-4
0001-**********************************************
9999-*end of order*
Sample EDI Invoice
File naming : YYYYMMDHHMMSS_SOYY_000000_INVOICED.txt
This file is created when your order is invoiced. It contains the same information as your paper invoice and can be used for automation purpose.
FTP Connection
You will need specific credentials to use that feature. You can request these by clicking here.
The host is ftp.stanleystella.com
The FTP folder structure is as follows
Read | Write | Delete | Comment | |
Root | No | No | No | Not Used |
\fromCustomer | Yes | Yes | No | EDI File upload |
\toCustomer | Yes | Yes | Yes | EDI Messages |
\Stock Overview | Yes | No | No | Stock (*.csv, *.xls) |
Place here your EDI files. Please note that one file = one order generated
toCustomer folder
Here we place our EDI replies and error messages.
We also place a file named "backorder.csv" that contains the list of your backorders, if any. This file is generated daily at 8am.
Stock Overview folder
This folder contains two files (one csv, one excel) providing information on our stock at item level. These files are updated hourly.
Debugging Common errors
When an EDI file is incorrectly build, the system doesn't handle it and sends out an error message. Please find here the most common ones.The error needs to be fixed and a correct file needs to be resubmitted
This EDI file is for the wrong Customer No. Only requests for R00000 can be used in this ftp location
For security and privacy reasons, the systems checks if the file is uploaded by the same customer indicated in the order. This message informs the customer number stated in the field 0101 does not match with the login used to upload the file.
The Customer does not exist. Identification fields and values: No.='R00000'
This message informs you the customer number stated in field 0101 doesn't exist in our system
The Item Variant does not exist. Identification fields and values: Item No.='STSQ522',Code='C0031T'
This message indicates that the requested Item/Variant combination doesn't exist in our system. Any wrong input will make the order fail. Classic errors are missing sizes or incorrect color - please refer to the naming convention page for further information : https://api.stanleystella.com/page/naming-conventions
In the above example, the item code STSQ522 and the variant code C0031T both don't exist.
Visible in Webshop must be equal to 'Yes' in Item Variant Item No.='STPM529',Code='C6511X'. Current Value is 'No'
This message indicates that the requested Item/Variant combination is currently not offered for sale - either because ther is no stock or because the product is discontinued.
You may wish to check the stock before placing your order, by using our stock webservice. Please refer to this page for more information on this service.
Status must not be Blocked in Item Variant Item No.='STPM529',Code='C6511X'
This message indicates that the requested Item/Variant combination is currently not offered for sale - either because ther is no stock or because the product is discontinued.
You cannot order more than X on Item Variant STTM028 C0011L
This message is fired through when one of our reference is discontinued, and no replenishement is foreseen. The product is still available for sale but in order to avoid creating a backorder that will never been fulfilled, you cannot order more pieces than the quantity we have in stock.
The operation could not complete because a record in the table XXX was locked by another user. Please retry the activity.
This message indicates that for some reason the order entry table is locked and your order could not be processed. The most frequent cause for this error is a long running SQL statement on our side.