⇐ Home

GET orders/CreateOrderByCart/{comment}/{onlyFromService}

Создание заказа по позициям в корзине помеченным "в заказ"

Request Information

URI Parameters

Name
Description
Type
Additional information
comment Комментарий к заказу, не затрагивает комментарий к позициям string Required
onlyFromService Только позиций добавленные в корзину через веб сервис и "в заказ" , если не установлен все помеченные "в заказ" boolean Default value is False

Body Parameters

None.

Response Information

Resource Description

Результат выполнения ResultCreateOrder
Name
Description
Type
Additional information
OrderId Идентификатор заказ, если null, заказ не создан integer None.
Message Сообщение о результате string None.
ItemCarts При рассогласованной корзины с текущими прайсами, заказ не будет создан, коллекция выдаст результаты рассогласования, при удачной проверке коллекция пуста Collection of ResItem None.

Response Formats

application/json, text/json
Sample:
{
  "OrderId": 1,
  "Message": "sample string 1",
  "ItemCarts": [
    {
      "Codes": [
        0,
        0
      ],
      "Id": 1,
      "IdItemArt": 1,
      "Qty": 2,
      "Comment": "sample string 3",
      "Price": 1.0,
      "Days": 1
    },
    {
      "Codes": [
        0,
        0
      ],
      "Id": 1,
      "IdItemArt": 1,
      "Qty": 2,
      "Comment": "sample string 3",
      "Price": 1.0,
      "Days": 1
    }
  ]
}
application/xml, text/xml
Sample:
<ResultCreateOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Wiki.PublicApi.Core.Orders">
  <ItemCarts xmlns:d2p1="http://schemas.datacontract.org/2004/07/Wiki.PublicApi.Core.Cart">
    <d2p1:ResItem>
      <d2p1:Comment>sample string 3</d2p1:Comment>
      <d2p1:Days>1</d2p1:Days>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:IdItemArt>1</d2p1:IdItemArt>
      <d2p1:Price>1</d2p1:Price>
      <d2p1:Qty>2</d2p1:Qty>
      <d2p1:Codes>
        <d2p1:ResponseCode>Early</d2p1:ResponseCode>
        <d2p1:ResponseCode>Early</d2p1:ResponseCode>
      </d2p1:Codes>
    </d2p1:ResItem>
    <d2p1:ResItem>
      <d2p1:Comment>sample string 3</d2p1:Comment>
      <d2p1:Days>1</d2p1:Days>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:IdItemArt>1</d2p1:IdItemArt>
      <d2p1:Price>1</d2p1:Price>
      <d2p1:Qty>2</d2p1:Qty>
      <d2p1:Codes>
        <d2p1:ResponseCode>Early</d2p1:ResponseCode>
        <d2p1:ResponseCode>Early</d2p1:ResponseCode>
      </d2p1:Codes>
    </d2p1:ResItem>
  </ItemCarts>
  <Message>sample string 1</Message>
  <OrderId>1</OrderId>
</ResultCreateOrder>