POST api/v1/Orders/{id}/Lines

Create new order line with the specified information. Will return HTTP 404 on missing order and HTTP 400 on invalid order line.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

integer

Required

Body Parameters

CreateOrderLineDto
NameDescriptionTypeAdditional information
ExtProductId

External product id of orderline

string

Max length: 100

ImgUrl

Image url of orderline

string

Max length: 2000

Name

Name of orderline

string

Max length: 250

Description

Description of orderline

string

None.

Quantity

Quantity of orderline

decimal number

Required

Price

Price of orderline

decimal number

Required

ContactId

ContactId for orderline

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ExtProductId": "sample string 1",
  "ImgUrl": "sample string 2",
  "Name": "sample string 3",
  "Description": "sample string 4",
  "Quantity": 5.0,
  "Price": 6.0,
  "ContactId": 1
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ReadOrderLineDto
NameDescriptionTypeAdditional information
Id

Id of orderline

integer

None.

OrderId

Id of order

integer

None.

ExtProductId

External product id of orderline

string

Max length: 100

ImgUrl

Image url of orderline

string

Max length: 2000

Name

Name of orderline

string

Max length: 250

Description

Description of orderline

string

None.

Quantity

Quantity of orderline

decimal number

None.

Price

Price of orderline

decimal number

None.

PriceTotal

Total price of orderline

decimal number

None.

LastModified

Date and time of last modification od order

date

None.

ContactRegistrationSource

Registration source of the orderline's contact

string

Max length: 50

ContactRegistrationDateTime

Registration datetime of the orderline's contact

date

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "OrderId": 2,
  "ExtProductId": "sample string 3",
  "ImgUrl": "sample string 4",
  "Name": "sample string 5",
  "Description": "sample string 6",
  "Quantity": 7.0,
  "Price": 8.0,
  "PriceTotal": 9.0,
  "LastModified": "2024-07-19T06:21:08.6216452+00:00",
  "ContactRegistrationSource": "sample string 11",
  "ContactRegistrationDateTime": "2024-07-19T06:21:08.6216452+00:00"
}