POST api/orders

Places an order for a new customer

Request Information

URI Parameters

None.

Body Parameters

Order and customer details

NewCustomerOrderDTO
NameDescriptionTypeAdditional information
Customer

Customer details

NewCustomerDTO

Required

Invoice

Whether the order will be paid by invoice

boolean

None.

Code

Discount code, if any

string

None.

Items

Items in the order

Collection of OrderItemDTO

Required

Request Formats

application/json, text/json

Sample:
{
  "Customer": {
    "Firstname": "sample string 1",
    "Lastname": "sample string 2",
    "Phone": "sample string 3",
    "Email": "sample string 4",
    "Password": "sample string 5",
    "OrgNr": "sample string 6",
    "VAT": "sample string 7",
    "Name": "sample string 8",
    "Address1": "sample string 9",
    "Address2": "sample string 10",
    "ZIP": "sample string 11",
    "City": "sample string 12",
    "CountryID": 13,
    "InvoiceReference": "sample string 14",
    "InvoiceEmail": "sample string 15",
    "International": true
  },
  "Invoice": true,
  "Code": "sample string 2",
  "Items": [
    {
      "ProductID": 1,
      "Amount": 1.0,
      "Level": 1,
      "Auto": true
    },
    {
      "ProductID": 1,
      "Amount": 1.0,
      "Level": 1,
      "Auto": true
    }
  ]
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Order details

OrderDTO
NameDescriptionTypeAdditional information
ID

Order ID

integer

None.

CustomerID

ID of ordering customer

integer

None.

AccountID

ID of receiving account

string

None.

UserID

ID of responsible Webb-SMS User

integer

None.

TransactionID

ID of order transaction

string

None.

UserReference

ID of responsible iP.1 User

globally unique identifier

None.

Processed

Whether the order has been processed

boolean

None.

CreatedDate

When the order was placed

date

None.

ModifiedDate

When order details were last updated

date

None.

Code

Discount code, if any

string

None.

Items

Items in the order

Collection of OrderItemDTO

None.

Response Formats

application/json, text/json

Sample:
{
  "ID": 1,
  "CustomerID": 2,
  "AccountID": "sample string 3",
  "UserID": 4,
  "TransactionID": "sample string 5",
  "UserReference": "17442a21-5e16-4e2a-b2bf-dc04b4537d7c",
  "Processed": true,
  "CreatedDate": "2024-03-22T08:27:14.8111652+00:00",
  "ModifiedDate": "2024-03-22T08:27:14.8111652+00:00",
  "Code": "sample string 8",
  "Items": [
    {
      "ProductID": 1,
      "Amount": 1.0,
      "Level": 1,
      "Auto": true
    },
    {
      "ProductID": 1,
      "Amount": 1.0,
      "Level": 1,
      "Auto": true
    }
  ]
}