> For the complete documentation index, see [llms.txt](https://docs.payanyway.ru/marketplace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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/editprofilerequest-podprofilya-beneficiarnogo-vladelca.md).

# EditProfileRequest подпрофиля бенефициарного владельца

Заполнение подпрофиля бенефициарного владельца в личном кабинете (юните) клиента маркетплейса

```javascript
Запрос:
{  
   "Envelope":{  
      "Header":{  
         "Security":{  
            "UsernameToken":{  
               "Username":"Username",
               "Password":"Password"
            }
         }
      },
      "Body":{  
         "EditProfileRequest":{  
            "unitId":12345,
            "profileId":55555,
            "profile": {"attribute":             [
                              {
                  "value": "RU",
                  "key": "NATIONALITY"
               },
                              {
                  "value": "LEGAL_ADDRESS",
                  "key": "LEGAL_ADDRESS"
               },
                              {
                  "value": "PLACE_OF_BIRTH",
                  "key": "PLACE_OF_BIRTH"
               },
                              {
                  "value": "POST_ADDRESS",
                  "key": "POST_ADDRESS"
               },
                              {
                  "value": "YYYY-MM-DD",
                  "key": "DATE_OF_BIRTH"
               },
                              {
                  "value": "79001112233",
                  "key": "PHONE_CONTACT"
               }
            ]}
            }
         }
      }
   }

Ответ:

{  
   "Envelope":{  
      "Body":{  
         "EditProfileResponse":{  

         }
      }
   }
}

```

```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\EditProfileRequest();
        $request->unitId = $_POST['unit_id'];
        $request->profileId = $_POST['profile_id'];

        $profile = new \Moneta\Types\Profile();

        //Гражданство
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "NATIONALITY";
        $attribute->value = $_POST['nationality'];
        $profile->addAttribute($attribute);

        //Место рождения
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "PLACE_OF_BIRTH";
        $attribute->value = $_POST['place_of_birth'];
        $profile->addAttribute($attribute);

        //Адрес регистрации
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "LEGAL_ADDRESS";
        $attribute->value = $_POST['legal_address'];
        $profile->addAttribute($attribute);

        //Почтовый адрес
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "POST_ADDRESS";
        $attribute->value = $_POST['post_address'];
        $profile->addAttribute($attribute);

        //Дата рождения
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "DATE_OF_BIRTH";
        $attribute->value = $_POST['date_of_birth'];
        $profile->addAttribute($attribute);

        //Контактный телефон
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "PHONE_CONTACT";
        $attribute->value = $_POST['phone_contact'];
        $profile->addAttribute($attribute);

        //ИНН
        $attribute = new \Moneta\Types\KeyValueApprovedAttribute();
        $attribute->approved = false;
        $attribute->key = "INN";
        $attribute->value = $_POST['inn'];
        $profile->addAttribute($attribute);

        $request->profile = $profile;

        //сохранение подпрофиля бенефициара
        $result = $monetaSdk->monetaService->EditProfile($request);

        if (!empty($result)) {
            throw new Exception(print_r($result, true));
        }

        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/>

            ID подпрофиля бенефициара (Beneficiary):<br/>
            <input type="text" name="profile_id" required="required"/><br/><br/>
            
            Гражданство:<br/>
            <select name="nationality" required="required">
                <option value=""></option>
                <option value="RU">Россия</option>
            </select><br/><br/>
            
            Место рождения:<br/>
            <input type="text" name="place_of_birth" required="required" placeholder="г. Уфа, ул. Новая, д.333, кв. 777"/><br/><br/>
            
            Адрес регистрации:<br/>
            <input type="text" name="legal_address" required="required" placeholder="г. Москва, ул. Новая, д.333, кв. 777"/><br/><br/>
            
            Почтовый адрес:<br/>
            <input type="text" name="post_address" required="required" placeholder="г. Москва, ул. Новая, д.333, кв. 777"/><br/><br/>

            Дата рождения:<br/>
            <input type="date" name="date_of_birth" required="required"/><br/><br/>

            Контактный телефон:<br/>
            <input type="text" name="phone_contact" required="required" placeholder="79123456789"/><br/><br/>
            
            ИНН:<br/>
            <input type="text" name="inn" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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/editprofilerequest-podprofilya-beneficiarnogo-vladelca.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
