Метод используется для размещения заказа в системе MontWebstore. Объект, принимаемый на вход, содержит в себе номер заказа и список строк заказа. Каждая строка соответствует одной заказываемой позиции, имеет уникальный номер. В ней описывается:
Название | Тип | Описание |
---|---|---|
orderRequest | SendOrderContract | Объект, содержащий параметры заказа |
Название | Тип | Описание |
---|---|---|
OrderNum | string | Номер заказа в системе MONT. Создается на стороне партнера и должен быть уникальным в рамках всех заказов партнера. |
SendOrderLines | array of SendOrderLineContract | Массив, содержащий все строки данного заказа |
Все ответы веб-сервисов B2BServiceV2Xml.svc
и B2BServiceV2.svc
оборачиваются в контракт вида (контракт содержит информацию о нарушениях в работе веб-сервиса, а также ответ вызываемого метода внутри тега <Data>
.):
Тип | Описание |
---|---|
OrderContract | Объект с размещенным заказом, содержащий текущий статус заказа, номера созданных подписок |
Возможные ошибки метода AddOrder.
XmlOverHttp request without licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2Xml.svc/AddOrder
<?xml version="1.0" encoding="utf-8"?> <SendOrderContract> <SendOrderLines> <SendOrderLineContract> <OrderLineNum>abcdefg-1</OrderLineNum> <Quantity>1</Quantity> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <PartNum>ABC-11111</PartNum> </SendOrderLineContract> <SendOrderLineContract> <OrderLineNum>abcdefg-2</OrderLineNum> <Quantity>1</Quantity> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <PartNum>ABC-11111</PartNum> </SendOrderLineContract> </SendOrderLines> <OrderNum>abcdefg</OrderNum> </SendOrderContract>
XmlOverHttp response without licence form
<?xml version="1.0" encoding="utf-8"?> <AddOrderResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AddOrderResult> <Data> <OrderLines> <OrderLineContract> <Id>00000000-0000-0000-0000-000000000000</Id> <OrderLineId>211214</OrderLineId> <OrderLineNum>abcdefg-1</OrderLineNum> <DateCreated>2021-03-17T13:44:06.0856273</DateCreated> <PartNum>ABC-11111</PartNum> <Quantity>1</Quantity> <TotalSumm>1000</TotalSumm> <ItemPrice>1000</ItemPrice> <Currency>RUR</Currency> <OrderStatus>InProcess</OrderStatus> <Keys/> <Links/> <Files/> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <ErrorCode>0</ErrorCode> <Hidden xsi:nil="true"/> <HideKeys>false</HideKeys> </OrderLineContract> <OrderLineContract> <Id>00000000-0000-0000-0000-000000000000</Id> <OrderLineId>211215</OrderLineId> <OrderLineNum>abcdefg-2</OrderLineNum> <DateCreated>2021-03-17T13:44:06.1325392</DateCreated> <PartNum>ABC-11111</PartNum> <Quantity>1</Quantity> <TotalSumm>1000</TotalSumm> <ItemPrice>1000</ItemPrice> <Currency>RUR</Currency> <OrderStatus>InProcess</OrderStatus> <Keys/> <Links/> <Files/> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <ErrorCode>0</ErrorCode> <Hidden xsi:nil="true"/> <HideKeys>false</HideKeys> </OrderLineContract> </OrderLines> <OrderNum>abcdefg</OrderNum> <DateCreated>2021-03-17T13:44:06.07</DateCreated> <OrderStatus>InProcess</OrderStatus> </Data> <IsError>false</IsError> <ErrorCode>0</ErrorCode> <Errors/> </AddOrderResult> </AddOrderResponse>
XmlOverHttp request with licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2Xml.svc/AddOrder
<SendOrderContract> <SendOrderLines> <SendOrderLineContract> <OrderLineNum>qwerty5-1</OrderLineNum> <PartNum>KL1849RDBFY</PartNum> <Quantity>1</Quantity> <EndUserInfo> <Fields> <EndUserInfoFieldContract> <FieldName>CustomerName</FieldName> <FieldValue>Ivan Ivanov</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>Email</FieldName> <FieldValue>ivanivanov@mail.ru</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>IsLegalPerson</FieldName> <FieldValue>false</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>KasperskyPIN</FieldName> <FieldValue>12345678</FieldValue> </EndUserInfoFieldContract> </Fields> </EndUserInfo> </SendOrderLineContract> </SendOrderLines> <OrderNum>qwerty5</OrderNum> </SendOrderContract>
XmlOverHttp response with licence form
<?xml version="1.0" encoding="utf-8"?> <AddOrderResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AddOrderResult> <Data> <OrderLines> <OrderLineContract> <Id>00000000-0000-0000-0000-000000000000</Id> <OrderLineId>211218</OrderLineId> <OrderLineNum>qwerty5-1</OrderLineNum> <DateCreated>2021-03-17T14:51:56.8821131</DateCreated> <PartNum>KL1849RDBFY</PartNum> <Quantity>1</Quantity> <TotalSumm>3800</TotalSumm> <ItemPrice>3800</ItemPrice> <Currency>RUR</Currency> <OrderStatus>InProcess</OrderStatus> <EndUserInfo> <Fields> <EndUserInfoFieldContract> <FieldName>Email</FieldName> <FieldValue>ivanivanov@mail.ru</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>CustomerName</FieldName> <FieldValue>Ivan Ivanov</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>KasperskyPIN</FieldName> <FieldValue>12345678</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>LicFormId</FieldName> <FieldValue>24645</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>IsLegalPerson</FieldName> <FieldValue>False</FieldValue> </EndUserInfoFieldContract> </Fields> </EndUserInfo> <Keys/> <Links/> <Files/> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <ErrorCode>0</ErrorCode> <Hidden xsi:nil="true"/> <HideKeys>false</HideKeys> </OrderLineContract> </OrderLines> <OrderNum>qwerty5</OrderNum> <DateCreated>2021-03-17T14:51:56.883</DateCreated> <OrderStatus>InProcess</OrderStatus> </Data> <IsError>false</IsError> <ErrorCode>0</ErrorCode> <Errors/> </AddOrderResult> </AddOrderResponse>
SOAP request without licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2.svc
<AddOrder> <MethodParameters> <orderRequest actualtype="SendOrderContract" basetype="SendOrderContract"> <OrderNum>qwerty</OrderNum> <ResellerComment>for me</ResellerComment> <SendOrderLines attr0="SendOrderLineContractArray" isNull="false"> <SendOrderLineContractArray0> <Action isNull="false" /> <DateOn>17.03.2021 13:53:11</DateOn> <EndUserAxCode isNull="false" /> <EndUserCurrencyCode isNull="false" /> <EndUserInfo> <Fields attr0="EndUserInfoFieldContractArray" isNull="false"> <EndUserInfoFieldContractArray0> <FieldName isNull="false" /> <FieldValue isNull="false" /> </EndUserInfoFieldContractArray0> </Fields> </EndUserInfo> <EndUserInvoiceNum isNull="false" /> <EndUserPrice>0</EndUserPrice> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <OrderLineNum>qwerty-1</OrderLineNum> <ParentOrderLineNum isNull="false" /> <ParentSubscriptionNum isNull="false" /> <PartNum>ABC-11111</PartNum> <PaymentTransactionId isNull="false" /> <Quantity>2</Quantity> <ResellerComment>for me</ResellerComment> <ReserveLineId>0</ReserveLineId> <SubscriptionId isNull="false" /> </SendOrderLineContractArray0> </SendOrderLines> </orderRequest> </MethodParameters> </AddOrder>
SOAP response without licence form
<AddOrder> <MethodParameters> <WebStoreResponseContractOfOrderContractig8CMuuI> <Data> <DateCreated>17.03.2021 13:58:40</DateCreated> <OrderLines attr0="OrderLineContractArray"isNull="false"> <OrderLineContractArray0 actualtype="OrderLineContract"basetype="OrderLineContract"> <Action isNull="true"/> <Currency>RUR</Currency> <DateCreated>17.03.2021 13:58:40</DateCreated> <EndUserInfo> <Fields attr0="EndUserInfoFieldContractArray"isNull="false"> <EndUserInfoFieldContractArray0> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContractArray0> <EndUserInfoFieldContractArray1> <FieldName>LicFormId</FieldName> <FieldValue>24644</FieldValue> </EndUserInfoFieldContractArray1> </Fields> </EndUserInfo> <ErrorCode>0</ErrorCode> <ErrorText isNull="true"/> <Files attr0="OrderFileContractArray"isNull="false"/> <Hidden isNull="true"/> <ItemPrice>1000</ItemPrice> <Keys attr0="OrderKeyContractArray"isNull="false"/> <Links attr0="OrderLinkContractArray"isNull="false"/> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <OrderLineNum>qwerty-1</OrderLineNum> <OrderStatus>InProcess</OrderStatus> <PartNum>ABC-11111</PartNum> <Quantity>2</Quantity> <ResellerComment>for me</ResellerComment> <SubscriptionId isNull="false"/> <TotalSumm>2000</TotalSumm> </OrderLineContractArray0> </OrderLines> <OrderNum>qwerty</OrderNum> <OrderStatus>InProcess</OrderStatus> </Data> <ErrorCode>0</ErrorCode> <ErrorText isNull="true"/> <Errors attr0="ErrorContractArray"isNull="false"/> <IsError>False</IsError> </WebStoreResponseContractOfOrderContractig8CMuuI> </MethodParameters> </AddOrder>
SOAP request with licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2.svc
<AddOrder> <MethodParameters> <orderRequest actualtype="SendOrderContract" basetype="SendOrderContract"> <OrderNum>qwerty78900</OrderNum> <ResellerComment>for me</ResellerComment> <SendOrderLines attr0="SendOrderLineContractArray" isNull="false"> <SendOrderLineContractArray0> <Action isNull="false" /> <DateOn>20.02.2021 17:21:37</DateOn> <EndUserAxCode isNull="false" /> <EndUserCurrencyCode isNull="false" /> <EndUserInfo> <Fields attr0="EndUserInfoFieldContractArray" isNull="false"> <EndUserInfoFieldContractArray0> <FieldName>CustomerName</FieldName> <FieldValue>Ivan Ivanov</FieldValue> </EndUserInfoFieldContractArray0> <EndUserInfoFieldContractArray1> <FieldName>Email</FieldName> <FieldValue>ivanivanov@mail.ru</FieldValue> </EndUserInfoFieldContractArray1> <EndUserInfoFieldContractArray2> <FieldName>IsLegalPerson</FieldName> <FieldValue>false</FieldValue> </EndUserInfoFieldContractArray2> <EndUserInfoFieldContractArray3> <FieldName>KasperskyPIN</FieldName> <FieldValue>12345678</FieldValue> </EndUserInfoFieldContractArray3> </Fields> </EndUserInfo> <EndUserInvoiceNum isNull="false" /> <EndUserPrice>0</EndUserPrice> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <OrderLineNum>qwerty78900-05</OrderLineNum> <ParentOrderLineNum isNull="false" /> <ParentSubscriptionNum isNull="false" /> <PartNum>KL1849RDBFY</PartNum> <PaymentTransactionId isNull="false" /> <Quantity>5</Quantity> <ResellerComment>for me</ResellerComment> <ReserveLineId>0</ReserveLineId> <SubscriptionId isNull="false" /> </SendOrderLineContractArray0> </SendOrderLines> </orderRequest> </MethodParameters> </AddOrder>
SOAP response with licence form
<AddOrder> <MethodParameters> <WebStoreResponseContractOfOrderContractig8CMuuI> <Data> <DateCreated>17.03.2021 15:07:34</DateCreated> <OrderLines attr0="OrderLineContractArray"isNull="false"> <OrderLineContractArray0 actualtype="OrderLineContract"basetype="OrderLineContract"> <Action isNull="true"/> <Currency>RUR</Currency> <DateCreated>17.03.2021 15:07:34</DateCreated> <EndUserInfo> <Fields attr0="EndUserInfoFieldContractArray"isNull="false"> <EndUserInfoFieldContractArray0> <FieldName>Email</FieldName> <FieldValue>ivanivanov@mail.ru</FieldValue> </EndUserInfoFieldContractArray0> <EndUserInfoFieldContractArray1> <FieldName>CustomerName</FieldName> <FieldValue>Ivan Ivanov</FieldValue> </EndUserInfoFieldContractArray1> <EndUserInfoFieldContractArray2> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContractArray2> <EndUserInfoFieldContractArray3> <FieldName>KasperskyPIN</FieldName> <FieldValue>12345678</FieldValue> </EndUserInfoFieldContractArray3> <EndUserInfoFieldContractArray4> <FieldName>LicFormId</FieldName> <FieldValue>24649</FieldValue> </EndUserInfoFieldContractArray4> <EndUserInfoFieldContractArray5> <FieldName>IsLegalPerson</FieldName> <FieldValue>False</FieldValue> </EndUserInfoFieldContractArray5> </Fields> </EndUserInfo> <ErrorCode>0</ErrorCode> <ErrorText isNull="true"/> <Files attr0="OrderFileContractArray"isNull="false"/> <Hidden isNull="true"/> <ItemPrice>3800</ItemPrice> <Keys attr0="OrderKeyContractArray"isNull="false"/> <Links attr0="OrderLinkContractArray"isNull="false"/> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <OrderLineNum>qwerty78900-05</OrderLineNum> <OrderStatus>InProcess</OrderStatus> <PartNum>KL1849RDBFY</PartNum> <Quantity>5</Quantity> <ResellerComment>for me</ResellerComment> <SubscriptionId isNull="false"/> <TotalSumm>19000</TotalSumm> </OrderLineContractArray0> </OrderLines> <OrderNum>qwerty78900</OrderNum> <OrderStatus>InProcess</OrderStatus> </Data> <ErrorCode>0</ErrorCode> <ErrorText isNull="true"/> <Errors attr0="ErrorContractArray"isNull="false"/> <IsError>False</IsError> </WebStoreResponseContractOfOrderContractig8CMuuI> </MethodParameters> </AddOrder>