### C# HttpClient Request Example Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-report-controller-v-2-get-report-download-url C# example using HttpClient to send a GET request to the report download endpoint. Requires a Bearer token and the organisationId and reportId path parameters. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/reports/:reportId/download"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient example for download document Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-edo-controller-v-2-download-document C# example using HttpClient to POST to the download endpoint with Bearer token authorization. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/documents/:documentId/download"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Swift URLSession GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships Swift example using URLSession to GET memberships. Requires a valid JWT token in the Authorization header. ```swift import Foundation let url = URL(string: "https://b2b.selfwork.ru/openapi/v2/me/memberships")! var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("application/json", forHTTPHeaderField: "Accept") request.setValue("Bearer ", forHTTPHeaderField: "Authorization") let task = URLSession.shared.dataTask(with: request) { data, response, error in if let data = data { print(String(data: data, encoding: .utf8)!) } } task.resume() ``` -------------------------------- ### Create Invitation using HttpClient Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-invitations-controller-v-2-create-invitation Example of sending a POST request to create an invitation using the C# HttpClient library. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/invitations"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"inviteeEmail\": \"user@example.com\",\n \"roleIds\": [\n \"019d06af-5e5d-7a42-91b7-0a7dd66aa9f4\"\n ],\n \"metadata\": {\n \"source\": \"integration\"\n }\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Rust reqwest GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships Rust example using reqwest to GET memberships. Requires a valid JWT token in the Authorization header. ```rust use reqwest; #[tokio::main] async fn main() -> Result<(), Box> { let client = reqwest::Client::new(); let response = client .get("https://b2b.selfwork.ru/openapi/v2/me/memberships") .header("Accept", "application/json") .header("Authorization", "Bearer ") .send() .await?; println!("{}", response.text().await?); Ok(()) } ``` -------------------------------- ### R httr GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships R example using httr to GET memberships. Requires a valid JWT token in the Authorization header. ```r library(httr) url <- "https://b2b.selfwork.ru/openapi/v2/me/memberships" response <- GET(url, add_headers( 'Accept' = 'application/json', 'Authorization' = 'Bearer ' )) content(response, "text") ``` -------------------------------- ### Create report with HttpClient (C#) Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-report-controller-v-2-create-report C# example using HttpClient to send a POST request to the report creation endpoint. It sets the Authorization header with a Bearer token and sends a JSON body with report parameters. The response is printed to the console after ensuring success. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/reports"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"params\": [\n {\n \"name\": \"string\",\n \"value\": \"string\"\n }\n ],\n \"type\": \"CONTRACTOR_LIST_REPORT\",\n \"email\": \"qwe@dot.com\"\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Python requests GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships Python example using requests to GET memberships. Requires a valid JWT token in the Authorization header. ```python import requests url = "https://b2b.selfwork.ru/openapi/v2/me/memberships" headers = { "Accept": "application/json", "Authorization": "Bearer " } response = requests.get(url, headers=headers) print(response.text) ``` -------------------------------- ### Success response example Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-task-invite-link-controller-v-2-enable Example of a successful response with the invite link details, including id, token, status, and timestamps. ```json { "requestId": "97c5678a-8c6a-4688-8452-68ab606fe049", "result": { "id": "550e8400-e29b-41d4-a716-446655440000", "taskAnnouncementId": 2481, "token": "k7fd2mqrx9ab", "name": "Телеграм-канал «Работа рядом»", "status": "ACTIVE", "expiresAt": "2026-12-31T23:59:59.000Z", "createdBy": "9f1c6e2a-1c2b-4a3d-8f4e-5b6c7d8e9f01", "createdAt": "2026-07-24T14:50:00.000Z", "updatedAt": "2026-07-24T14:50:00.000Z" }, "success": true } ``` -------------------------------- ### PowerShell Invoke-RestMethod GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships PowerShell example using Invoke-RestMethod to GET memberships. Requires a valid JWT token in the Authorization header. ```powershell $headers = @{ 'Accept' = 'application/json' 'Authorization' = 'Bearer ' } $response = Invoke-RestMethod -Uri 'https://b2b.selfwork.ru/openapi/v2/me/memberships' -Method Get -Headers $headers $response | ConvertTo-Json ``` -------------------------------- ### C# HTTP client example for filter offers Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-offer-controller-v-2-filter-offers C# code using HttpClient to send a POST request to the filter offers endpoint. Includes the request body with filters, query, order, and pagination. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/offers/filter"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"filters\": [\n {\n \"name\": \"STATUS\",\n \"value\": \"APPLIED\"\n },\n {\n \"name\": \"CREATED_AT\",\n \"value\": {\n \"from\": \"2026-01-01T00:00:00.000Z\",\n \"to\": \"2026-01-31T23:59:59.999Z\"\n }\n }\n ],\n \"query\": \"string\",\n \"order\": [\n {\n \"field\": \"STATUS\",\n \"sort\": \"DESC\"\n }\n ],\n \"pagination\": {\n \"lastId\": \"string\",\n \"limit\": 10\n }\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### PHP Guzzle GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships PHP example using Guzzle to GET memberships. Requires a valid JWT token in the Authorization header. ```php request('GET', 'https://b2b.selfwork.ru/openapi/v2/me/memberships', [ 'headers' => [ 'Accept' => 'application/json', 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` -------------------------------- ### Success response example for download document Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-edo-controller-v-2-download-document Example of a 200 response containing a downloadUrl for the requested document. ```json { "requestId": "97c5678a-8c6a-4688-8452-68ab606fe049", "result": { "downloadUrl": "string" }, "success": true } ``` -------------------------------- ### Accept offers with HttpClient (C#) Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-offer-controller-v-2-accept-offers C# example using HttpClient to send a POST request to the accept offers endpoint. Requires a valid Bearer JWT token and an organisationId in the path. The request body contains an array of offer IDs. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/offers/accept"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"offers\": [\n \"offer-id-1\",\n \"offer-id-2\"\n ]\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### OCaml Cohttp GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships OCaml example using Cohttp to GET memberships. Requires a valid JWT token in the Authorization header. ```ocaml open Lwt open Cohttp open Cohttp_lwt_unix let headers = Header.add_list (Header.init ()) [ ("Accept", "application/json"); ("Authorization", "Bearer "); ] let body = Client.get (Uri.of_string "https://b2b.selfwork.ru/openapi/v2/me/memberships") headers >>= fun (_, body) -> Cohttp_lwt.Body.to_string body >>= fun body -> print_endline body; Lwt.return_unit let () = Lwt_main.run body ``` -------------------------------- ### 200 OK response example Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-members-controller-v-2-get-member Example response for a successful request (HTTP 200). Contains member details including roles, joinedAt, email, and personal names. ```json { "requestId": "97c5678a-8c6a-4688-8452-68ab606fe049", "result": { "id": "01961a2b-0001-7e5f-8a9b-0c1d2e3f4a5b", "roles": [ { "id": "01961a2b-0010-7e5f-8a9b-0c1d2e3f4a5b", "memberId": "01961a2b-0001-7e5f-8a9b-0c1d2e3f4a5b", "roleId": "019d06af-5e5d-7313-b8ba-df1640767435", "roleCode": "OWNER", "roleName": "Владелец", "active": true, "createdAt": "2026-03-17T12:00:00Z" } ], "joinedAt": "2026-03-17T12:00:00Z", "createdAt": "2026-03-17T12:00:00Z", "updatedAt": "2026-03-17T12:00:00Z", "email": "user@example.com", "firstName": "Иван", "lastName": "Иванов", "middleName": "Иванович" }, "success": true } ``` -------------------------------- ### Objective-C NSURLSession GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships Objective-C example using NSURLSession to GET memberships. Requires a valid JWT token in the Authorization header. ```objective-c NSURL *url = [NSURL URLWithString:@"https://b2b.selfwork.ru/openapi/v2/me/memberships"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@"GET"]; [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; [request setValue:@"Bearer " forHTTPHeaderField:@"Authorization"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (data) { NSLog(@"%@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); } }]; [task resume]; ``` -------------------------------- ### C libcurl GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships C example using libcurl to GET memberships. Requires a valid JWT token in the Authorization header. ```c #include #include int main(void) { CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "https://b2b.selfwork.ru/openapi/v2/me/memberships"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Accept: application/json"); headers = curl_slist_append(headers, "Authorization: Bearer "); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_perform(curl); } return 0; } ``` -------------------------------- ### GET /selfemployed/business/v2/documents/get-docs/{id} Source: https://docs.selfwork.ru/api/business/edo/poluchenie-spiska-dokumentov-ispolnitelya Возвращает список всех документов исполнителя. Требуется аутентификация через заголовки X-Login и X-Password, а также идентификатор исполнителя в пути. ```APIDOC ## GET /selfemployed/business/v2/documents/get-docs/{id} ### Description Возвращает список всех документов исполнителя. Для вызова необходимо передать X-Login и X-Password в заголовках запроса и указать идентификатор исполнителя в пути. ### Method GET ### Endpoint https://business.selfwork.ru/selfemployed/business/v2/documents/get-docs/{id} ### Parameters #### Path Parameters - **id** (int32) - Required - Идентификатор исполнителя #### Headers - **X-Login** (string) - Required - Логин пользователя - **X-Password** (string) - Required - Пароль пользователя ### Request Example ``` curl -X GET "https://business.selfwork.ru/selfemployed/business/v2/documents/get-docs/123" \ -H "X-Login: your_login_here" \ -H "X-Password: your_password_here" \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **idSelfempDocument** (int) - Идентификатор документа в базе данных - **name** (string) - Название документа - **status** (int) - Статус документа (см. справочник status) - **idIndividual** (int) - Идентификатор исполнителя - **type** (int) - Тип документа (см. справочник type) - **dateStart** (string) - Дата заключения - **dateEnd** (string) - Дата окончания - **costOfWork** (number) - Сумма - **idAgreementTemplate** (int) - Идентификатор шаблона договора - **autoRenewal** (boolean) - Автопролонгация #### Response Example ``` [ { "id": 10, "name": "abc", "status": 3, "idIndividual": 10, "type": 0, "dateStart": "2022-01-22 00:00:00+7", "dateEnd": "2022-04-22 00:00:00+7", "costOfWork": 100, "idAgreementTemplate": 12, "autoRenewal": false } ] ``` #### Error Responses - **401 Unauthorized** - Не валидные авторизационные данные - **errorCode** (int) - Код ошибки - **message** (string) - Сообщение об ошибке - Пример: `{"errorCode": 1, "message": "Access denied"}` - **500 Internal Server Error** - Системная ошибка - **errorCode** (int) - Код ошибки - **message** (string) - Сообщение об ошибке - Пример: `{"errorCode": 100, "message": "Internal server error"}` ### Справочник параметра status - **0** - Черновик - **1** - На подписании - **2** - Подписан - **3** - Отклонен - **4** - Блокирован - **5** - Истек - **6** - Расторгнут - **7** - Подписан компанией - **8** - Подписан исполнителем ### Справочник параметра type - **0** - Документ - **1** - Договор - **2** - Акт ``` -------------------------------- ### JavaScript fetch GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships JavaScript example using fetch to GET memberships. Requires a valid JWT token in the Authorization header. ```javascript const response = await fetch('https://b2b.selfwork.ru/openapi/v2/me/memberships', { method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer ' } }); const data = await response.json(); console.log(data); ``` -------------------------------- ### Java Unirest GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships Java example using Unirest to GET memberships. Requires a valid JWT token in the Authorization header. ```java HttpResponse response = Unirest.get("https://b2b.selfwork.ru/openapi/v2/me/memberships") .header("Accept", "application/json") .header("Authorization", "Bearer ") .asString(); ``` -------------------------------- ### cURL запрос к info-on-all с X-Login и X-Password Source: https://docs.selfwork.ru/api/business/rabota-s-reestrami/poluchenie-informacii-po-vsem-reestram-za-opredelyonnyi-period Выполняет GET-запрос к методу info-on-all с обязательными заголовками X-Login и X-Password. Параметры dateStart и dateEnd задают период выборки; при их отсутствии используются первая запись и текущая дата соответственно. ```bash curl -X GET "https://business.selfwork.ru/selfemployed/business/v1/payouts/info-on-all?dateStart=2025-01-01T00:00:00.000Z&dateEnd=2025-07-09T23:59:59.999Z" \ -H "X-Login: your_login_here" \ -H "X-Password: your_password_here" ``` -------------------------------- ### C# HTTPClient Example Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-edo-controller-v-2-sign C# example using HttpClient to send a POST request to the sign endpoint with Bearer token authorization and a JSON body containing an 'ids' array. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/documents/sign"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Go net/http GET memberships Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-user-context-controller-v-2-list-memberships Go example using net/http to GET memberships. Requires a valid JWT token in the Authorization header. ```go package main import ( "fmt" "io" "net/http" ) func main() { url := "https://b2b.selfwork.ru/openapi/v2/me/memberships" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Accept", "application/json") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) } ``` -------------------------------- ### Get Payout Info C# HttpClient Example Source: https://docs.selfwork.ru/api/marketplace/api-reference/openapi-operations-controller-v-2-get-payout-info Example implementation using C# HttpClient to retrieve payout information from the specified endpoint. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://b2b.selfwork.ru/openapi/v2/organisation/:organisationId/operations/:paymentId"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### POST /merchant/v1/init Source: https://docs.selfwork.ru/api/acquiring/metody-api/init Initializes a payment page. Requires specific headers and a signed request body with order details and product information. ```APIDOC ## POST /merchant/v1/init ### Description Initializes a payment page for an order. No authorization is required. ### Method POST ### Endpoint https://pro.selfwork.ru/merchant/v1/init ### Headers - **Content-Type**: application/x-www-form-urlencoded - **Origin**: https://domain-of-your-site/ - **Referer**: domain-of-your-site ### Parameters #### Request Body - **order_id** (string) - Required - Unique order identifier from your store. Max 35 characters. - **amount** (string) - Required - Payment amount in kopecks. - **signature** (string) - Required - Request signature generated on your side. - **info[0][name]** (string) - Required - Product name. Will be displayed in the receipt. - **info[0][quantity]** (integer) - Required - Quantity of items for the product. Will be displayed in the receipt. - **info[0][amount]** (integer) - Required - Cost of one item. Will be displayed in the receipt. - **info[1..5][(name|quantity|amount)]** - Optional - Additional products. Up to 6 items total. ### Request Example ``` curl -X POST "https://pro.selfwork.ru/merchant/v1/init" \ -H "Content-Type: application/x-www-form-urlencoded" \ -H "Origin: https://your-domain.com/" \ -H "Referer: your-domain.com" \ -d "order_id=ORDER_12345&amount=150000&signature=your_signature_here&info%5B0%5D%5Bname%5D=Веб-разработка&info%5B0%5D%5Bquantity%5D=1&info%5B0%5D%5Bamount%5D=100000&info%5B1%5D%5Bname%5D=Дизайн&info%5B1%5D%5Bquantity%5D=1&info%5B1%5D%5Bamount%5D=50000" ``` ### Response #### Success Response (200) Server returns an HTML page for payment. If the signature is invalid, the store is blocked, or another error occurs, it will be displayed within the HTML page. #### Response Example HTML page content. ``` -------------------------------- ### GET /selfemployed/business/v2/documents/get-docs Source: https://docs.selfwork.ru/api/business/edo/poluchenie-spiska-dokumentov-agenta Получение списка документов агента. Требует авторизацию через заголовки X-Login и X-Password, поддерживает пагинацию через query параметры page и pageSize. ```APIDOC ## GET /selfemployed/business/v2/documents/get-docs ### Description Метод API предназначен для получения списка документов агента. Для вызова метода необходимо передать X-Login и X-Password в Headers запроса. Для более точного поиска документов можно использовать query параметры. ### Method GET ### Endpoint https://business.selfwork.ru/selfemployed/business/v2/documents/get-docs ### Parameters #### Query Parameters - **page** (int32) - Optional - Номер страницы, отсчёт с 1. Действует только вместе с pageSize. - **pageSize** (int32) - Optional - Размер страницы. Без него метод вернёт весь список одним ответом. #### Headers - **X-Login** (string) - Required - Логин пользователя. - **X-Password** (string) - Required - Пароль пользователя. ### Request Example ``` curl -X GET "https://business.selfwork.ru/selfemployed/business/v2/documents/get-docs?page=1&pageSize=10" \ -H "X-Login: your_login_here" \ -H "X-Password: your_password_here" \ -H "Content-Type: application/json" ``` ### Response #### Success Response (200) - **idSelfempDocument** (integer) - Идентификатор договора в базе данных. - **name** (string) - Название документа. - **status** (integer) - Статус документа. Справочник: 0 - Черновик, 1 - На подписании, 2 - Подписан, 3 - Отклонен, 4 - Блокирован, 5 - Истек, 6 - Расторгнут, 7 - Подписан компанией, 8 - Подписан исполнителем. - **dateStart** (string) - Дата заключения. - **dateEnd** (string) - Дата окончания. - **costOfWork** (number) - Сумма. - **idIndividual** (integer) - Идентификатор самозанятого. - **type** (integer) - Тип документа. Справочник: 0 - Документ, 1 - Договор, 2 - Акт. - **idAgreementTemplate** (integer) - Номер договора. - **autoRenewal** (boolean) - Автопролонгация. #### Response Example ``` [ { "autoRenewal": false, "costOfWork": 100, "dateStart": "2022-01-22T00:00:00.000+0300", "dateEnd": "2022-04-22T00:00:00.000+0300", "idAgreementTemplate": 12, "idIndividual": 10, "idSelfempDocument": 10, "name": "abc", "status": 3, "type": 0 } ] ``` #### Error Responses - **401 Unauthorized** - Не валидные авторизационные данные. - **500 Internal Server Error** - Системная ошибка. #### Error Response Example (401) ``` { "errorCode": 1, "message": "Access denied" } ``` #### Error Response Example (500) ``` { "errorCode": 100, "message": "Internal server error" } ``` #### Error Fields - **errorCode** (integer) - Код ошибки, возвращенный сервером. - **message** (string) - Сообщение сервера, описывающее ошибку. ```