### Example Authorization Request URL Source: https://developer.tbank.ru/docs/products/TID/app This is an example of the GET request to initiate the authorization process. Ensure all parameters are correctly formatted and included. ```http GET https://id.tbank.ru/auth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&code_challenge=YOUR_CODE_CHALLENGE&code_challenge_method=YOUR_CODE_CHALLENGE_METHOD&response_type=code&response_mode=query ``` -------------------------------- ### Go Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-3-card Example of how to make a GET request to the /api/v3/company/card endpoint using Go. This snippet demonstrates setting up the request with necessary headers and certificate/key paths. ```go package main import ( "fmt" "io/ioutil" "log" "net/http" "strings" "time" ) func main() { client := &http.Client{ Timeout: time.Second * 10, } req, err := http.NewRequest("GET", "https://secured-openapi.tbank.ru/api/v3/company/card", nil) if err != nil { log.Fatal(err) } req.Header.Set("Accept", "application/json") req.Header.Set("Authorization", "Bearer ") // Use TLS client with mTLS certificate // req.TLSClientConfig.Certificates = []tls.Certificate{cert} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(string(body)) } ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-nominal-accounts-deals-dealid-steps Example of how to make a GET request to retrieve deal steps using cURL. Ensure you replace placeholders like and provide valid paths for your certificate and key. ```bash curl --location 'https://secured-openapi.tbank.ru/api/v1/nominal-accounts/deals/:dealId/steps' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' \ --cert /path/to/cert.pem \ --key /path/to/key.key ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-bank-guarantees-orders-order-id-accept-offer-documents Example of how to make a GET request to retrieve offer documents using cURL. Ensure you replace ':orderId' with the actual order ID and '' with your valid API token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v1/bank-guarantees/orders/:orderId/accept-offer-documents' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Get Employee List cURL Example Source: https://developer.tbank.ru/docs/api/salary-get-employees-list Example of how to call the Get Employee List API using cURL. ```bash curl -X POST \ https://business.tbank.ru/openapi/api/v1/salary/employees/list \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "employeeIds": [ 217 ] }' ``` -------------------------------- ### Create Deal Go Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-nominal-accounts-deals Example of how to create a deal using Go. This snippet demonstrates making the POST request with the necessary payload and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/api/v1/nominal-accounts/deals" payload := map[string]string{ "accountNumber": "40702810110011000777", } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshalling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Idempotency-Key", "") // Replace with a valid UUID client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // You can read and process the response body here } ``` -------------------------------- ### Go Example for Application Statuses Source: https://developer.tbank.ru/docs/api/post-sme-partner-desk-application-statuses-by-ids Demonstrates how to make a POST request in Go to retrieve application statuses. This includes setting up the request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/api/internal/v3/partner/applications/by-ids" requestBody := map[string][]string{ "applicationIds": {"string1", "string2"}, } requestBodyBytes, err := json.Marshal(requestBody) if err != nil { fmt.Println("Error marshaling request body:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(requestBodyBytes)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("x-request-id", "string") rereq.Header.Set("Authorization", "Bearer ") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // Process response body here } ``` -------------------------------- ### Go Request Example Source: https://developer.tbank.ru/docs/api/invest-axiom-providers-api-v-1-contracts-investment-additional-investment-income-create-post Example of how to make a POST request in Go to add additional investment income. This includes setting up the request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/invest/axiom/providers-api/v1/contracts/investment/additional-investment-income/create/" requestBody := map[string]interface{}{ "amount": 0, "contractId": "string", "currencyRate": 0, "settlementDate": "2026-06-17", "updateDate": "2026-06-17T09:18:12.207Z", "yieldAtThe": 0, } requestBodyBytes, err := json.Marshal(requestBody) if err != nil { fmt.Println("Error marshaling request body:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(requestBodyBytes)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN") // Replace with your actual token client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // Process response body here if needed } ``` -------------------------------- ### Get Payment Status Request Source: https://developer.tbank.ru/docs/intro/manuals/certificates/mtls Example of retrieving the status of a payment using the 'Get Payment Status' method with mTLS authentication. ```APIDOC ## Get Payment Status Request ### Description This example demonstrates how to retrieve the status of a payment using the GET method on the payment endpoint. It requires mTLS authentication via certificate and private key, along with an Authorization header. ### Method GET ### Endpoint `https://secured-openapi.tbank.ru/api/v1/payment/{paymentId}` ### Parameters #### Path Parameters - **paymentId** (string) - Required - The ID of the payment to retrieve the status for. #### Query Parameters None #### Request Body None #### Request Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Request Example ```bash curl -i -XGET \ --cert open-api-cert.pem --key private.key \ -H 'Authorization: Bearer t.wFHqh3g2UwAl3CUSQqq_deCf201Qp0BY2mxFWQTggcc2g0uJxHPdNYD_yqZJFUjQ53YUeIb4Xr66jcfiMe7D8A' \ https://secured-openapi.tbank.ru/api/v1/payment/123456 ``` ### Response #### Success Response (200) (Response structure not provided in source) #### Response Example (Response example not provided in source) ``` -------------------------------- ### Go Request Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-credit-products-broker-id-applications-applicationid-confirm-offer This Go example demonstrates how to make a POST request to the confirm-offer endpoint using the standard 'net/http' package. It includes setting the 'Content-Type' and 'X-Request-Id' headers. ```go package main import ( "bytes" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/api/v1/credit-products/{brokerId}/applications/{applicationId}/confirm-offer" payload := []byte(`{ "card": { "ucid": 1145707389, "ean": "2989714752437" }, "eventType": "LINK_CARD" }`) req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("X-Request-Id", "your-unique-request-id") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // Read response body if needed // body, _ := ioutil.ReadAll(res.Body) // fmt.Println("Response Body:", string(body)) } ``` -------------------------------- ### Node.js Request Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-data-import-data-import-id This Node.js example shows how to send a POST request to the data import API using the 'axios' library. It covers constructing the JSON payload, setting headers, and handling the response. Ensure 'axios' is installed (`npm install axios`). ```javascript const axios = require('axios'); const url = 'https://gost-openapi.tbank.ru/api/v1/dataImport/{dataImportId}'; const payload = { metadata: { description: 'Список ИНН', size: 256 }, records: [ { recordId: '075572c8-6b67-406f-a9a2-83ba721602d2', data: {} } ] }; axios.post(url, payload, { headers: { 'Content-Type': 'application/json', 'X-Request-Id': '', 'Authorization': 'Bearer ' } }) .then(response => { console.log('Status Code:', response.status); console.log('Response Data:', response.data); }) .catch(error => { console.error('Error sending request:', error); }); ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-car Example of how to make a GET request to the /api/v1/car endpoint using cURL. Includes authorization headers and certificate paths. ```bash curl --location 'https://gost-openapi.tbank.ru/api/v1/car' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' \ --cert /path/to/cert.pem \ --key /path/to/key.key ``` -------------------------------- ### T-API Request Example Source: https://developer.tbank.ru/docs/api/t-api Example of a GET request to the T-API root endpoint using cURL. Ensure you replace with your actual authorization token. ```bash GET / HTTP/1.1 curl --location 'https://business.tbank.ru/openapi/api/' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-chargebacks Example of how to make a GET request to the chargebacks endpoint using cURL. Ensure to replace with your actual API token. ```cURL curl --location 'https://business.tbank.ru/openapi/api/v1/chargebacks' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-application-application-id-additional-product Use this cURL command to make a GET request to retrieve the list of additional products. Ensure you replace placeholders like and :applicationId with your actual values. ```bash curl --location 'https://gost-openapi.tbank.ru/api/v1/application/:applicationId/additionalProduct' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' \ --cert /path/to/cert.pem \ --key /path/to/key.пакет ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-2-reference Example of how to make a GET request to the SPDD/KSPDD API using cURL. Ensure you replace with your actual API token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v2/openapi/reference' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Go Request Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-currency-contracts-openapi-registration Example of how to make a POST request to the currency contract registration API using Go. This demonstrates setting up the request body, headers, and making the HTTP call. ```go package main import ( "bytes" "net/http" "time" ) func main() { payload := []byte(`{ "openApiApplicationId": "string", "residentInfo": { "inn": "string", "kpp": "string" }, "contractInfo": { "contractSubject": 0, "contractType": 0, "supply": 0, "estateType": 0, "amount": 0, "currencyCode": "string", "liabilitiesFinishDate": "2026-06-17", "attachments": [{ "documentId": 0, "documentName": "string", "version": 0 }], "contractDate": "2026-06-17", "exchangeRateEffectiveDate": "2026-06-17", "counterparty": [{ "name": "string", "countryCode": "string", "signAffiliation": "YES" }], "contractNumber": "string" } }`) req, err := http.NewRequest("POST", "https://secured-openapi.tbank.ru/api/v1/currency/contracts/openapi/registration", bytes.NewBuffer(payload)) req.Header.Set("Content-Type", "application/json") req.Header.Set("Signature", "Signature keyId=\"\",algorithm=\"\",headers=\"\",signature=\"""") req.Header.Set("X-Request-Id", "") req.Header.Set("Date", "Tue, 17 Jun 2026 10:30:00 GMT") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() } ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-2-bank-accounts Example of how to make a GET request to the /api/v2/bank-accounts endpoint using cURL. Ensure you replace with your actual API token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v2/bank-accounts' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Go Example for Clarification Request Source: https://developer.tbank.ru/docs/api/post-api-v-1-deals-clarification-request Illustrates how to make a POST request to create a clarification request using Go. Ensure proper handling of request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { payload := map[string]interface{}{ "amount": 123.45, "russianCounterparty": map[string]interface{}{ "nameRus": "Компания", "nameEng": "Company Rus", "contacts": "123-123", "inn": "1234567" }, "chineseCounterparty": map[string]interface{}{ "nameEng": "Company Eng", "contacts": "123-123" }, "text": "Уточнить сумму сделки.", "contracts": []interface{}{ map[string]interface{}{ "number": "123abc", "date": "2025-07-29", "unk": "00000000/0000/0000/0/0" } }, "invoices": []interface{}{ map[string]interface{}{ "number": "123abc", "date": "2025-07-29" } } } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", "https://gost-openapi.tbank.ru/api/v1/partner-payments-china-pay/deals/{dealNumber}/clarification/request", bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Idempotency-Key", "") req.Header.Set("X-Request-Id", "") req.Header.Set("Authorization", "Bearer ") req.Header.Set("Content-Type", "application/json") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) } ``` -------------------------------- ### Example Go Request Source: https://developer.tbank.ru/docs/api/post-api-v-1-cashback-get This Go code snippet shows how to make a POST request to the cashback pre-calculation API, including setting the request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { payload := map[string]interface{}{ "terminalKey": "TBankTest", "amount": 1400, } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshalling JSON:", err) return } resp, err := http.Post("https://secured-openapi.tbank.ru/api/v1/loyalties/cashbacks/get", "application/json", bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() // Process the response body here fmt.Println("Status Code:", resp.StatusCode) } ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-individual-subscription Example of how to make a GET request to the subscription endpoint using cURL. Ensure you replace '' with your actual API token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v1/individual/subscription' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Go Request Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-credit-products-broker-id-applications-applicationid-documents-check Example of making a POST request to the document check endpoint using Go. This snippet demonstrates setting up the request body, headers, and making the HTTP call. ```go package main import ( "bytes" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/api/v1/credit-products/{brokerId}/applications/{applicationId}/documents/check" payload := []byte(`{ "eventType": "SIGNING" }`) // JSON Payload req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload)) if err != nil { fmt.Println(err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("X-Request-Id", "") // Replace with a valid UUID // Add Authorization header here (e.g., Bearer token or mTLS) client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() fmt.Println("response Status:", res.Status) } ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-4-bank-accounts Example of how to make a GET request to the bank accounts API using cURL. Ensure you replace with your actual API token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v4/bank-accounts' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Create Deal Java Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-nominal-accounts-deals Example of how to create a deal using Java. This snippet shows how to construct the HTTP request with JSON payload and headers. ```java import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; public class CreateDeal { public static void main(String[] args) { try { URL url = new URL("https://secured-openapi.tbank.ru/api/v1/nominal-accounts/deals"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Idempotency-Key", ""); // Replace with a valid UUID String jsonPayload = "{\"accountNumber\": \"40702810110011000777\"}"; try (OutputStream os = connection.getOutputStream()) { byte[] input = jsonPayload.getBytes(StandardCharsets.UTF_8); os.write(input, 0, input.length); } int responseCode = connection.getResponseCode(); System.out.println("POST Response Code: " + responseCode); // You can read the response body here using connection.getInputStream() } catch (IOException e) { e.printStackTrace(); } } } ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-card Example of how to make a GET request to the /api/v1/card endpoint using cURL. Ensure you replace with your actual Bearer API Token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v1/card' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/api-v-1-shopping-get-chats Example of how to make a GET request to the /api/v1/shopping/shops/{shopId}/chats endpoint using cURL. Includes authorization headers and certificate paths. ```bash curl --location 'https://secured-openapi.tbank.ru/api/v1/shopping/shops/:shopId/chats' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' \ --cert /path/to/cert.pem \ --key /path/to/key.только ``` -------------------------------- ### Go Example for Accepting Offer Source: https://developer.tbank.ru/docs/api/post-api-v-1-bank-guarantees-orders-order-id-accept-offer This Go code snippet demonstrates how to accept a bank guarantee offer using the API. Ensure you handle the request body and headers correctly. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://business.tbank.ru/openapi/api/v1/bank-guarantees/orders/{orderId}/accept-offer" payload := map[string]interface{}{ "documentSignatures": []map[string]string{ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "signatureBase64": "string" }, }, } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Authorization", "Bearer ") req.Header.Set("Content-Type", "application/json") req.Header.Set("X-Request-Id", "") // Optional: Add a unique request ID client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // Handle response body if necessary } ``` -------------------------------- ### Get Employee List Response (200 OK) Source: https://developer.tbank.ru/docs/api/salary-get-employees-list Example of a successful response (200 OK) from the Get Employee List API, containing employee details. ```json { "employees": [{ "id": 217, "status": "DRAFT", "firstName": "Иван", "lastName": "Иванов", "middleName": "Иванович", "birthDate": "1967-12-25", "phones": [{ "type": "Мобильный", "number": "+72565121024" } ], "documents": [{ "type": "Паспорт", "serial": "1234", "number": "123456", "date": "2015-05-09", "organization": "ФМС", "division": "123-123", "expireDate": "2025-05-09" } ], "jobInfo": { "position": "программист" }, "bankInfo": { "accountNumber": "40802123456789012345", "agreementNumber": "1234567890" } }] } ``` -------------------------------- ### Add Coupon Payment Schedule Go Example Source: https://developer.tbank.ru/docs/api/invest-axiom-providers-api-v-1-brokerage-coupon-create-post Example of how to make a POST request to add a coupon payment schedule using Go. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/invest/axiom/providers-api/v1/brokerage/coupon/create/" payload := map[string]interface{}{ "amount": 0, "couponNumber": 0, "currency": "RUB", "isInvalid": true, "isin": "string", "percent": 0, "pmntDate": "2026-06-17T09:18:12.230Z", "realPmntDate": "2026-06-17T09:18:12.230Z", "updateDate": "2026-06-17T09:18:12.230Z" } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("X-Request-Id", "") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // Process response body if needed } ``` -------------------------------- ### Example API Response (200 OK) Source: https://developer.tbank.ru/docs/api/get-api-v-1-application-application-id-additional-product This is a successful response (200 OK) containing details about available additional products, including their IDs, names, sums, terms, and associated bank requisites. ```json { "ndsRate": 5, "ndsList": [ 5, 7, 20 ], "additionalProducts": [{ "id": "edf8fd15-7374-40e7-b765-45a3cc06cd10", "name": "Лечимся и молодеем стандарт", "sum": 24000, "term": 24, "group": "ДМС", "groupId": "dms", "requisite": { ... }}, "id": "0000e243-cc5f-4d2d-bbb2-5832927a55bb", "companyName": "ООО «Страховая компания»", "bik": "9611925", "bankName": "АО «Т-Банк»", "currentAccount": "30101810400000000000", "correspondentAccount": "30101810400000000000", "inn": "7707000000", "kpp": "770700087" } }, { "id": "6dcef555-6273-4fc2-bb16-0864ad958ad4", "name": "Лечимся и молодеем премиум", "sum": 36000, "term": 24, "group": "ДМС", "groupId": "dms", "requisite": { ... } "id": "0000e243-cc5f-4d2d-bbb2-5832927a55bb", "companyName": "ООО «Страховая компания»", "bik": "9611925", "bankName": "АО «Т-Банк»", "currentAccount": "30101810400000000000", "correspondentAccount": "30101810400000000000", "inn": "7707000000", "kpp": "770700087" } } ] } ``` -------------------------------- ### cURL Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-1-individual-foreignagent-status Example of how to make a GET request to the foreign agent status API using cURL. Ensure you replace `` with your actual API token. ```bash curl --location 'https://business.tbank.ru/openapi/api/v1/individual/foreignagent/status' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Create Deal cURL Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-nominal-accounts-deals Example of how to create a deal using cURL. Remember to include the 'Idempotency-Key' header. ```bash curl -X POST \ https://secured-openapi.tbank.ru/api/v1/nominal-accounts/deals \ -H 'Idempotency-Key: ' \ -H 'Content-Type: application/json' \ -d '{ "accountNumber": "40702810110011000777" }' ``` -------------------------------- ### Save Entity Response Example (JSON) Source: https://developer.tbank.ru/docs/api/knap-save-entity This example shows a successful response from the API after saving an entity, containing the unique identifier (GUID) of the created or updated object. ```json { "guid": "123e4567-e89b-12d3-a456-426614174000" } ``` -------------------------------- ### Go Example for POST /api/v1/loans Source: https://developer.tbank.ru/docs/api/post-loan-info This Go code snippet shows how to make a POST request to the /api/v1/loans endpoint, including setting headers and the request body. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/api/v1/loans" payload := map[string]interface{}{ "uuid": "3f611868-4ca1-11f2-89f2-78a752caa5b9-6", "account": "9258696641", "isActive": true, "requestSystem": "eZaim", "outstanding": "40182.48", "scheduledPayments": []map[string]interface{}{ { "date": "2011-12-03T10:15:30+01:00", "amount": "3500.21" } } } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Authorization", "Bearer ") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) } ``` -------------------------------- ### PHP Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-3-card Example of how to make a GET request to the /api/v3/company/card endpoint using PHP with cURL. This snippet demonstrates setting cURL options for headers, certificate, and key. ```php ' ]; curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); // For mTLS: // curl_setopt($curl, CURLOPT_SSLCERT, '/path/to/cert.pem'); // curl_setopt($curl, CURLOPT_SSLKEY, '/path/to/key.key'); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #" . $err; } else { echo $response; } ?> ``` -------------------------------- ### Java Request Example Source: https://developer.tbank.ru/docs/api/get-api-v-3-card Example of how to make a GET request to the /api/v3/company/card endpoint using Java. This snippet shows how to set up the HTTP client, request headers, and handle the response. ```java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; public class GetCompanyCardList { public static void main(String[] args) throws IOException, InterruptedException { HttpClient client = HttpClient.newBuilder() .version(HttpClient.Version.HTTP_2) .connectTimeout(Duration.ofSeconds(10)) .build(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://secured-openapi.tbank.ru/api/v3/company/card")) .header("Accept", "application/json") .header("Authorization", "Bearer ") // .header("X-Request-Id", "your-uuid") // .sslContext(sslContext) // For mTLS .GET() .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println("Status Code: " + response.statusCode()); System.out.println("Response Body: " + response.body()); } } ``` -------------------------------- ### Go Example for File Upload Source: https://developer.tbank.ru/docs/api/client-profile-invest-axiom-providers-api-v-1-files-upload-post This Go code snippet demonstrates how to make a file upload request using the API. It includes setting up the request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://secured-openapi.tbank.ru/invest/axiom/providers-api/v1/files/upload/" payload := map[string]string{ "base64FileContent": "aGVsbG8gd29ybGQ=", "fileExtension": "txt", "fileName": "test_text", "fileUuid": "2f36b312-ca7a-4746-b3f3-5075e4ec4984", } jsonPayload, err := json.Marshal(payload) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonPayload)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) // You can read and process the response body here } ``` -------------------------------- ### Go Request Example Source: https://developer.tbank.ru/docs/api/post-api-v-1-pos-applications-confirm-application This Go code snippet shows how to make a POST request to the confirm application endpoint. It includes setting the request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://gost-openapi.tbank.ru/api/v1/pos/applications/{applicationId}/confirm" method := "POST" requestBody, err := json.Marshal(map[string]string{ "signingType": "Bank", }) if err != nil { fmt.Println("Error marshaling JSON:", err) return } client := &http.Client{} req, err := http.NewRequest(method, url, bytes.NewBuffer(requestBody)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Authorization", "Bearer ") resp, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() fmt.Println("Status Code:", resp.StatusCode) } ```