POST api/supplierorder/Create

Created a supplier order (purchase order)

Request Information

URI Parameters

None.

Body Parameters

This is the supplier order.

SupplierOrder
NameDescriptionTypeAdditional information
Id

Unique id for a given supplier order.

integer

None.

Type

What type of order is this

SupplierOrderType

Required

Status

Indicates the status of the order.

SupplierOrderStatus

Required

BranchId

Id of associated branch

integer

Required

OrderDate

Date when ther order is placed.

date

Required

SupplierId

Id of the supplier.

globally unique identifier

Required

Preseason

boolean

Required

IncludingRecyclefee

Indicating if the order are including recyclefee

boolean

Required

LastUpdated

Last date the order was updated.

date

Required

LastUpdatedByUsername

The last user who updated the order.

string

Required

Max length: 128

Note

A simple text information about the order.

string

Max length: 255

Lines

A list of the articles in the supplier order (purchase order).

Collection of SupplierOrderLine

None.

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Type": 0,
  "Status": 0,
  "BranchId": 1,
  "OrderDate": "12/21/2025 1:06:15 PM",
  "SupplierId": "872288c4-6952-4809-9294-0504bd5a1928",
  "Preseason": true,
  "IncludingRecyclefee": true,
  "LastUpdated": "12/21/2025 1:06:15 PM",
  "LastUpdatedByUsername": "sample string 7",
  "Note": "sample string 8",
  "Lines": [
    {
      "LineNumber": 1,
      "Status": 0,
      "StockId": "4d16acc7-a28a-4083-b1a0-29921e2baf05",
      "ArticleId": "ed37f974-0efa-476e-ad55-4a592261e076",
      "UnitId": 1,
      "OriginalQuantity": 1.0,
      "Quantity": 4.0,
      "Price": 5.0,
      "DiscountPercentage": 6.0,
      "Recyclefee": 1.0,
      "Note": "sample string 7",
      "RequestedDeliveryDate": "12/21/2025 1:06:15 PM",
      "DeliveryDetails": [
        {
          "Id": "ee801069-faac-45b6-b4d5-3c3b69606945",
          "DeliveryDate": "12/21/2025 1:06:15 PM",
          "DeliveredQuantity": 3.0,
          "ConfirmedQuantity": 4.0,
          "Note": "sample string 5",
          "Created": "12/21/2025 1:06:15 PM",
          "CreatedByUsername": "sample string 7"
        },
        {
          "Id": "ee801069-faac-45b6-b4d5-3c3b69606945",
          "DeliveryDate": "12/21/2025 1:06:15 PM",
          "DeliveredQuantity": 3.0,
          "ConfirmedQuantity": 4.0,
          "Note": "sample string 5",
          "Created": "12/21/2025 1:06:15 PM",
          "CreatedByUsername": "sample string 7"
        }
      ]
    },
    {
      "LineNumber": 1,
      "Status": 0,
      "StockId": "4d16acc7-a28a-4083-b1a0-29921e2baf05",
      "ArticleId": "ed37f974-0efa-476e-ad55-4a592261e076",
      "UnitId": 1,
      "OriginalQuantity": 1.0,
      "Quantity": 4.0,
      "Price": 5.0,
      "DiscountPercentage": 6.0,
      "Recyclefee": 1.0,
      "Note": "sample string 7",
      "RequestedDeliveryDate": "12/21/2025 1:06:15 PM",
      "DeliveryDetails": [
        {
          "Id": "ee801069-faac-45b6-b4d5-3c3b69606945",
          "DeliveryDate": "12/21/2025 1:06:15 PM",
          "DeliveredQuantity": 3.0,
          "ConfirmedQuantity": 4.0,
          "Note": "sample string 5",
          "Created": "12/21/2025 1:06:15 PM",
          "CreatedByUsername": "sample string 7"
        },
        {
          "Id": "ee801069-faac-45b6-b4d5-3c3b69606945",
          "DeliveryDate": "12/21/2025 1:06:15 PM",
          "DeliveredQuantity": 3.0,
          "ConfirmedQuantity": 4.0,
          "Note": "sample string 5",
          "Created": "12/21/2025 1:06:15 PM",
          "CreatedByUsername": "sample string 7"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<SupplierOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Supplier">
  <BranchId>1</BranchId>
  <Id>1</Id>
  <IncludingRecyclefee>true</IncludingRecyclefee>
  <LastUpdated>2025-12-21T13:06:15.4180273+00:00</LastUpdated>
  <LastUpdatedByUsername>sample string 7</LastUpdatedByUsername>
  <Note>sample string 8</Note>
  <OrderDate>2025-12-21T13:06:15.402403+00:00</OrderDate>
  <Preseason>true</Preseason>
  <Status>Open</Status>
  <SupplierId>872288c4-6952-4809-9294-0504bd5a1928</SupplierId>
  <Type>Normal</Type>
</SupplierOrder>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'SupplierOrder'.

Response Information

Resource Description

SupplierOrderResponse
NameDescriptionTypeAdditional information
Id

Id of the supplier order (purchase order).

integer

None.

BranchId

Branch id of the supplier order (purchase order).

integer

None.

WmsId

Id for WMS on the supplier order (purchase order).

integer

None.

Success

Indicates if the request was successfull.

boolean

None.

Messages

Is Success is false, then there are error codes and messages in this list
indicating what went wrong.

Collection of SupplierOrderMessage

None.

Response Formats

application/json, text/json

Sample:

Sample not available.