# FindLegalInformationRequest подпрофиля юридических реквизитов

Для заполнения подпрофиля юридических реквизитов ([SaveLegalInformationRequest](https://docs.payanyway.ru/marketplace/platezhnye-zaprosy/13.-registraciya-prodavcov-ploshadki-v-sisteme-moneta.ru/13.5.-zaprosy-dlya-podklyucheniya-prodavca-k-sisteme-moneta.ru/savelegalinformationrequest)) необходимо сначала получить id подпрофиля.

Получение id юридических реквизитов в личном кабинет (юните) клиента маркетплейса

```javascript
Запрос:
{  
   "Envelope":{  
      "Header":{  
         "Security":{  
            "UsernameToken":{  
               "Username":"Username",
               "Password":"Password"
            }
         }
      },
      "Body":{  
         "FindLegalInformationRequest":{  
             "unitId":12345
                     
         }
      }
   }
}

Ответ:

{  
   "Envelope":{  
      "Body":{  
         "FindLegalInformationResponse":{  
            "legalInformation":[  
               {  
                  "id":1878,
                  "attribute":[  
                     {  
                        "approved":false,
                        "value":"okved",
                        "key":"okved"
                     },
                     {  
                        "approved":false,
                        "value":"000000000",
                        "key":"kpp"
                     },
                     {  
                        "approved":false,
                        "value":"1111111111111",
                        "key":"ogrn"
                     }
                  ]
               }
            ]
         }
      }
   }
}
```

```php
<?php
if (isset($_POST['unit_id']) && isset($_POST['submit'])) {

    $sdkAppFileName = __DIR__ . "/../moneta-sdk-lib/autoload.php";
    include_once($sdkAppFileName);

    try {
        $monetaSdk = new \Moneta\MonetaSdk();
        $monetaSdk->checkMonetaServiceConnection();

        $request = new \Moneta\Types\FindLegalInformationRequest();
        $request->unitId = $_POST['unit_id'];

        //получение id юридических реквизитов
        $result = $monetaSdk->monetaService->FindLegalInformation($request);

        if (count($result)) {
            echo "<pre>";
            print_r($result);
            echo "</pre>";
        } else {
            echo "Юридические реквизиты не найдены";
        }
    } catch (Exception $e) {
        echo "Произошла ошибка:<br />";
        echo "<pre>" . $e->getMessage() . "</pre>";
    }

} else {
    echo '
        <form method="post">
            unit ID организации (площадки):<br/>
            <input type="text" name="unit_id" required="required"/><br/><br/>

            <input type="submit" name="submit" value="Найти юридические реквизиты"/>
        </form>
    ';
}
```

Все запросы маркетплейс отправляет с помощью интерфейса MONETA.MerchantAPI.

{% hint style="info" %}
Интерфейс [MONETA.MerchantAPI](http://www.moneta.ru/doc/MONETA.MerchantAPI.v2.ru.pdf) представляет собой Web-сервис, описанный по спецификации Web Services Description Language [(WSDL)](https://service.moneta.ru/services.wsdl), использующий протокол Simple Object Access Protocol (SOAP) для передачи информации.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payanyway.ru/marketplace/zaprosy-dlya-registracii-ip-i-yul/13.-registraciya-prodavcov-ploshadki-v-sisteme-moneta.ru/13.5.-zaprosy-dlya-podklyucheniya-prodavca-k-sisteme-moneta.ru/findlegalinformationrequest-podprofilya-yuridicheskikh-rekvizitov.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
