Skip to main content

Create Order

POST 

/orders/

Use this endpoint to create an order.

Order identification

Orders imported via the REST api need to specify an orderidentifier. 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 clientDataelement 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

Body

    accountingId string
    channelId number

    clientData

    object

    contact

    object

    source string
    sourceId string
    date string

    invoiceData

    object

    address

    object

    city string
    code string
    company string
    country string
    email string
    firstName string
    gender string
    icp string
    lastName string
    middleName string
    mobile string
    notes string
    number string
    numberExtension string
    phone string
    postalCode string
    region string
    street string
    url string

    items

    object[]

  • Array [

  • quantity number
    sku string
    type string
  • ]

  • language string
    merchantCost number
    reference string
    remarks string

    shippingData

    object

    address

    object

    city string
    code string
    company string
    country string
    email string
    firstName string
    gender string
    icp string
    lastName string
    middleName string
    mobile string
    notes string
    number string
    numberExtension string
    phone string
    postalCode string
    region string
    street string
    url string
    source string
    sourceId string
    status string

    total

    object

    discountAmount number
    trackTraceCode string

Responses

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

Schema

    data

    object

    accountingId string
    channelId number

    clientData

    object

    abbreviation string
    dateOfBirth string
    debtorId string
    email string
    fax string
    firstName string
    gender string
    id number
    lastName string
    login string
    middleName string
    mobile string
    name string
    phone string
    pricelistAmount string
    pricelistPercentage string
    primaryLanguage string
    ssn string
    title string
    date string
    debtorId string
    email string
    externalId string
    extraInfo string
    firstName string
    id number

    invoiceData

    object

    address

    object

    active string
    city string
    code string
    company string
    country string
    email string
    fax string
    firstName string
    gender string
    icp string
    id number
    isDefault string
    lastName string
    middleName string
    mobile string
    name string
    notes string
    number string
    numberExtension string
    phone string
    postalCode string
    region string
    street string
    type string
    url string
    itemCount number

    items

    object[]

  • Array [

  • childItems undefined[]
    discountAmount number
    discountAmountNet number
    discountAmountTotal number
    discountAmountTotalNet number
    discountPercentage number
    name string
    notes string
    price number
    quantity number
    sku string
    supplier string
    supplierCode string
    taxCode string
    taxPercentage number
    type string
    unit number
  • ]

  • language string
    lastName string
    merchantCost number
    middleName string
    orderSource string

    paymentData

    object

    grossAmount number
    netAmount number
    payMethod string
    payStatus string
    paystatusdate string
    tax number
    taxPercentage string
    transactionId string

    postageData

    object

    carrier string
    partialDeliveryAllowed string
    pickUpLocationId number
    postage number
    postageNet number
    postageTaxPercentage number
    requestDate string
    shippingMethod string
    reference string
    remarks string

    shippingData

    object

    address

    object

    active string
    city string
    code string
    company string
    country string
    email string
    fax string
    firstName string
    gender string
    icp string
    id number
    isDefault string
    lastName string
    middleName string
    mobile string
    name string
    notes string
    number string
    numberExtension string
    phone string
    postalCode string
    region string
    street string
    type string
    url string

    shop

    object

    id number
    name string
    shopId number
    status string

    total

    object

    discountPercentage number
    discountValue number

    tax

    object

    0 number
    21 number
    totalGross number
    totalNet number
    trackTraceCode string
    type string
    userId number
    messages undefined[]
    total number
Loading...