Содержание

GetSubscription

Параметры

НазваниеТипОписание
subscriptionNumstringИдентификатор подписки

Возвращаемое значение

ТипОписание
SubscriptionContractМодель подписки

Описание

Возвращает информацию о подписке по ее номеру.

Возможные ошибки

КодТекст ошибки
74Подписка с указанным кодом не найдена

Пример для XmlOverHttp

запрос

GET https://sandbox.mont.ru/Version2/Service/B2BServiceV2xml.svc/GetSubscription/SUB-001068

ответ

<?xml version="1.0" encoding="utf-8"?>
<GetSubscriptionResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <GetSubscriptionResult>
    <Data>
      <SubscriptionId>SUB-001068</SubscriptionId>
      <DateCreated>2015-09-16T17:13:33.573</DateCreated>
      <StateId>1</StateId>
      <StartDate>2015-09-18T11:48:32.857</StartDate>
      <ActiveTill xsi:nil="true"/>
      <MontSubscriberId>54e3081c-f787-4e33-bc99-cc2e3aa392c7</MontSubscriberId>
      <Quantity>1</Quantity>
      <PartNum>OF365B</PartNum>
      <SubscriptionUrl>/test/95179f4d-f659-4980-9a96-ffa872c16c2e</SubscriptionUrl>
      <BundleId xsi:nil="true"/>
      <Periods>
        <SubscriptionPeriodContract>
          <StartDate>2015-09-18T11:48:32.87</StartDate>
          <StopDate xsi:nil="true"/>
          <Seats>1</Seats>
          <DateCreated>2015-09-16T17:13:33.573</DateCreated>
          <PartNum>OF365B</PartNum>
        </SubscriptionPeriodContract>
      </Periods>
      <Events>
        <SubscriptionEventContract>
          <DateCreated>2015-09-18T11:48:32.88</DateCreated>
          <StatusId>1</StatusId>
          <PreviousStatusId>4</PreviousStatusId>
          <SubscriptionStopDate xsi:nil="true"/>
          <PreviousSubscriptionEndDate xsi:nil="true"/>
          <Quantity>1</Quantity>
          <PreviousQuantity>1</PreviousQuantity>
          <PartNum>OF365B</PartNum>
          <PreviousPartNum>OF365B</PreviousPartNum>
          <IsError>false</IsError>
          <MontSystemId>1</MontSystemId>
          <SubscriptionNum>SUB-001068</SubscriptionNum>
          <ResellerName>testme</ResellerName>
        </SubscriptionEventContract>
      </Events>
      <RegistrationProfile>
        <Supplier>CREST</Supplier>
        <Login>t2gmailcom</Login>
        <Password>0K548080ZafKs</Password>
        <RegFields>
          <RegItemContract>
            <FieldName>DomainPrefix</FieldName>
            <FieldValue>t2gmailcomXX36</FieldValue>
            <FieldTitle/>
            <ClientVisible>true</ClientVisible>
          </RegItemContract>
 
          ...
 
          <RegItemContract>
            <FieldName>LoginUrl</FieldName>
            <FieldValue>https://portal.office.com</FieldValue>
            <FieldTitle/>
            <ClientVisible>false</ClientVisible>
          </RegItemContract>
        </RegFields>
        <IsActivated>true</IsActivated>
        <ActivationDate>2015-06-26T15:29:54.597</ActivationDate>
      </RegistrationProfile>
      <ProductName>Office 365 Business</ProductName>
      <VendorName>Microsoft</VendorName>
      <Source>1</Source>
      <ResellerName>testme</ResellerName>
      <ResellerPrice>299</ResellerPrice>
      <ResellerCurrency>RUR</ResellerCurrency>
    </Data>
    <IsError>false</IsError>
    <ErrorCode>0</ErrorCode>
    <Errors/>
  </GetSubscriptionResult>
</GetSubscriptionResponse>

Пример для SOAP

запрос

POST https://sandbox.mont.ru/Version2/Service/B2BServiceV2.svc

<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://docs.oasis-open.org/ws-rx/wsrm/200702">
  <wsse:Security soap:mustUnderstand="true"
                 xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
                 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-0C97A913BFEA47D23B144403553149911">
      <wsse:Username>login</wsse:Username>
      <wsse:Password
        Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
        password
      </wsse:Password>
      <wsse:Nonce
        EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">
        n036EMe242pHx9hQOWMksg==
      </wsse:Nonce>
      <wsu:Created>2015-10-05T08:58:51.499Z</wsu:Created>
    </wsse:UsernameToken>
  </wsse:Security>
  <wsrm:Sequence>
    <wsrm:Identifier>
      s:Sender
      a:InvalidSecurity
    </wsrm:Identifier>
    <wsrm:MessageNumber>1</wsrm:MessageNumber>
  </wsrm:Sequence>
  <wsa:Action>http://tempuri.org/IB2BServiceV2/GetSubscription</wsa:Action>
  <wsa:MessageID>uuid:041f71c5-b2f3-4e58-8cd7-d0fe45695311</wsa:MessageID>
  <wsa:To>https://tayga:453/Version2/Service/B2BServiceV2.svc</wsa:To>
</soap:Header>
<soap:Body>
  <tem:GetSubscription>
    <!--Optional:-->
    <tem:subscriptionNum>SUB-000206</tem:subscriptionNum>
  </tem:GetSubscription>
</soap:Body>
</soap:Envelope>

ответ

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"
            xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <s:Header>
    <a:Action s:mustUnderstand="1">http://tempuri.org/IB2BServiceV2/GetSubscriptionResponse</a:Action>
    <a:RelatesTo>uuid:041f71c5-b2f3-4e58-8cd7-d0fe45695311</a:RelatesTo>
    <o:Security s:mustUnderstand="1"
                xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <u:Timestamp u:Id="_0">
        <u:Created>2015-10-05T08:58:51.722Z</u:Created><u:Expires>2015-10-05T09:03:51.722Z</u:Expires>
      </u:Timestamp>
    </o:Security>
  </s:Header>
  <s:Body>
    <GetSubscriptionResponse xmlns="http://tempuri.org/">
      <GetSubscriptionResult
        xmlns:b="http://schemas.datacontract.org/2004/07/WebStore2.B2B.Version2.Contracts.Responses"
        xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <b:Data xmlns:c="http://schemas.datacontract.org/2004/07/WebStore2.B2B.Version2.Contracts">
          <c:ActiveTill i:nil="true" /><c:BundleId i:nil="true" />
          <c:DateCreated>2015-09-15T16:55:21.537</c:DateCreated>
          <c:Events>
            <c:SubscriptionEventContract>
              <c:DateCreated>2015-09-16T17:13:06.99</c:DateCreated>
              <c:ErrorText>
                {"code":1, "message":"System.NullReferenceException: Object reference not set to an instance of an object.&#xD;
                at VendorStubs.API.StubCores.Crest.CrestServerCore.&lt;CreateOrder&gt;b__7(OrderLine x) in d:\sources\WebStore2\VendorStubs.API\StubCores\Crest\CrestS
              </c:ErrorText>
              <c:IsError>true</c:IsError><c:MontSystemId>1</c:MontSystemId><c:PartNum>cloud-o365pp</c:PartNum>
              <c:PreviousPartNum>cloud-o365pp</c:PreviousPartNum><c:PreviousQuantity>3</c:PreviousQuantity>
              <c:PreviousStatusId>4</c:PreviousStatusId><c:PreviousSubscriptionEndDate i:nil="true" />
              <c:Quantity>3</c:Quantity><c:ResellerName>login</c:ResellerName><c:StatusId>8</c:StatusId>
              <c:SubscriptionNum>SUB-000206</c:SubscriptionNum><c:SubscriptionStopDate i:nil="true" />
            </c:SubscriptionEventContract>
          </c:Events>
          <c:MontSubscriberId>914f63b7-5aa0-457a-8d23-1299f5801e08</c:MontSubscriberId>
          <c:ParentSubscriptionId i:nil="true" /><c:PartNum>cloud-o365pp</c:PartNum><c:Periods />
          <c:ProductName>Office 365 ProPlus</c:ProductName><c:Quantity>3</c:Quantity>
          <c:RegistrationProfile
            xmlns:d="http://schemas.datacontract.org/2004/07/WebStore2.B2B.Version2.Contracts.Subscriber">
            <d:ActivationDate>2015-09-15T16:53:54.923</d:ActivationDate><d:IsActivated>true</d:IsActivated>
            <d:Login>admin</d:Login><d:Password>XZY2FD8p</d:Password>
            <d:RegFields>
              <d:RegItemContract>
                <d:ClientVisible>true</d:ClientVisible><d:FieldName>DomainPrefix</d:FieldName><d:FieldTitle />
                <d:FieldValue>akulapin_domainPrefix</d:FieldValue>
              </d:RegItemContract>
              ...
              <d:RegItemContract>
                <d:ClientVisible>true</d:ClientVisible><d:FieldName>Phone</d:FieldName>
                <d:FieldTitle>Телефон</d:FieldTitle><d:FieldValue>akulapin_phone</d:FieldValue>
              </d:RegItemContract>
            </d:RegFields>
            <d:Supplier>CREST</d:Supplier>
          </c:RegistrationProfile>
          <c:ResellerName>login</c:ResellerName><c:Source>1</c:Source>
          <c:StartDate>2015-09-15T16:55:21.537</c:StartDate><c:StateId>1</c:StateId>
          <c:SubscriptionId>SUB-000206</c:SubscriptionId>
          <c:SubscriptionItems>
            <c:SubscriptionItemContract>
              <c:CreateDate>2015-09-15T16:55:21.537</c:CreateDate><c:PartNum>cloud-o365pp</c:PartNum>
              <c:ResourceUrl i:nil="true" /><c:SeatQuantity>3</c:SeatQuantity>
            </c:SubscriptionItemContract>
          </c:SubscriptionItems>
          <c:SubscriptionUrl i:nil="true" /><c:VendorName>Microsoft</c:VendorName>
        </b:Data>
        <b:ErrorCode>0</b:ErrorCode><b:ErrorText i:nil="true" /><b:Errors /><b:IsError>false</b:IsError>
      </GetSubscriptionResult>
    </GetSubscriptionResponse>
  </s:Body>
</s:Envelope>