POST api/order-items/CreateOrderItems

Request Information

URI Parameters

None.

Body Parameters

OrderItemsDTO
NameDescriptionTypeAdditional information
id

integer

None.

orderid

integer

None.

productid

integer

None.

quantity

integer

None.

unitprice

decimal number

None.

discount

decimal number

None.

totalprice

decimal number

None.

createdat

date

None.

updatedat

date

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "orderid": 2,
  "productid": 3,
  "quantity": 1,
  "unitprice": 1.0,
  "discount": 1.0,
  "totalprice": 1.0,
  "createdat": "2025-12-17T10:14:15.300945+03:00",
  "updatedat": "2025-12-17T10:14:15.300945+03:00"
}

application/xml, text/xml

Sample:
<OrderItemsDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/cbox.Models.DTOs">
  <CreatedAt>2025-12-17T10:14:15.300945+03:00</CreatedAt>
  <Discount>1</Discount>
  <ID>1</ID>
  <OrderID>2</OrderID>
  <ProductID>3</ProductID>
  <Quantity>1</Quantity>
  <TotalPrice>1</TotalPrice>
  <UnitPrice>1</UnitPrice>
  <UpdatedAt>2025-12-17T10:14:15.300945+03:00</UpdatedAt>
</OrderItemsDTO>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResponseModelOfOrderItemsDTO
NameDescriptionTypeAdditional information
data

OrderItemsDTO

None.

success

boolean

None.

statusCode

integer

None.

message

string

None.

errorMessage

string

None.

metadata

Object

None.

Response Formats

application/json, text/json

Sample:
{
  "data": {
    "id": 1,
    "orderid": 2,
    "productid": 3,
    "quantity": 1,
    "unitprice": 1.0,
    "discount": 1.0,
    "totalprice": 1.0,
    "createdat": "2025-12-17T10:14:15.3019444+03:00",
    "updatedat": "2025-12-17T10:14:15.3019444+03:00"
  },
  "success": true,
  "statusCode": 2,
  "message": "sample string 3",
  "errorMessage": "sample string 4",
  "metadata": {}
}

application/xml, text/xml

Sample:
<ResponseModelOfOrderItemsDTOqOm1f5oC xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/cbox.Models.Response">
  <ErrorMessage>sample string 4</ErrorMessage>
  <Message>sample string 3</Message>
  <Metadata />
  <StatusCode>2</StatusCode>
  <Success>true</Success>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/cbox.Models.DTOs">
    <d2p1:CreatedAt>2025-12-17T10:14:15.3019444+03:00</d2p1:CreatedAt>
    <d2p1:Discount>1</d2p1:Discount>
    <d2p1:ID>1</d2p1:ID>
    <d2p1:OrderID>2</d2p1:OrderID>
    <d2p1:ProductID>3</d2p1:ProductID>
    <d2p1:Quantity>1</d2p1:Quantity>
    <d2p1:TotalPrice>1</d2p1:TotalPrice>
    <d2p1:UnitPrice>1</d2p1:UnitPrice>
    <d2p1:UpdatedAt>2025-12-17T10:14:15.3019444+03:00</d2p1:UpdatedAt>
  </Data>
</ResponseModelOfOrderItemsDTOqOm1f5oC>