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
- application/json
Body
Array [
]
clientData
object
contact
object
invoiceData
object
address
object
items
object[]
shippingData
object
address
object
total
object
Responses
- 200
- 400
- 404
Create Order - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Order - 200
Schema
Array [
]
data
object
clientData
object
invoiceData
object
address
object
items
object[]
paymentData
object
postageData
object
shippingData
object
address
object
shop
object
total
object
tax
object
{
"data": {
"accountingId": "",
"channelId": 1,
"clientData": {
"abbreviation": "AU",
"dateOfBirth": "",
"debtorId": "ANONYMOUS",
"email": "",
"fax": "",
"firstName": "Anonymous",
"gender": "U",
"id": 14644,
"lastName": "User",
"login": "",
"middleName": "",
"mobile": "",
"name": "Anonymous User",
"phone": "",
"pricelistAmount": "JONSPR",
"pricelistPercentage": "",
"primaryLanguage": "",
"ssn": "",
"title": ""
},
"date": "2023-03-03T13:10:45",
"debtorId": "ANONYMOUS",
"email": "miles@propel.us",
"externalId": "",
"extraInfo": "extrainfo text",
"firstName": "Miles",
"id": 557,
"invoiceData": {
"address": {
"active": "Y",
"city": "Arnhem",
"code": "11234",
"company": "Propel",
"country": "NL",
"email": "miles@propel.us",
"fax": "",
"firstName": "Miles",
"gender": "U",
"icp": "N",
"id": 105950,
"isDefault": "N",
"lastName": "McCoy",
"middleName": "",
"mobile": "",
"name": "",
"notes": "",
"number": "34",
"numberExtension": "A",
"phone": "0032445888",
"postalCode": "6822 DE",
"region": "",
"street": "Noordpad",
"type": "invoice",
"url": ""
}
},
"itemCount": 1,
"items": [
{
"childItems": [],
"discountAmount": 0,
"discountAmountNet": 0,
"discountAmountTotal": 0,
"discountAmountTotalNet": 0,
"discountPercentage": 0,
"name": "Drum Oki 44318508 zwart",
"notes": "",
"price": 71.74,
"quantity": 2,
"sku": "411544",
"supplier": "",
"supplierCode": "",
"taxCode": "H",
"taxPercentage": 21,
"type": "product",
"unit": 1
}
],
"language": "",
"lastName": "McCoy",
"merchantCost": 4.9,
"middleName": "",
"orderSource": "API",
"paymentData": {
"grossAmount": 0,
"netAmount": 0,
"payMethod": "",
"payStatus": "",
"paystatusdate": "",
"tax": 0,
"taxPercentage": "",
"transactionId": ""
},
"postageData": {
"carrier": "",
"partialDeliveryAllowed": "Y",
"pickUpLocationId": 0,
"postage": 0,
"postageNet": 0,
"postageTaxPercentage": 21,
"requestDate": "",
"shippingMethod": ""
},
"reference": "reference text",
"remarks": "remarks text",
"shippingData": {
"address": {
"active": "Y",
"city": "Arnhem",
"code": "11234",
"company": "Propel",
"country": "NL",
"email": "miles@propel.us",
"fax": "",
"firstName": "Miles",
"gender": "U",
"icp": "N",
"id": 105951,
"isDefault": "N",
"lastName": "McCoy",
"middleName": "",
"mobile": "",
"name": "",
"notes": "",
"number": "34",
"numberExtension": "A",
"phone": "0032445888",
"postalCode": "6822 DE",
"region": "",
"street": "Noordpad",
"type": "delivery",
"url": ""
}
},
"shop": {
"id": 1,
"name": "Propellor Sonar"
},
"shopId": 1,
"status": "NEW",
"total": {
"discountPercentage": 3.48481,
"discountValue": 5,
"tax": {
"0": 0,
"21": 29.6058
},
"totalGross": 138.48,
"totalNet": 167.5608
},
"trackTraceCode": "",
"type": "dropshipment",
"userId": 14644
},
"messages": [],
"total": 1
}
{
"data": {
"accountingId": "",
"channelId": 1,
"clientData": {
"abbreviation": "AU",
"dateOfBirth": "",
"debtorId": "ANONYMOUS",
"email": "",
"fax": "",
"firstName": "Anonymous",
"gender": "U",
"id": 14644,
"lastName": "User",
"login": "",
"middleName": "",
"mobile": "",
"name": "Anonymous User",
"phone": "",
"pricelistAmount": "JONSPR",
"pricelistPercentage": "",
"primaryLanguage": "",
"ssn": "",
"title": ""
},
"date": "2023-03-03T13:10:45",
"debtorId": "ANONYMOUS",
"email": "miles@propel.us",
"externalId": "",
"extraInfo": "extrainfo text",
"firstName": "Miles",
"id": 557,
"invoiceData": {
"address": {
"active": "Y",
"city": "Arnhem",
"code": "11234",
"company": "Propel",
"country": "NL",
"email": "miles@propel.us",
"fax": "",
"firstName": "Miles",
"gender": "U",
"icp": "N",
"id": 105950,
"isDefault": "N",
"lastName": "McCoy",
"middleName": "",
"mobile": "",
"name": "",
"notes": "",
"number": "34",
"numberExtension": "A",
"phone": "0032445888",
"postalCode": "6822 DE",
"region": "",
"street": "Noordpad",
"type": "invoice",
"url": ""
}
},
"itemCount": 1,
"items": [
{
"childItems": [],
"discountAmount": 0,
"discountAmountNet": 0,
"discountAmountTotal": 0,
"discountAmountTotalNet": 0,
"discountPercentage": 0,
"name": "Drum Oki 44318508 zwart",
"notes": "",
"price": 71.74,
"quantity": 2,
"sku": "411544",
"supplier": "",
"supplierCode": "",
"taxCode": "H",
"taxPercentage": 21,
"type": "product",
"unit": 1
}
],
"language": "",
"lastName": "McCoy",
"merchantCost": 4.9,
"middleName": "",
"orderSource": "API",
"paymentData": {
"grossAmount": 0,
"netAmount": 0,
"payMethod": "",
"payStatus": "",
"paystatusdate": "",
"tax": 0,
"taxPercentage": "",
"transactionId": ""
},
"postageData": {
"carrier": "",
"partialDeliveryAllowed": "Y",
"pickUpLocationId": 0,
"postage": 0,
"postageNet": 0,
"postageTaxPercentage": 21,
"requestDate": "",
"shippingMethod": ""
},
"reference": "reference text",
"remarks": "remarks text",
"shippingData": {
"address": {
"active": "Y",
"city": "Arnhem",
"code": "11234",
"company": "Propel",
"country": "NL",
"email": "miles@propel.us",
"fax": "",
"firstName": "Miles",
"gender": "U",
"icp": "N",
"id": 105951,
"isDefault": "N",
"lastName": "McCoy",
"middleName": "",
"mobile": "",
"name": "",
"notes": "",
"number": "34",
"numberExtension": "A",
"phone": "0032445888",
"postalCode": "6822 DE",
"region": "",
"street": "Noordpad",
"type": "delivery",
"url": ""
}
},
"shop": {
"id": 1,
"name": "Propellor Sonar"
},
"shopId": 1,
"status": "NEW",
"total": {
"discountPercentage": 3.48481,
"discountValue": 5,
"tax": {
"0": 0,
"21": 29.6058
},
"totalGross": 138.48,
"totalNet": 167.5608
},
"trackTraceCode": "",
"type": "dropshipment",
"userId": 14644
},
"messages": [],
"total": 1
}
Create Order - 400 (order already exists)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Order - 400 (order already exists)
Schema
error
object
{
"error": {
"code": 15004,
"messages": [
"Order with sourceId [order-1234] already exists"
],
"moreInfo": "https://www.propel.us/docs/errors/15004",
"status": 400,
"type": "OrderExists"
}
}
{
"error": {
"code": 15004,
"messages": [
"Order with sourceId [order-1234] already exists"
],
"moreInfo": "https://www.propel.us/docs/errors/15004",
"status": 400,
"type": "OrderExists"
}
}
Create Order - 404 (product not found) / Create Order - 404 (contact not found)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Order - 404 (contact not found)
- Create Order - 404 (product not found)
Schema
error
object
{
"error": {
"code": 80006,
"messages": [
"product with sku [411544167] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/80006",
"status": 404,
"type": "ProductNotFound"
}
}
{
"error": {
"code": 50006,
"messages": [
"contact with sourceId [contact-1234] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/50006",
"status": 404,
"type": "contactNotFound"
}
}
{
"error": {
"code": 80006,
"messages": [
"product with sku [411544167] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/80006",
"status": 404,
"type": "ProductNotFound"
}
}