LogicTrade API
  1. Sales order
LogicTrade API
  • Authentication
  • Pagination
  • Rate limits
  • Error codes
  • Changelog
  • Configuration Service
  • Endpoints
    • Authentication
      • Introspection
    • Customer
      • List all customers
      • Retrieve a customer by id
      • Create a customer
      • Update a customer
      • Remove the customer
    • Supplier
      • List all suppliers
      • Retrieve a supplier by id
      • Create a supplier
      • Update a supplier
      • Remove the supplier
    • Product
      • Product
        • List all products
        • Retrieve a product by id
        • Create a product
        • Remove the products
        • Update a product
        • Search products
      • Groups
        • List all product groups
      • Discount
        • List all discounts for products
        • Get all discounts for product by id
        • List all discounts for customers
        • Get all discounts for a customer by id
      • Stock
        • Get stock for products
        • Search stock for products
      • Prices
        • Get product prices
      • Descriptions
        • Get the descriptions for a product
      • References
        • Get the product references
      • Compositions
        • Get product compositions
    • Quote
      • List all quotes
      • Retrieve a quote by id
      • Create a quote
      • Update a quote
    • Sales order
      • List all orders
        GET
      • Retrieve an orders by id
        GET
      • Create an order
        POST
      • Update an order
        PUT
    • Invoice
      • List all invoices
      • Retrieve a invoice by id
      • Create a invoice
      • Update a invoice
    • Delivery
      • Get list of orders that can be delivered
      • Update the order with delivery information
    • Purchase order
      • List all purchase orders
      • Retrieve a purchase orders by id
      • Create a purchase order
      • Update a purchase order
  1. Sales order

Create an order

POST
/rest/v1/orders
Create a new order in LogicTrade.

Request

Authorization
Add parameter in header
api-key
Example:
api-key: ********************
Query Params
allowUnknownCustomer
boolean 
optional
Setting "allowUnknownCustomer" to true eliminates the need to associate a customer. In this case, the order will be linked to the "unknown customer". A delivery address is also no longer required in this scenario.
Example:
false
Body Params application/json
reference
string 
optional
The customer reference of the order.
date
string <date>
The date of the order
optional
The date when the order was created.
salesManUserName
string 
required
Use the seller's username to identify the seller of the order.
status
string 
optional
The status of the order.
origin
object 
optional
The origin of the order.
code
string 
optional
customer
object 
required
The customer for whom the order is made.
id
integer 
optional
The unique identifier of the customer.
isUnknown
boolean 
optional
Setting "IsUnknown" to true eliminates the need to associate a customer. In this case, the order will be linked to the "unknown customer". A delivery address is also no longer required in this scenario.
gender
string 
optional
The customer's gender male/female/unknown
title
string 
optional
The title of the relation.
initials
string 
optional
The customer's initials.
firstName
string 
optional
The customer's first name.
infix
string 
optional
The infix of the relation. A new one will be created if the infix does not exist.
lastName
string 
optional
The customer's last name.
companyName
string 
optional
Only filled if it is a business customer and contains the customer's company name.
phoneNumber
string 
optional
The first phone number of the customer.
mobileNumber
string 
optional
The mobile phone number of the customer.
email
string 
optional
The e-mail adress of the customer
remark
string 
optional
Any customer comments.
address
object 
optional
The address of the customer.
delivery
object 
required
Delivery information relevant to the order.
type
string 
required
The code of the delivery method.
condition
string 
required
The delivery condition of the order.
expectedDate
string <date>
optional
The expected delivery date of the order.
address
object 
optional
The delivery address of the order.
webshop
object 
optional
Webshop information from the order.
number
string 
optional
The webshop order number.
url
string 
optional
The url to the backend of the webshop.
externNumber
string 
optional
The unique number of the order in your system.
paymentCondition
string 
optional
The code of the payment condition.
payments
array[object (Payment) {3}] 
optional
The payments for the order.
amount
number <double>
optional
The amount which the customer paid.
type
string 
optional
The payment type which is used to do the payment.
method
string 
optional
The payment method in addition to the payment type.
comment
object 
optional
Comments related to the order.
intern
string 
optional
The comments intended for internal use only.
extern
string 
optional
The comments intended for the customer.
lines
array [object {9}] 
required
The order lines.
lineNumber
integer 
optional
The line number of the order (this also determines the order of the order lines).
code
string 
required
The product code for this order line.
description
string 
optional
The description of the order line.
quantity
number <double>
optional
The quantity orderd by the customer.
partPrice
number <double>
optional
The unit price of the product including discount
basePartPrice
number <double>
optional
The unit price of the product excluding discount. Defaults to the value of partPrice
discount
number <double>
optional
The percentage discount. If supplied, partPrice will be recalculated based on basePartPrice and discount
comment
object 
optional
Comments related to the order line.
configuration
object 
optional
The configuration of the product chosen for the order line.
Example
{
    "reference": "Nieuwe barkrukken voor de keuken",
    "date": "2024-04-08T03:13:55.720Z",
    "salesManUserName": "logictrade",
    "status": "definitief",
    "origin": {
        "code": "WIN"
    },
    "customer": {
        "gender": "Man",
        "title": "Dhr.",
        "initials": "J.",
        "firstName": "Jan",
        "lastName": "Jansen3343",
        "mobileNumber": "06-12345678",
        "email": "jan@jansen.com",
        "remark": "Niet beschikbaar op maandag en dinsdag!",
        "address": {
            "street": "Wethouder Buitenhuisstraat",
            "houseNumber": "2B",
            "zipCode": "7951 SM",
            "city": "Staphorst",
            "country": "NL"
        }
    },
    "delivery": {
        "type": "BM", // BM is the code of "Bezorgen + Montage"
        "condition": "D",
        "expectedDate": "2024-04-08T04:08:30.542Z",
        "address": {
            "street": "Wethouder Buitenhuisstraat",
            "houseNumber": "2B",
            "zipCode": "7951 SM",
            "city": "Staphorst",
            "country": "NL"
        }
    },
    "webshop": {
        "number": "BS00001",
        "url": "https://backend.webshop.eu"
    },
    "externNumber": "BS00001",
    "paymentCondition": "PC",
    "payments": [
        {
            "amount": 100,
            "type": "iDeal",
            "method": "Rabobank"
        }
    ],
    "comment": {
        "intern": "Korting ivm voorjaar's actie",
        "extern": "Graag vooraf even bellen"
    },
    "lines": [
        {
            "lineNumber": 10,
            "code": "LT00000047",
            "description": "Barkruk 't Westert",
            "quantity": 6,
            "partPrice": 175.9,
            "discount": 0.1,
            "comment": {
                "intern": "Bij vervoeren de pootjes verwijderdern.",
                "extern": "Bij afleveren de pootjes weer bevestigigen."
            }
        }
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.logictrade.cloud/rest/v1/orders?allowUnknownCustomer=false' \
--header 'Content-Type: application/json' \
--header 'api-key;' \
--data-raw '{
    "reference": "Nieuwe barkrukken voor de keuken",
    "date": "2024-04-08T03:13:55.720Z",
    "salesManUserName": "logictrade",
    "status": "definitief",
    "origin": {
        "code": "WIN"
    },
    "customer": {
        "gender": "Man",
        "title": "Dhr.",
        "initials": "J.",
        "firstName": "Jan",
        "lastName": "Jansen3343",
        "mobileNumber": "06-12345678",
        "email": "jan@jansen.com",
        "remark": "Niet beschikbaar op maandag en dinsdag!",
        "address": {
            "street": "Wethouder Buitenhuisstraat",
            "houseNumber": "2B",
            "zipCode": "7951 SM",
            "city": "Staphorst",
            "country": "NL"
        }
    },
    "delivery": {
        "type": "BM", // BM is the code of "Bezorgen + Montage"
        "condition": "D",
        "expectedDate": "2024-04-08T04:08:30.542Z",
        "address": {
            "street": "Wethouder Buitenhuisstraat",
            "houseNumber": "2B",
            "zipCode": "7951 SM",
            "city": "Staphorst",
            "country": "NL"
        }
    },
    "webshop": {
        "number": "BS00001",
        "url": "https://backend.webshop.eu"
    },
    "externNumber": "BS00001",
    "paymentCondition": "PC",
    "payments": [
        {
            "amount": 100,
            "type": "iDeal",
            "method": "Rabobank"
        }
    ],
    "comment": {
        "intern": "Korting ivm voorjaar'\''s actie",
        "extern": "Graag vooraf even bellen"
    },
    "lines": [
        {
            "lineNumber": 10,
            "code": "LT00000047",
            "description": "Barkruk '\''t Westert",
            "quantity": 6,
            "partPrice": 175.9,
            "discount": 0.1,
            "comment": {
                "intern": "Bij vervoeren de pootjes verwijderdern.",
                "extern": "Bij afleveren de pootjes weer bevestigigen."
            }
        }
    ]
}'

Responses

🟢200Success
application/json
Body
id
integer 
read-onlyrequired
The unique identifier of the order.
number
string 
optional
The unique number with which the order can be found.
reference
string 
optional
The customer reference of the order.
salesMan
string 
read-onlyoptional
The salesperson who handled the order.
salesManUserName
string 
optional
The username of the salesperson who handled the order.
date
string <date>
The date of the order
optional
The date when the order was created.
status
string 
read-onlyoptional
The status of the order.
externNumber
string 
optional
The unique number of the order in your system.
totalAmount
number <double>
read-onlyoptional
The total amount of the order (calculated field).
stockStatus
string 
optional
This indicates the stock status of the order line. The possible values are: none, partial, and complete.
deliveryStatus
string 
optional
This indicates the delivery status of the order line. The possible values are: none, partial, and complete.
invoiceStatus
string 
optional
This indicates the invoice status of the order line. The possible values are: none, partial, and complete.
customer
object (Customer) 
required
The customer for whom the order is made.
id
integer 
read-onlyrequired
The unique identifier of the customer.
number
string 
read-onlyoptional
A unique number with which the customer can be found.
gender
string 
optional
The customer's gender male/female/unknown
title
string 
optional
The title of the relation.
initials
string 
optional
The customer's initials.
firstName
string 
optional
The customer's first name.
infix
string 
optional
The infix of the relation. A new one will be created if the infix does not exist.
lastName
string 
optional
The customer's last name.
companyName
string 
optional
Only filled if it is a business customer and contains the customer's company name.
cocNumber
string 
optional
Chain of Custody Number (KvK number).
vatNumber
string 
optional
The VAT number (BTW nummer) of the customer.
phoneNumber
string 
optional
The first phone number of the customer.
phoneNumber2
string 
optional
The second phone number of the customer.
mobileNumber
string 
optional
The mobile phone number of the customer.
email
string 
optional
The e-mail adress of the customer
remark
string 
optional
Any customer comments.
address
object 
optional
The address of the customer.
invoiceAddress
object 
optional
The invoice address of the customer.
deliveryAddress
object 
optional
The delivery address of the customer.
newsLetter
boolean 
optional
This indicates whether the customer wants to receive a newsletter.
externNumbers
object 
optional
In this section, the external numbers are displayed. These numbers can be used by external applications.
birthdate
string <date>
optional
The customer’s birthdate.
modifiedDate
string <date-time>
optional
The date on which the entity was last modified.
createdDate
string <date-time>
optional
The date on which the entity was created.
delivery
object 
required
Delivery information relevant to the order.
type
string 
required
The delivery method.
condition
string 
required
The delivery condition of the order.
expectedDate
string <date>
optional
The expected delivery date of the order.
confirmedDate
string <date>
optional
The confirmed deliver date of the order.
address
object 
required
The delivery address of the order.
phoneNumber
string 
optional
The phone number that should be used for delivery.
origin
object 
optional
The origin of the order.
id
integer 
optional
The unique identifier of the origin
code
string 
optional
description
string 
optional
webshop
object 
optional
Webshop information from the order.
number
string 
optional
The webshop order number.
url
string 
optional
The url to the backend of the webshop.
quote
object 
optional
If the order is created from a quotation, the details of the quotation will be listed here.
id
integer 
optional
The id of the qoute.
number
string 
optional
The number of the quote.
payments
array [object {3}] 
optional
The payments for the order.
amount
number <double>
optional
The amount which the customer paid.
type
string 
optional
The payment type which is used to do the payment.
method
string 
optional
The payment method in addition to the payment type.
comment
object 
optional
Comments related to the order.
intern
string 
optional
The comments intended for internal use only.
extern
string 
optional
The comments intended for the customer.
lines
array [object {14}] 
required
The order lines.
id
integer 
read-onlyrequired
The unique identifier of the order line.
lineNumber
integer 
optional
The line number of the order (this also determines the order of the order lines).
code
string 
optional
The product code for this order line.
stockStatus
string 
optional
This indicates the stock status of the order line. The possible values are: none, partial, and complete.
deliveryStatus
string 
optional
This indicates the delivery status of the order line. The possible values are: none, partial, and complete.
invoiceStatus
string 
optional
This indicates the invoice status of the order line. The possible values are: none, partial, and complete.
description
string 
optional
The description of the order line.
quantity
number <double>
optional
The quantity ordered by the customer.
partPrice
number <double>
optional
The unit price of the product.
discount
number <double>
optional
The percentage discount.
linePrice
number <double>
read-onlyoptional
The linePrice of the order
comment
object 
optional
Comments related to the order line.
configuration
object (Configuration) 
optional
The configuration of the product chosen for the order line.
vat
object 
required
The VAT details applicable to the line item.
modifiedDate
string <date-time>
optional
The date on which the entity was last modified.
createdDate
string <date-time>
optional
The date on which the entity was created.
paymentCondition
object (PaymentCondition) 
optional
id
integer 
optional
The unique identifier of the payment condition.
code
string 
optional
The unique code of the payment condition. This can be used for creating invoices.
description
string 
optional
The payment condition description.
Example
{
    "id": 4,
    "number": "V24000001",
    "reference": "",
    "salesMan": "LogicTrade",
    "salesManUserName": "logictrade",
    "date": "2024-03-24T13:43:57.083",
    "status": "Definitief",
    "externNumber": "",
    "totalAmount": 0,
    "customer": {
        "id": 13,
        "number": "R000000008",
        "gender": "Man",
        "title": "Dhr.",
        "initials": "J.",
        "firstName": "Jan",
        "infix": "",
        "lastName": "Jansen",
        "companyName": "",
        "phoneNumber": "",
        "mobileNumber": "06-12345678",
        "email": "jan@jansen.com",
        "remark": "",
        "address": {
            "street": "Weth. Buitenhuisstraat",
            "houseNumber": "2b",
            "zipCode": "7951 SM",
            "city": "Staphorst",
            "country": "NL"
        }
    },
    "delivery": {
        "type": "Bezorgen+montage",
        "expectedDate": null,
        "address": {
            "street": "Weth. Buitenhuisstraat",
            "houseNumber": "2b",
            "zipCode": "7951 SM",
            "city": "Staphorst",
            "country": "NL"
        }
    },
    "origin": {
        "code": "WIN",
        "description": "Winkel"
    },
    "webshop": {
        "number": "",
        "url": ""
    },
    "payments": [],
    "comment": {
        "intern": "",
        "extern": ""
    },
    "lines": [
        {
            "id": 3,
            "lineNumber": 10,
            "code": "LT00000043",
            "description": "Barstoelen",
            "quantity": 3,
            "partPrice": 123,
            "discount": 0,
            "linePrice": 369,
            "vat": 21,
            "comment": {
                "intern": "",
                "extern": ""
            }
        }
    ]
}
🟠403Forbidden
🟠400Bad Request
Modified at 2025-06-16 14:50:57
Previous
Retrieve an orders by id
Next
Update an order