POST api/order-ıtems/CreateOrderItems

Request Information

URI Parameters

None.

Body Parameters

OrderItemsDTO
NameDescriptionTypeAdditional information
id

integer

None.

orderid

integer

None.

productid

integer

None.

productname

string

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,
  "productname": "sample string 4",
  "quantity": 1,
  "unitprice": 1.0,
  "discount": 1.0,
  "totalprice": 1.0,
  "createdat": "2025-12-20T08:45:11.0562247+03:00",
  "updatedat": "2025-12-20T08:45:11.0562247+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_api.Models.DTOs">
  <CreatedAt>2025-12-20T08:45:11.0562247+03:00</CreatedAt>
  <Discount>1</Discount>
  <ID>1</ID>
  <OrderID>2</OrderID>
  <ProductID>3</ProductID>
  <ProductName>sample string 4</ProductName>
  <Quantity>1</Quantity>
  <TotalPrice>1</TotalPrice>
  <UnitPrice>1</UnitPrice>
  <UpdatedAt>2025-12-20T08:45:11.0562247+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,
    "productname": "sample string 4",
    "quantity": 1,
    "unitprice": 1.0,
    "discount": 1.0,
    "totalprice": 1.0,
    "createdat": "2025-12-20T08:45:11.0582212+03:00",
    "updatedat": "2025-12-20T08:45:11.0582212+03:00"
  },
  "Success": true,
  "StatusCode": 2,
  "Message": "sample string 3",
  "ErrorMessage": "sample string 4",
  "Metadata": {}
}

application/xml, text/xml

Sample:
<ResponseModelOfOrderItemsDTOb1afPy6h xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/cbox_api.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_api.Models.DTOs">
    <d2p1:CreatedAt>2025-12-20T08:45:11.0582212+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:ProductName>sample string 4</d2p1:ProductName>
    <d2p1:Quantity>1</d2p1:Quantity>
    <d2p1:TotalPrice>1</d2p1:TotalPrice>
    <d2p1:UnitPrice>1</d2p1:UnitPrice>
    <d2p1:UpdatedAt>2025-12-20T08:45:11.0582212+03:00</d2p1:UpdatedAt>
  </Data>
</ResponseModelOfOrderItemsDTOb1afPy6h>