Oauth2
A GET call is made to
https://app.scanorders.com/api/1.1/oauth/authorize
with the client_id and redirect_uri as parameters.
When this is successful, a parameter, "code", is sent back in the URL, to the external service
Next, the external service must execute a POST call to https://app.scanorders.com/api/1.1/oauth/access_token
with parameters: "client_id", "client_secret", "redirect_uri", and "code". This is known as the token endpoint.
Lastly, the app will respond with "access_token", "expires_in", and "uid" parameters that the external site can store for the user.
The access_token is used in future calls to ScanOrders from the user within the external app (until expiry)
General
The general endpoint to get data from ScanOrders follows this pattern:
https://app.scanorders.com/api/1.1/wf/
endpointname
endpointname is the endpoint you are targeting.
For example if you are retrieving data related to orders the endpoint is orders, make calls to:
https://app.scanorders.com/api/1.1/wf/orders
Orders - Get a Sales Order by Id
Request URL
https://app.scanorders.com/api/1.1/wf/orders
Request body
To retrieve a specific order with full details, you must pass in the Scanorders OrderID for the order.
Attribute | Type / Valid Values | Requirement | Description |
---|---|---|---|
OrderId | numeric | Required | A numeric value representing the ScanOrders OrderId of order being sought. |
Sample
{
"url": "https://app.scanorders.com/api/1.1/wf/orders",
"method": "POST",
"qs": {},
"body": {
"OrderID": "{{7623321}}"
},
"type": "urlencoded",
"headers": {},
"response": {
"output": "{{body.response}}"
}
}
Response 200 Sample
{
"status": "Success",
},
"data": {
"orderbarcode": 98123251222,
"customername": David Smith,
"orderquantity": "37",
"status": 123.0,
"orderdate": "1/07/2021"
}
Response 403
If you have provided invalid subscription data, you will receive a 403 FORBIDDEN response. This will happen for the following reasons:
- The "user" was missing or it not found in the ScanOrders databases
Response 500
If you receive a 500 code response, something went wrong on ScanOrders's side while trying to process your request.
Create a new Order
Request URL
https://app.scanorders.com/api/1.1/wf/neworders
Request body
You need to pass in a JSON object that represents the picking order that will get created in ScanOrders.
Attribute | Type / Valid Values | Requirement | Description |
---|---|---|---|
barcode | text | Required | barcode or SKU to be scanned |
ordernumber | text | Required | |
orderdate | text | Required | |
productname | text | Optional | |
qtytopick | numeric | Required | numerical quantity of a line item to be picked |
customername | text | Required | |
shippingaddress | text | Optional | |
mktid | text | Optional | An order identifier often used by marketplaces such as shopify |
binloc | text | Required | barcode or SKU to be scanned |
Sample:
{
"url": "https://app.scanorders.com/api/1.1/wf/neworders",
"method": "POST",
"qs": {},
"body": {
"barcode": "822131252142",
"ordernumber": "30002",
"orderdate": ", '2021-10-02'",
"productname": "Blue T-shirt M",
"qtytopick": "45",
"customername": "Larry Jones",
"shippingaddress": "123 Test st, Los Angeles, CA, 90241, USA",
"mktid": "93242353453",
"binloc": "LOC-823321"
},
"response": {
"output": "{{body.response}}"
}
}
Response 200
{
"name": "fulfilmentid",
"type": "text",
"label": "Fulfilment ID"
}
Response 400
A 400 - Bad Request response is sent back when the server cannot successfully parse your JSON object into an Order object to input into ScanOrders.
Response 500
If you receive a 500 code response, something went wrong on ScanOrders's side while trying to process your request.
Update a Fulfilment Status
Request URL
https://app.scanorders.com/api/1.1/wf/updateorder
Request body
You need to pass in a JSON object that represents the fulfilment status and order ID to be updated.
Attribute | Type / Valid Values | Requirement | Description |
---|---|---|---|
Status | text | Required | Either, Picked, Ready to Fulfil or In Progress |
OrderID | text | Required | The ScanOrders Order ID |
Sample:
{
"url": "https://app.scanorders.com/api/1.1/wf/updateorder",
"method": "POST",
"qs": {},
"body": {
"OrderID": "822131252142",
"status": "Picked"
},
"response": {
"output": "{{body.response}}"
}
}
Response 200
{
"name": "OrderID",
"type": "text",
"label": "Order ID"
}
Response 400
A 400 - Bad Request response is sent back when the server cannot successfully parse your JSON object into an Order object to update the status into ScanOrders.
Response 500
If you receive a 500 code response, something went wrong on ScanOrders's side while trying to process your request.
Comments
0 comments
Article is closed for comments.