POST v1/CustomerContracts/{id}/Orders?from={from}&till={till}

Generate an order for the given customer contract. If both from and till parameters are null, then it generates an order for the next scheduled period if any. Both from and till parameters must have values or both must be null. If only one is null it will throw an exception.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The customer contract id.

integer

Required.

from

The from date of the period.

date

Is Optional.

Default value is (null).

till

The till date of the period.

date

Is Optional.

Default value is (null).

Body Parameters

None.

Response Information

Resource Description

The generated order or null if not generated.

OrderBase
NameDescriptionTypeAdditional information
Id

Gets or sets the identifier.

integer

Must be 0 (for insert operations)

OrderCode

Gets or sets the order code.

string

Required

Max length: 50

Type

Gets the OrderTypeEnumValue.

OrderTypeEnum

None.

OrderTypeId

Gets the OrderTypeId.

integer

Required

Date

Gets or sets the date.

date

Required

OrderTotalIncVat

Gets or sets the order total with the 'VAT'.

decimal number

None.

OrderTotalExVat

Gets or sets the order total without the 'VAT'.

decimal number

Required

CurrencyId

Gets or sets the currency identifier.

integer

Required

CurrencyCode

Gets or sets the currency code.

string

None.

Deleted

Gets or sets a value indicating whether this <see cref="T:ShopCtrl.API.Models.OrderBase" /> is deleted.

boolean

Required

ChangeTimestamp

Gets or sets the change timestamp.

date

None.

MainStatusId

Gets or sets the main status identifier.

integer

None.

AffiliateId

Gets or sets the Affiliate identifier.

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "OrderCode": "sample string 2",
  "Type": 0,
  "OrderTypeId": 3,
  "Date": "2026-01-11T16:16:24.5248029+01:00",
  "OrderTotalIncVat": 5.0,
  "OrderTotalExVat": 6.0,
  "CurrencyId": 7,
  "CurrencyCode": "sample string 8",
  "Deleted": true,
  "ChangeTimestamp": "2026-01-11T16:16:24.5248029+01:00",
  "MainStatusId": 1,
  "AffiliateId": 1
}

application/xml, text/xml

Sample:
<OrderBase xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>1</Id>
  <OrderCode>sample string 2</OrderCode>
  <OrderTypeId>3</OrderTypeId>
  <Date>2026-01-11T16:16:24.5248029+01:00</Date>
  <OrderTotalIncVat>5</OrderTotalIncVat>
  <OrderTotalExVat>6</OrderTotalExVat>
  <CurrencyId>7</CurrencyId>
  <CurrencyCode>sample string 8</CurrencyCode>
  <Deleted>true</Deleted>
  <ChangeTimestamp>2026-01-11T16:16:24.5248029+01:00</ChangeTimestamp>
  <MainStatusId>1</MainStatusId>
  <AffiliateId>1</AffiliateId>
</OrderBase>