Create Order
POST/orders/
Use this endpoint to create an order.
Order identification
Orders imported via the REST api need to specify an order
identifier. This identifier is used by Propeller to determine if an order has already been imported before into Propellor or not.
{
"source" : "MsBusinessCentral",
"sourceId : "order-1234"
}
Create an order using an existing user resource
Orders can be created referencing an existing user
/ contact
or customer
resource. A user resource can be referenced using a lookupKey in the clientData
element.
{
"clientData": {
"user": {
"source" : "MsBusinessCentral",
"sourceId : "user-1234"
}
}
}
Create an order using the anonymous user
Creating an order can be done without referencing an existing user
,contact
or customer
object. When no clientData
element is present in the payload a firstName
, middleName
, lastName
and email
needs to be present in the root or the order
payload.
{
"firstName" : "Miles",
"middleName" : "",
"lastName" : "McCoy",
"email" : "miles@propel.us"
}
Anonymous orders are not linked to any existing user
/ contact
or customer
resource in Propeller. Anonymous orders are e.g. usefull when Propeller acts as a "in between" a marketplace (e.g. Amazon) and an ERP system. Marketplace orders are imported into Propeller and from Propeller exported to the ERP system. There is no added value of creating separate users for each Marketplace order in Propeller.
Referencing products as order items
an orderItem
always contains a reference to an existing product
using a lookupKey
{
"type": "product",
"source" : "MsBusinessCentral",
"sourceId : "product-1234"
}
Request
Responses
- 200
- 400
- 404
Create Order - 200
Response Headers
Create Order - 400 (order already exists)
Response Headers
Create Order - 404 (product not found) / Create Order - 404 (contact not found)