Запрос

URI параметр

NONE

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

Параметры

CreateOrderParams
Name Description Type Additional information
AgreementId Договор string

None

DeliveryMethod Метод доставки DeliveryMethod

None

DeliveryType Тип доставки DeliveryType

None

Comment Комментарий для менеджера string

None

Note Заметки к заказу string

None

AddressId Адрес string

None

ShippingAgentServiceId Id услуги экспедитора string

None

ShippingDate Дата отгрузки date

None

DeliveryDate Дата доставки date

None

DeliveryFio ФИО для доставки string

None

DeliveryPhone Телефон для доставки string

None

DeliveryAddress Адрес доставки string

None

Items Позиции корзины Collection of ItemForOrder

None

ZoneCodeDestination Назначение string

None

LocationCode Код склада string

None

AgreeWithTermsOfDelivery boolean

None

AgreeWithPersonalDataProcessingPolicyAndUserAgreement boolean

None

Request Formats

application/json, text/json

Sample:
{
  "AgreementId": "sample string 1",
  "DeliveryMethod": 0,
  "DeliveryType": 0,
  "Comment": "sample string 2",
  "Note": "sample string 3",
  "AddressId": "sample string 4",
  "ShippingAgentServiceId": "sample string 5",
  "ShippingDate": "2021-01-18T16:24:49.7694577+03:00",
  "DeliveryDate": "2021-01-18T16:24:49.7694577+03:00",
  "DeliveryFio": "sample string 6",
  "DeliveryPhone": "sample string 7",
  "DeliveryAddress": "sample string 8",
  "Items": [
    {
      "Id": 1,
      "Price": 2.0,
      "Quantity": 3,
      "DeliveryDate": "2021-01-18T16:24:49.7694577+03:00",
      "ShippingDate": "2021-01-18T16:24:49.7694577+03:00"
    },
    {
      "Id": 1,
      "Price": 2.0,
      "Quantity": 3,
      "DeliveryDate": "2021-01-18T16:24:49.7694577+03:00",
      "ShippingDate": "2021-01-18T16:24:49.7694577+03:00"
    }
  ],
  "ZoneCodeDestination": "sample string 9",
  "LocationCode": "sample string 10",
  "AgreeWithTermsOfDelivery": true,
  "AgreeWithPersonalDataProcessingPolicyAndUserAgreement": true
}

text/xml

Sample:
<CreateOrderParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Model.Cart">
  <AddressId>sample string 4</AddressId>
  <AgreeWithPersonalDataProcessingPolicyAndUserAgreement>true</AgreeWithPersonalDataProcessingPolicyAndUserAgreement>
  <AgreeWithTermsOfDelivery>true</AgreeWithTermsOfDelivery>
  <AgreementId>sample string 1</AgreementId>
  <Comment>sample string 2</Comment>
  <DeliveryAddress>sample string 8</DeliveryAddress>
  <DeliveryDate>2021-01-18T16:24:49.7694577+03:00</DeliveryDate>
  <DeliveryFio>sample string 6</DeliveryFio>
  <DeliveryMethod>PickUp</DeliveryMethod>
  <DeliveryPhone>sample string 7</DeliveryPhone>
  <DeliveryType>ManyDelivery</DeliveryType>
  <Items>
    <ItemForOrder>
      <DeliveryDate>2021-01-18T16:24:49.7694577+03:00</DeliveryDate>
      <Id>1</Id>
      <Price>2</Price>
      <Quantity>3</Quantity>
      <ShippingDate>2021-01-18T16:24:49.7694577+03:00</ShippingDate>
    </ItemForOrder>
    <ItemForOrder>
      <DeliveryDate>2021-01-18T16:24:49.7694577+03:00</DeliveryDate>
      <Id>1</Id>
      <Price>2</Price>
      <Quantity>3</Quantity>
      <ShippingDate>2021-01-18T16:24:49.7694577+03:00</ShippingDate>
    </ItemForOrder>
  </Items>
  <LocationCode>sample string 10</LocationCode>
  <Note>sample string 3</Note>
  <ShippingAgentServiceId>sample string 5</ShippingAgentServiceId>
  <ShippingDate>2021-01-18T16:24:49.7694577+03:00</ShippingDate>
  <ZoneCodeDestination>sample string 9</ZoneCodeDestination>
</CreateOrderParams>

application/x-www-form-urlencoded

Sample:

Sample not available.

Ответ

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

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:24:49.7850759+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:24:49.7850759+03:00",
        "ShippingDate": "2021-01-18T16:24:49.7850759+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:24:49.7850759+03:00",
        "ShippingDate": "2021-01-18T16:24:49.7850759+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:
<CreateOrderResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Model.Cart">
  <CreatedDate>2021-01-18T16:24:49.7850759+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:24:49.7850759+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:24:49.7850759+03:00</ShippingDate>
      </InvalidItem>
      <InvalidItem>
        <Availability>sample string 2</Availability>
        <DeliveryDate>2021-01-18T16:24:49.7850759+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:24:49.7850759+03:00</ShippingDate>
      </InvalidItem>
    </InvalidItems>
    <Warnings xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:int>1</d3p1:int>
      <d3p1:int>2</d3p1:int>
    </Warnings>
  </ValidateResult>
</CreateOrderResult>