> 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/samozanyatye/scenarii-ispolzovaniya-npd-api/3.-uvedomlenie-ot-npd-api.md).

# 4. Уведомление маркетплейса о статусе привязки

1\. Уведомление об успешной привязке:

* notificationId - ID нотификации (число, до 11-ти знаков)
* notificationName - (строка, до 32-х символов)
* userPhone - (строка, до 32-х символов)
* userInn - ИНН самозанятого (строка до 12-ти символов)
* debugData - json массив
  * Body - json массив
    * GetMessageResponse - json массив
      * ProcessingStatus - (строка, до 32-х символов)
      * Message - json массив
        * GetBindPartnerStatusResponse - json массив
          * Result - (строка, до 32-х символов)
          * Inn - (строка до 12-ти символов)
          * Permissions - (строка, text 16384 символа)
          * ProcessingTime - datetime

Пример успешной привязки:

```
{
   "notificationId":383,
   "notificationName":"userlinked",
   "userPhone":"71234567890",
   "userInn":"503124892514",
   "debugData":{
      "Body":{
         "GetMessageResponse":{
            "ProcessingStatus":"COMPLETED",
            "Message":{
               "GetBindPartnerStatusResponse":{
                  "Result":"COMPLETED",
                  "Inn":"503124892514",
                  "Permissions":[
                     "CANCEL_INCOME",
                     "INCOME_REGISTRATION",
                     "PAYMENT_INFORMATION",
                     "TAX_PAYMENT"
                  ],
                  "ProcessingTime":"2020-02-27T15:00:40.606Z"
               }
            },
            "FileLinks":[
               
            ]
         }
      }
   }
}
```

Структура уведомления при отказе самозанятого от привязки:

* notificationId - ID нотификации (число, до 11-ти знаков)
* notificationName - (строка, до 32-х символов)
* userPhone - (строка, до 32-х символов)
* userInn - ИНН самозанятого (строка до 12-ти символов)
* debugData - json массив
  * Body - json массив
    * GetMessageResponse - json массив
      * ProcessingStatus - (строка, до 32-х символов)
      * Message - json массив
        * SmzPlatformError - json массив
          * Code - (строка, до 32-х символов)
          * Message - (строка, text 16384 символа)
          * Args - json массив - список пар ключ-значение
            * Key - (строка, до 32-х символов)
            * Value - (строка, text 16384 символа)

Пример уведомления при отказе самозанятого от привязки:&#x20;

```
{
   "notificationId":391,
   "notificationName":"userunlinked",
   "userPhone":"79038326801",
   "userInn":null,
   "debugData":{
      "Body":{
         "GetMessageResponse":{
            "ProcessingStatus":"COMPLETED",
            "Message":{
               "SmzPlatformError":{
                  "Code":"TAXPAYER_UNREGISTERED",
                  "Message":"\u041d\u0430\u043b\u043e\u0433\u043e\u043f\u043b\u0430\u0442\u0435\u043b\u044c\u0449\u0438\u043a \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d"
               }
            },
            "FileLinks":[
               
            ]
         }
      }
   }
}
```

2\. Уведомление от NPD API о привязке уже привязанного самозанятого:

* notificationId - ID нотификации (число, до 11-ти знаков)
* notificationName - (строка, до 32-х символов)
* userPhone - (строка, до 32-х символов)
* userInn - ИНН самозанятого (строка до 12-ти символов)
* debugData - json массив
  * Body - json массив
    * GetMessageResponse - json массив
      * ProcessingStatus - (строка, до 32-х символов)
      * Message - json массив
        * SmzPlatformError - json массив
          * Code - (строка, до 32-х символов)
          * Message - (строка, text 16384 символа)
          * Args - json массив - список пар ключ-значение
            * Key - (строка, до 32-х символов)
            * Value - (строка, text 16384 символа)

Пример успешной привязки:

```
{
   "notificationId":388,
   "notificationName":"userlinked",
   "userPhone":"79258480715",
   "userInn":"732807279810",
   "debugData":{
      "Body":{
         "GetMessageResponse":{
            "ProcessingStatus":"COMPLETED",
            "Message":{
               "SmzPlatformError":{
                  "Code":"TAXPAYER_ALREADY_BOUND",
                  "Message":"\u041d\u0430\u043b\u043e\u0433\u043e\u043f\u043b\u0430\u0442\u0435\u043b\u044c\u0449\u0438\u043a \u0441 \u0418\u041d\u041d 732807279810 \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u0443",
                  "Args":{
                     "Key":"INN",
                     "Value":"732807279810"
                  }
               }
            },
            "FileLinks":[
               
            ]
         }
      }
   }
}
```


---

# 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/samozanyatye/scenarii-ispolzovaniya-npd-api/3.-uvedomlenie-ot-npd-api.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.
