Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Для проведения любой операции необходимо пройти авторизацию, а также, если мы работаем от имени агента, получить контекст клиента

WSDL можно скачать с демо-сайта: https://demo.corteos.ru/XmlGate/V3/StaticData/Agreements/AgreementManagement.asmx?wsdl

Для работы в продуктовой среде необходимо заменить demo.corteos.ru на свой домен (на котором работают пользователи вашей компании).

Метод: AgreementOrganizationSupplierApprove

Expand
titleПример запроса:
Code Block
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cor="http://corteos.ru">
   <soapenv:Header>
      <cor:AuthHeader>
         <!--Optional:-->
         <cor:Token>b7baf7dd-****-****-****-eed5575c6a52</cor:Token>
      </cor:AuthHeader>
   </soapenv:Header>
   <soapenv:Body>
      <cor:AgreementOrganizationSupplierApprove>
         <cor:id_Organization>12068</cor:id_Organization>
         <cor:isApprove>false</cor:isApprove>
      </cor:AgreementOrganizationSupplierApprove>
   </soapenv:Body>
</soapenv:Envelope>

где:

  • int id_Organization - уникальный идентификатор организации;

  • bool isApprove - поле, показывающее, что часть договора подтверждена поставщиком;

Expand
titleПример успешного ответа:
Code Block
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <AgreementOrganizationSupplierApproveResponse xmlns="http://corteos.ru">
         <AgreementOrganizationSupplierApproveResult deleted="false">
            <DateCreate>2020-07-31T17:59:27.383</DateCreate>
            <DateChanged>2020-10-05T18:54:51.497</DateChanged>
            <id_Relation>12141</id_Relation>
            <id_Agreement>7214</id_Agreement>
            <id_Organization>12068</id_Organization>
            <CustomerApproved>true</CustomerApproved>
            <SupplierApproved>false</SupplierApproved>
            <CreditLine>0</CreditLine>
            <CreditLineWarningValue>500</CreditLineWarningValue>
            <OuterId/>
            <OrganizationName>Слизерин</OrganizationName>
            <CurrentOrganization deleted="false" id_Group="7869">
               <DateCreate>2020-07-31T17:59:27.337</DateCreate>
               <DateChanged>2020-07-31T17:59:27.337</DateChanged>
               <id_Organization>12068</id_Organization>
               <Name>Слизерин</Name>
               <INN>12345</INN>
            </CurrentOrganization>
         </AgreementOrganizationSupplierApproveResult>
      </AgreementOrganizationSupplierApproveResponse>
   </soap:Body>
</soap:Envelope>
Expand
titleПример ответа с ошибкой:
Code Block
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Серверу не удалось обработать запрос. ---> JavelinBL2.Exceptions.AuthorizationException: Данная операция доступна только агенту
   в JavelinView3.XmlGate.V3.StaticData.Agreements.AgreementManagement.AgreementOrganizationSupplierApprove(Int32 id_Organization, Boolean isApprove) в C:\Jenkins\workspace\javelinprojectv3\JavelinView3\XmlGate\V3\StaticData\Agreements\AgreementManagement.asmx.cs:строка 94
   --- Конец трассировки внутреннего стека исключений ---</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>