Запрос

URI параметр

NONE

Передаваемые параметры

Модель для упрощённого оформления заказа

CreateOrderModel
Name Description Type Additional information
Items Строки для заказа Collection of CreateOrderItemModel

None

ShippingAddressCode Код адреса доставки (пример "Д1", в случае, если поле не заполнено, то будет выполнен расчёт даты доставки для адреса доставки по умолчанию, из персональных данных) string

None

Request Formats

application/json, text/json

Sample:
{
  "Items": [
    {
      "ArticleCode": "sample string 1",
      "TradeMarkName": "sample string 2",
      "Price": 3.0,
      "Quantity": 4,
      "DeliveryDate": "2021-01-18T16:37:55.891172+03:00",
      "ShippingDate": "2021-01-18T16:37:55.891172+03:00",
      "Hash": 7
    },
    {
      "ArticleCode": "sample string 1",
      "TradeMarkName": "sample string 2",
      "Price": 3.0,
      "Quantity": 4,
      "DeliveryDate": "2021-01-18T16:37:55.891172+03:00",
      "ShippingDate": "2021-01-18T16:37:55.891172+03:00",
      "Hash": 7
    }
  ],
  "ShippingAddressCode": "sample string 1"
}

text/xml

Sample:
<CreateOrderModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Model.Cart">
  <Items>
    <CreateOrderItemModel>
      <ArticleCode>sample string 1</ArticleCode>
      <DeliveryDate>2021-01-18T16:37:55.891172+03:00</DeliveryDate>
      <Hash>7</Hash>
      <Price>3</Price>
      <Quantity>4</Quantity>
      <ShippingDate>2021-01-18T16:37:55.891172+03:00</ShippingDate>
      <TradeMarkName>sample string 2</TradeMarkName>
    </CreateOrderItemModel>
    <CreateOrderItemModel>
      <ArticleCode>sample string 1</ArticleCode>
      <DeliveryDate>2021-01-18T16:37:55.891172+03:00</DeliveryDate>
      <Hash>7</Hash>
      <Price>3</Price>
      <Quantity>4</Quantity>
      <ShippingDate>2021-01-18T16:37:55.891172+03:00</ShippingDate>
      <TradeMarkName>sample string 2</TradeMarkName>
    </CreateOrderItemModel>
  </Items>
  <ShippingAddressCode>sample string 1</ShippingAddressCode>
</CreateOrderModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Ответ

Описание ответа

Collection of CreateOrderResult
Name Description Type Additional information
OrderId Id заказа integer

None

OrderItems Строки заказа Collection of OrderItemResult

None

CreatedDate Дата создания date

None

ValidateResult Результат валидации ValidateResult

None

Response Formats

application/json, text/json

Sample:
[
  {
    "OrderId": 1,
    "OrderItems": [
      {
        "OrderItemId": 1,
        "Hash": 2
      },
      {
        "OrderItemId": 1,
        "Hash": 2
      }
    ],
    "CreatedDate": "2021-01-18T16:37:55.891172+03:00",
    "ValidateResult": {
      "Errors": [
        {
          "ErrorCode": 1,
          "Message": "sample string 2"
        },
        {
          "ErrorCode": 1,
          "Message": "sample string 2"
        }
      ],
      "InvalidItems": [
        {
          "Id": 1,
          "Price": 1.0,
          "Multiplicity": 1,
          "MinQuantity": 1,
          "DeliveryDate": "2021-01-18T16:37:55.891172+03:00",
          "ShippingDate": "2021-01-18T16:37:55.891172+03:00",
          "Quantity": 1,
          "Availability": "sample string 2",
          "Errors": [
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            },
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            }
          ],
          "Hash": 1
        },
        {
          "Id": 1,
          "Price": 1.0,
          "Multiplicity": 1,
          "MinQuantity": 1,
          "DeliveryDate": "2021-01-18T16:37:55.891172+03:00",
          "ShippingDate": "2021-01-18T16:37:55.891172+03:00",
          "Quantity": 1,
          "Availability": "sample string 2",
          "Errors": [
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            },
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            }
          ],
          "Hash": 1
        }
      ],
      "Warnings": [
        1,
        2
      ]
    }
  },
  {
    "OrderId": 1,
    "OrderItems": [
      {
        "OrderItemId": 1,
        "Hash": 2
      },
      {
        "OrderItemId": 1,
        "Hash": 2
      }
    ],
    "CreatedDate": "2021-01-18T16:37:55.891172+03:00",
    "ValidateResult": {
      "Errors": [
        {
          "ErrorCode": 1,
          "Message": "sample string 2"
        },
        {
          "ErrorCode": 1,
          "Message": "sample string 2"
        }
      ],
      "InvalidItems": [
        {
          "Id": 1,
          "Price": 1.0,
          "Multiplicity": 1,
          "MinQuantity": 1,
          "DeliveryDate": "2021-01-18T16:37:55.891172+03:00",
          "ShippingDate": "2021-01-18T16:37:55.891172+03:00",
          "Quantity": 1,
          "Availability": "sample string 2",
          "Errors": [
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            },
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            }
          ],
          "Hash": 1
        },
        {
          "Id": 1,
          "Price": 1.0,
          "Multiplicity": 1,
          "MinQuantity": 1,
          "DeliveryDate": "2021-01-18T16:37:55.891172+03:00",
          "ShippingDate": "2021-01-18T16:37:55.891172+03:00",
          "Quantity": 1,
          "Availability": "sample string 2",
          "Errors": [
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            },
            {
              "ErrorCode": 1,
              "Message": "sample string 2"
            }
          ],
          "Hash": 1
        }
      ],
      "Warnings": [
        1,
        2
      ]
    }
  }
]

text/xml

Sample:
<ArrayOfCreateOrderResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Model.Cart">
  <CreateOrderResult>
    <CreatedDate>2021-01-18T16:37:55.891172+03:00</CreatedDate>
    <OrderId>1</OrderId>
    <OrderItems>
      <OrderItemResult>
        <Hash>2</Hash>
        <OrderItemId>1</OrderItemId>
      </OrderItemResult>
      <OrderItemResult>
        <Hash>2</Hash>
        <OrderItemId>1</OrderItemId>
      </OrderItemResult>
    </OrderItems>
    <ValidateResult>
      <Errors>
        <Error>
          <ErrorCode>1</ErrorCode>
          <Message>sample string 2</Message>
        </Error>
        <Error>
          <ErrorCode>1</ErrorCode>
          <Message>sample string 2</Message>
        </Error>
      </Errors>
      <InvalidItems>
        <InvalidItem>
          <Availability>sample string 2</Availability>
          <DeliveryDate>2021-01-18T16:37:55.891172+03:00</DeliveryDate>
          <Errors>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
          </Errors>
          <Hash>1</Hash>
          <Id>1</Id>
          <MinQuantity>1</MinQuantity>
          <Multiplicity>1</Multiplicity>
          <Price>1</Price>
          <Quantity>1</Quantity>
          <ShippingDate>2021-01-18T16:37:55.891172+03:00</ShippingDate>
        </InvalidItem>
        <InvalidItem>
          <Availability>sample string 2</Availability>
          <DeliveryDate>2021-01-18T16:37:55.891172+03:00</DeliveryDate>
          <Errors>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
          </Errors>
          <Hash>1</Hash>
          <Id>1</Id>
          <MinQuantity>1</MinQuantity>
          <Multiplicity>1</Multiplicity>
          <Price>1</Price>
          <Quantity>1</Quantity>
          <ShippingDate>2021-01-18T16:37:55.891172+03:00</ShippingDate>
        </InvalidItem>
      </InvalidItems>
      <Warnings xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </Warnings>
    </ValidateResult>
  </CreateOrderResult>
  <CreateOrderResult>
    <CreatedDate>2021-01-18T16:37:55.891172+03:00</CreatedDate>
    <OrderId>1</OrderId>
    <OrderItems>
      <OrderItemResult>
        <Hash>2</Hash>
        <OrderItemId>1</OrderItemId>
      </OrderItemResult>
      <OrderItemResult>
        <Hash>2</Hash>
        <OrderItemId>1</OrderItemId>
      </OrderItemResult>
    </OrderItems>
    <ValidateResult>
      <Errors>
        <Error>
          <ErrorCode>1</ErrorCode>
          <Message>sample string 2</Message>
        </Error>
        <Error>
          <ErrorCode>1</ErrorCode>
          <Message>sample string 2</Message>
        </Error>
      </Errors>
      <InvalidItems>
        <InvalidItem>
          <Availability>sample string 2</Availability>
          <DeliveryDate>2021-01-18T16:37:55.891172+03:00</DeliveryDate>
          <Errors>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
          </Errors>
          <Hash>1</Hash>
          <Id>1</Id>
          <MinQuantity>1</MinQuantity>
          <Multiplicity>1</Multiplicity>
          <Price>1</Price>
          <Quantity>1</Quantity>
          <ShippingDate>2021-01-18T16:37:55.891172+03:00</ShippingDate>
        </InvalidItem>
        <InvalidItem>
          <Availability>sample string 2</Availability>
          <DeliveryDate>2021-01-18T16:37:55.891172+03:00</DeliveryDate>
          <Errors>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
            <Error>
              <ErrorCode>1</ErrorCode>
              <Message>sample string 2</Message>
            </Error>
          </Errors>
          <Hash>1</Hash>
          <Id>1</Id>
          <MinQuantity>1</MinQuantity>
          <Multiplicity>1</Multiplicity>
          <Price>1</Price>
          <Quantity>1</Quantity>
          <ShippingDate>2021-01-18T16:37:55.891172+03:00</ShippingDate>
        </InvalidItem>
      </InvalidItems>
      <Warnings xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </Warnings>
    </ValidateResult>
  </CreateOrderResult>
</ArrayOfCreateOrderResult>