POST api/Orders/Create

Customer (wholesale and retail) orders. Method returns DocumentID of successfully created order in ERP.

Request Information

URI Parameters

None.

Body Parameters

OrderCreateRequest
NameDescriptionTypeAdditional information
Date

Order date

string

Format date to yyyy.MM.dd

OrderDescription

Order description (i.e. WEB VP 2021-1234)

string

Required

String length: inclusive between 0 and 100

PaymentMeans

Paymeant means (Transfer, Card)

OrderPaymentMeans

Required

CustomerName

Customer name

string

Required

String length: inclusive between 0 and 50

CustomerAddress

Customer address

string

Required

String length: inclusive between 0 and 50

CustomerTown

Customer town

string

Required

String length: inclusive between 0 and 30

CustomerVAT

Customer VAT id (OIB)

string

None.

Additional

Additional information

string

String length: inclusive between 0 and 100

Items

List of order items

Collection of OrderItem

Required

Request Formats

application/json, text/json

Sample:
{
  "Date": "2021.07.21",
  "OrderDescription": "WEB VP 2021-1234",
  "PaymentMeans": "Card",
  "CustomerName": "TETRADA d.o.o.",
  "CustomerAddress": "Put Petrića 34C",
  "CustomerTown": "Zadar",
  "CustomerVAT": "71984571494",
  "Additional": "napomena",
  "Items": [
    {
      "ProductCode": "000669R8170023004",
      "Quantity": 2.0,
      "Price": 105.0,
      "Discount": 0.0,
      "VATRate": 25
    },
    {
      "ProductCode": "000669R8501000535",
      "Quantity": 1.0,
      "Price": 505.0,
      "Discount": 0.0,
      "VATRate": 25
    }
  ]
}

application/xml, text/xml

Sample:
<OrderCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/api.namjestaj_intermod.hr.Models">
  <Additional>napomena</Additional>
  <CustomerAddress>Put Petrića 34C</CustomerAddress>
  <CustomerName>TETRADA d.o.o.</CustomerName>
  <CustomerTown>Zadar</CustomerTown>
  <CustomerVAT>71984571494</CustomerVAT>
  <Date>2021.07.21</Date>
  <Items>
    <OrderItem>
      <Discount>0</Discount>
      <Price>105</Price>
      <ProductCode>000669R8170023004</ProductCode>
      <Quantity>2</Quantity>
      <VATRate>25</VATRate>
    </OrderItem>
    <OrderItem>
      <Discount>0</Discount>
      <Price>505</Price>
      <ProductCode>000669R8501000535</ProductCode>
      <Quantity>1</Quantity>
      <VATRate>25</VATRate>
    </OrderItem>
  </Items>
  <OrderDescription>WEB VP 2021-1234</OrderDescription>
  <PaymentMeans>Card</PaymentMeans>
</OrderCreateRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

OrderCreateResponse
NameDescriptionTypeAdditional information
DocumentID

Document ID in ERP

integer

Required

DocumentCode

Document code in ERP

string

Required

Response Formats

application/json, text/json

Sample:
{
  "DocumentID": 4102902,
  "DocumentCode": null
}

application/xml, text/xml

Sample:
<OrderCreateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/api.namjestaj_intermod.hr.Models">
  <DocumentCode i:nil="true" />
  <DocumentID>4102902</DocumentID>
</OrderCreateResponse>