PUT api/Orders

Updates an order

Request Information

URI Parameters

None.

Body Parameters

PutOrderRequest
NameDescriptionTypeAdditional information
OrderId

Order id

integer

None.

Note

string

Max length: 4000

CustomerNumber

integer

None.

DeliveryAddress

DeliveryAddress

None.

TimebookReservationId

Id for timebook reservation.
This field is used if using Compilator timebook API and the order is to be processed in DD2010.

globally unique identifier

None.

CalendarEventId

Id for a calendar event.
This field is used if using the Compilator Calendar API and the order is to be processed in DDWeb.

integer

None.

PaymentTransactionProviderId

If the order is prepaid in an external system the payment providers transaction number can be specified for tracking purposes.

string

Max length: 56

AgreementNo

The agreement used for calculating prices in the order.

integer

None.

RetailPriceListId

The pricelist used for the order.

globally unique identifier

None.

SplitId

Order split id.

globally unique identifier

None.

OrderLines

An order must have at least one order line.

Collection of OrderLineRequest

Required

OrderType

This construct is made in order to introduce order type without breaking the exposed interface

OrderType

None.

SellerBranchId

Branch id of the branch owning the order.

integer

Required

OrderDate

Date when ther order is placed.

date

Required

LicensePlate

License plate number.

string

Max length: 15

Odometer

Odometer.

integer

None.

WorkOrderNumber

string

Max length: 40

SalesPerson

Name of the person responsible for the order.

string

Required

Max length: 50

CurrencyId

Currecy id. A list of suppoerted currencies can be fetched through the API with /api/currencies

integer

Required

CurrencyRate

Actual currency rate used on order.

decimal number

Required

DeliveryDate

Requested delivery date for the order.

date

None.

RequisitionOrderNumber

string

Max length: 40

TotalAmountIncludingVat

Total order amount including discount and VAT.

decimal number

None.

TotalAmountExcludingVat

Total order amount including discount but without VAT.

decimal number

None.

RoundingAmount

Optional rounding amount.

decimal number

None.

CustomerReference

Customers order reference.

string

Max length: 40

ContactId

Customer contact id. Use api/contacts/{id} to get contact details.

globally unique identifier

None.

Remarks

None.

Example

//
//
//

Request Formats

application/json, text/json

Sample:
{
  "OrderId": 1,
  "Note": "sample string 2",
  "CustomerNumber": 1,
  "DeliveryAddress": {
    "Name": "sample string 1",
    "Address1": "sample string 2",
    "Address2": "sample string 3",
    "Address3": "sample string 4",
    "PostalCode": "sample string 5",
    "Town": "sample string 6",
    "Country": "sample string 7",
    "CountryCode": "sample string 8"
  },
  "TimebookReservationId": "76e41420-3505-47d1-97ea-38d1da2df92a",
  "CalendarEventId": 1,
  "PaymentTransactionProviderId": "sample string 3",
  "AgreementNo": 1,
  "RetailPriceListId": "7b2d50a9-13dd-4a21-a018-fb95ca9c1dfc",
  "SplitId": "9a878d03-2f99-457d-aaed-87c3ae53354d",
  "OrderLines": [
    {
      "OrderLineArticle": {
        "SalesAccount": 1,
        "StockNumber": 1,
        "CostPrice": 2.0,
        "IsExportWithinEU": true,
        "OrderType": 0,
        "ArticleNumber": 4,
        "Quantity": 5.0,
        "Description": "sample string 6",
        "Price": 7.0,
        "DiscountFactor": 8.0,
        "Amount": 9.0,
        "VatPercent": 10.0,
        "VatAmount": 11.0,
        "HasVat": true,
        "IsExport": true
      },
      "OrderLineText": {
        "Text": "sample string 1"
      },
      "LineNumber": 1,
      "ParentLineNumber": 1,
      "IsArticlePackageLine": true,
      "HasFixedQuantity": true
    },
    {
      "OrderLineArticle": {
        "SalesAccount": 1,
        "StockNumber": 1,
        "CostPrice": 2.0,
        "IsExportWithinEU": true,
        "OrderType": 0,
        "ArticleNumber": 4,
        "Quantity": 5.0,
        "Description": "sample string 6",
        "Price": 7.0,
        "DiscountFactor": 8.0,
        "Amount": 9.0,
        "VatPercent": 10.0,
        "VatAmount": 11.0,
        "HasVat": true,
        "IsExport": true
      },
      "OrderLineText": {
        "Text": "sample string 1"
      },
      "LineNumber": 1,
      "ParentLineNumber": 1,
      "IsArticlePackageLine": true,
      "HasFixedQuantity": true
    }
  ],
  "OrderType": 1,
  "SellerBranchId": 4,
  "OrderDate": "12/21/2025 1:04:08 PM",
  "LicensePlate": "sample string 6",
  "Odometer": 1,
  "WorkOrderNumber": "sample string 7",
  "SalesPerson": "sample string 8",
  "CurrencyId": 9,
  "CurrencyRate": 10.0,
  "DeliveryDate": "12/21/2025 1:04:08 PM",
  "RequisitionOrderNumber": "sample string 11",
  "TotalAmountIncludingVat": 1.0,
  "TotalAmountExcludingVat": 1.0,
  "RoundingAmount": 1.0,
  "CustomerReference": "sample string 12",
  "ContactId": "e611d81f-23dd-40ba-bbea-4f0b3dc44b93"
}

application/xml, text/xml

Sample:
<PutOrderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Order">
  <ContactId>e611d81f-23dd-40ba-bbea-4f0b3dc44b93</ContactId>
  <CurrencyId>9</CurrencyId>
  <CurrencyRate>10</CurrencyRate>
  <CustomerNumber>1</CustomerNumber>
  <CustomerReference>sample string 12</CustomerReference>
  <DeliveryDate>2025-12-21T13:04:08.607935+00:00</DeliveryDate>
  <LicensePlate>sample string 6</LicensePlate>
  <Odometer>1</Odometer>
  <OrderDate>2025-12-21T13:04:08.607935+00:00</OrderDate>
  <OrderType>NormalOrder</OrderType>
  <RequisitionOrderNumber>sample string 11</RequisitionOrderNumber>
  <RoundingAmount>1</RoundingAmount>
  <SalesPerson>sample string 8</SalesPerson>
  <SellerBranchId>4</SellerBranchId>
  <TotalAmountExcludingVat>1</TotalAmountExcludingVat>
  <TotalAmountIncludingVat>1</TotalAmountIncludingVat>
  <WorkOrderNumber>sample string 7</WorkOrderNumber>
  <AgreementNo>1</AgreementNo>
  <CalendarEventId>1</CalendarEventId>
  <DeliveryAddress>
    <Address1>sample string 2</Address1>
    <Address2>sample string 3</Address2>
    <Address3>sample string 4</Address3>
    <Country>sample string 7</Country>
    <CountryCode>sample string 8</CountryCode>
    <Name>sample string 1</Name>
    <PostalCode>sample string 5</PostalCode>
    <Town>sample string 6</Town>
  </DeliveryAddress>
  <Note>sample string 2</Note>
  <OrderLines>
    <OrderLineRequest>
      <HasFixedQuantity>true</HasFixedQuantity>
      <IsArticlePackageLine>true</IsArticlePackageLine>
      <LineNumber>1</LineNumber>
      <ParentLineNumber>1</ParentLineNumber>
      <OrderLineArticle>
        <Amount>9</Amount>
        <ArticleNumber>4</ArticleNumber>
        <Description>sample string 6</Description>
        <DiscountFactor>8</DiscountFactor>
        <HasVat>true</HasVat>
        <IsExport>true</IsExport>
        <Price>7</Price>
        <Quantity>5</Quantity>
        <VatAmount>11</VatAmount>
        <VatPercent>10</VatPercent>
        <CostPrice>2</CostPrice>
        <IsExportWithinEU>true</IsExportWithinEU>
        <OrderType>UnAffected</OrderType>
        <SalesAccount>1</SalesAccount>
        <StockNumber>1</StockNumber>
      </OrderLineArticle>
      <OrderLineText>
        <Text>sample string 1</Text>
      </OrderLineText>
    </OrderLineRequest>
    <OrderLineRequest>
      <HasFixedQuantity>true</HasFixedQuantity>
      <IsArticlePackageLine>true</IsArticlePackageLine>
      <LineNumber>1</LineNumber>
      <ParentLineNumber>1</ParentLineNumber>
      <OrderLineArticle>
        <Amount>9</Amount>
        <ArticleNumber>4</ArticleNumber>
        <Description>sample string 6</Description>
        <DiscountFactor>8</DiscountFactor>
        <HasVat>true</HasVat>
        <IsExport>true</IsExport>
        <Price>7</Price>
        <Quantity>5</Quantity>
        <VatAmount>11</VatAmount>
        <VatPercent>10</VatPercent>
        <CostPrice>2</CostPrice>
        <IsExportWithinEU>true</IsExportWithinEU>
        <OrderType>UnAffected</OrderType>
        <SalesAccount>1</SalesAccount>
        <StockNumber>1</StockNumber>
      </OrderLineArticle>
      <OrderLineText>
        <Text>sample string 1</Text>
      </OrderLineText>
    </OrderLineRequest>
  </OrderLines>
  <PaymentTransactionProviderId>sample string 3</PaymentTransactionProviderId>
  <RetailPriceListId>7b2d50a9-13dd-4a21-a018-fb95ca9c1dfc</RetailPriceListId>
  <SplitId>9a878d03-2f99-457d-aaed-87c3ae53354d</SplitId>
  <TimebookReservationId>76e41420-3505-47d1-97ea-38d1da2df92a</TimebookReservationId>
  <OrderId>1</OrderId>
</PutOrderRequest>

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 'PutOrderRequest'.

Response Information

Resource Description

PutOrderResponse
NameDescriptionTypeAdditional information
Success

Returns true if order is updated otherwise false

boolean

None.

Errors

Returns list of errors if order couldn't be updated

Collection of PutOrderError

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Errors": [
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    },
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    }
  ]
}

application/xml, text/xml

Sample:
<PutOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Order">
  <Errors>
    <PutOrderError>
      <ErrorCode>OrderNotFound</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PutOrderError>
    <PutOrderError>
      <ErrorCode>OrderNotFound</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PutOrderError>
  </Errors>
  <Success>true</Success>
</PutOrderResponse>