Метод используется для размещения заказа в системе MontWebstore и отправки SMS-сообщения конечному клиенту. Объект, принимаемый на вход, содержит в себе номер заказа и список строк заказа. Каждая строка соответствует одной заказываемой позиции, имеет уникальный номер. В ней описывается:
Название | Тип | Описание |
---|---|---|
orderRequest | SendOrderExtContract | Объект, содержащий параметры заказа |
Название | Тип | Описание |
---|---|---|
OrderNum | string | Номер заказа в системе MONT. Создается на стороне партнера и должен быть уникальным в рамках всех заказов партнера. |
SendOrderLines | array of SendOrderLineContract | Массив, содержащий все строки данного заказа |
SendSms | bool | Отправка SMS-сообщения конечному клиенту |
Phone | string | Номер телефона конечного клиента |
Все ответы веб-сервисов B2BServiceV2Xml.svc и B2BServiceV2.svc оборачиваются в контракт вида (контракт содержит информацию о нарушениях в работе веб-сервиса, а также ответ вызываемого метода внутри тега <Data>.):
Тип | Описание |
---|---|
AddOrderExtResponse | Объект, содержащий массив данных AddOrderExtResult |
Тип | Описание |
---|---|
AddOrderExtResult | Объект, содержащий массив данных OrderContract |
Тип | Описание |
---|---|
OrderContract | Объект с размещенным заказом, содержащий текущий статус заказа, номера созданных подписок |
Возможные ошибки метода AddOrderExt.
XmlOverHttp request without licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2Xml.svc/AddOrderExt
<?xml version="1.0" encoding="utf-8"?> <SendOrderExtContract> <SendOrderLines> <SendOrderLineContract> <OrderLineNum>maumau-1</OrderLineNum> <Quantity>1</Quantity> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <PartNum>ABC-11111</PartNum> </SendOrderLineContract> <SendOrderLineContract> <OrderLineNum>maumau-2</OrderLineNum> <Quantity>1</Quantity> <MontSubscriberId>00000000-0000-0000-0000-000000000000</MontSubscriberId> <PartNum>ABC-11111</PartNum> </SendOrderLineContract> </SendOrderLines> <OrderNum>maumau</OrderNum> <SendSms>true</SendSms> <Phone>+71234567890</Phone> </SendOrderExtContract>
XmlOverHttp response without licence form
<?xml version="1.0" encoding="utf-8"?> <AddOrderExtResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AddOrderExtResult> <Data> <OrderLines> <OrderLineContract> <Id>00000000-0000-0000-0000-000000000000</Id> <OrderLineId>213690</OrderLineId> <OrderLineNum>maumau-1</OrderLineNum> <DateCreated>2022-04-13T14:28:28.626156</DateCreated> <PartNum>ABC-11111</PartNum> <Quantity>1</Quantity> <TotalSumm>1000</TotalSumm> <ItemPrice>1000</ItemPrice> <Currency>RUR</Currency> <OrderStatus>InProcess</OrderStatus> <EndUserInfo> <Fields> <EndUserInfoFieldContract> <FieldName>Phone</FieldName> <FieldValue>+71234567890</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>LicFormId</FieldName> <FieldValue>26364</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> <OrderLineContract> <Id>00000000-0000-0000-0000-000000000000</Id> <OrderLineId>213691</OrderLineId> <OrderLineNum>maumau-2</OrderLineNum> <DateCreated>2022-04-13T14:28:28.664947</DateCreated> <PartNum>ABC-11111</PartNum> <Quantity>1</Quantity> <TotalSumm>1000</TotalSumm> <ItemPrice>1000</ItemPrice> <Currency>RUR</Currency> <OrderStatus>InProcess</OrderStatus> <EndUserInfo> <Fields> <EndUserInfoFieldContract> <FieldName>Phone</FieldName> <FieldValue>+71234567890</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContract> <EndUserInfoFieldContract> <FieldName>LicFormId</FieldName> <FieldValue>26365</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>maumau</OrderNum> <DateCreated>2022-04-13T14:28:28.61</DateCreated> <OrderStatus>InProcess</OrderStatus> </Data> <IsError>false</IsError> <ErrorCode>0</ErrorCode> <Errors/> </AddOrderExtResult> </AddOrderExtResponse>
XmlOverHttp request with licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2Xml.svc/AddOrderExt
<SendOrderExtContract> <SendOrderLines> <SendOrderLineContract> <OrderLineNum>mau123-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>mau123</OrderNum> <SendSms>true</SendSms> <Phone>+71234567890</Phone> </SendOrderExtContract>
XmlOverHttp response with licence form
<?xml version="1.0" encoding="utf-8"?> <AddOrderExtResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AddOrderExtResult> <Data> <OrderLines> <OrderLineContract> <Id>00000000-0000-0000-0000-000000000000</Id> <OrderLineId>213692</OrderLineId> <OrderLineNum>mau123-1</OrderLineNum> <DateCreated>2022-04-13T16:31:49.2818405</DateCreated> <PartNum>KL1849RDBFY</PartNum> <Quantity>1</Quantity> <TotalSumm>3800</TotalSumm> <ItemPrice>3800</ItemPrice> <Currency>RUR</Currency> <OrderStatus>InProcess</OrderStatus> <EndUserInfo> <Fields> <EndUserInfoFieldContract> <FieldName>Phone</FieldName> <FieldValue>+71234567890</FieldValue> </EndUserInfoFieldContract> <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>26366</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>mau123</OrderNum> <DateCreated>2022-04-13T16:31:49.233</DateCreated> <OrderStatus>InProcess</OrderStatus> </Data> <IsError>false</IsError> <ErrorCode>0</ErrorCode> <Errors/> </AddOrderExtResult> </AddOrderExtResponse>
SOAP request without licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2.svc
<AddOrderExt> <MethodParameters> <orderRequest> <Phone>+71234567890</Phone> <SendSms>True</SendSms> <OrderNum>shsh1</OrderNum> <ResellerComment>no</ResellerComment> <SendOrderLines attr0="SendOrderLineContractArray" isNull="false"> <SendOrderLineContractArray0> <Action isNull="false" /> <DateOn>13.04.2022 16:34:23</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>shsh1-1</OrderLineNum> <ParentOrderLineNum isNull="false" /> <ParentSubscriptionNum isNull="false" /> <PartNum>ABC-11111</PartNum> <PaymentTransactionId isNull="false" /> <Quantity>1</Quantity> <ResellerComment>no</ResellerComment> <ReserveLineId>0</ReserveLineId> <SubscriptionId isNull="false" /> </SendOrderLineContractArray0> </SendOrderLines> </orderRequest> </MethodParameters> </AddOrderExt>
SOAP response without licence form
<AddOrderExt> <MethodParameters> <WebStoreResponseContractOfOrderContractig8CMuuI> <Data> <DateCreated>13.04.2022 16:37:16</DateCreated> <OrderLines attr0="OrderLineContractArray" isNull="false"> <OrderLineContractArray0 actualtype="OrderLineContract" basetype="OrderLineContract"> <Action isNull="true" /> <Currency>RUR</Currency> <DateCreated>13.04.2022 16:37:16</DateCreated> <EndUserInfo> <Fields attr0="EndUserInfoFieldContractArray" isNull="false"> <EndUserInfoFieldContractArray0> <FieldName>Phone</FieldName> <FieldValue>+71234567890</FieldValue> </EndUserInfoFieldContractArray0> <EndUserInfoFieldContractArray1> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContractArray1> <EndUserInfoFieldContractArray2> <FieldName>LicFormId</FieldName> <FieldValue>26367</FieldValue> </EndUserInfoFieldContractArray2> </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>shsh1-1</OrderLineNum> <OrderStatus>InProcess</OrderStatus> <PartNum>ABC-11111</PartNum> <Quantity>1</Quantity> <ResellerComment>no</ResellerComment> <SubscriptionId isNull="false" /> <TotalSumm>1000</TotalSumm> </OrderLineContractArray0> </OrderLines> <OrderNum>shsh1</OrderNum> <OrderStatus>InProcess</OrderStatus> </Data> <ErrorCode>0</ErrorCode> <ErrorText isNull="true" /> <Errors attr0="ErrorContractArray" isNull="false" /> <IsError>False</IsError> </WebStoreResponseContractOfOrderContractig8CMuuI> </MethodParameters> </AddOrderExt>
SOAP request with licence form
POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2.svc
<AddOrderExt> <MethodParameters> <orderRequest> <Phone>+71234567890</Phone> <SendSms>True</SendSms> <OrderNum>shsh2</OrderNum> <ResellerComment>no</ResellerComment> <SendOrderLines attr0="SendOrderLineContractArray" isNull="false"> <SendOrderLineContractArray0> <Action isNull="false" /> <DateOn>13.04.2022 16:34:23</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>shsh2-1</OrderLineNum> <ParentOrderLineNum isNull="false" /> <ParentSubscriptionNum isNull="false" /> <PartNum>KL1849RDBFY</PartNum> <PaymentTransactionId isNull="false" /> <Quantity>1</Quantity> <ResellerComment>no</ResellerComment> <ReserveLineId>0</ReserveLineId> <SubscriptionId isNull="false" /> </SendOrderLineContractArray0> </SendOrderLines> </orderRequest> </MethodParameters> </AddOrderExt>
SOAP response with licence form
<AddOrderExt> <MethodParameters> <WebStoreResponseContractOfOrderContractig8CMuuI> <Data> <DateCreated>13.04.2022 16:42:05</DateCreated> <OrderLines attr0="OrderLineContractArray" isNull="false"> <OrderLineContractArray0 actualtype="OrderLineContract" basetype="OrderLineContract"> <Action isNull="true" /> <Currency>RUR</Currency> <DateCreated>13.04.2022 16:42:05</DateCreated> <EndUserInfo> <Fields attr0="EndUserInfoFieldContractArray" isNull="false"> <EndUserInfoFieldContractArray0> <FieldName>Phone</FieldName> <FieldValue>+71234567890</FieldValue> </EndUserInfoFieldContractArray0> <EndUserInfoFieldContractArray1> <FieldName>Email</FieldName> <FieldValue>ivanivanov@mail.ru</FieldValue> </EndUserInfoFieldContractArray1> <EndUserInfoFieldContractArray2> <FieldName>CustomerName</FieldName> <FieldValue>Ivan Ivanov</FieldValue> </EndUserInfoFieldContractArray2> <EndUserInfoFieldContractArray3> <FieldName>Country</FieldName> <FieldValue>Russia</FieldValue> </EndUserInfoFieldContractArray3> <EndUserInfoFieldContractArray4> <FieldName>KasperskyPIN</FieldName> <FieldValue>12345678</FieldValue> </EndUserInfoFieldContractArray4> <EndUserInfoFieldContractArray5> <FieldName>LicFormId</FieldName> <FieldValue>26368</FieldValue> </EndUserInfoFieldContractArray5> <EndUserInfoFieldContractArray6> <FieldName>IsLegalPerson</FieldName> <FieldValue>False</FieldValue> </EndUserInfoFieldContractArray6> </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>shsh2-1</OrderLineNum> <OrderStatus>InProcess</OrderStatus> <PartNum>KL1849RDBFY</PartNum> <Quantity>1</Quantity> <ResellerComment>no</ResellerComment> <SubscriptionId isNull="false" /> <TotalSumm>3800</TotalSumm> </OrderLineContractArray0> </OrderLines> <OrderNum>shsh2</OrderNum> <OrderStatus>InProcess</OrderStatus> </Data> <ErrorCode>0</ErrorCode> <ErrorText isNull="true" /> <Errors attr0="ErrorContractArray" isNull="false" /> <IsError>False</IsError> </WebStoreResponseContractOfOrderContractig8CMuuI> </MethodParameters> </AddOrderExt>