### Start Ownership Claim Process - Go Example Source: https://docs.zrobank.io/baas/endpoints/approve-ownership-claim-start-process-rest-controller-execute-v-1 A Go language example demonstrating how to start the ownership claim process for a Pix Key. It uses the standard 'net/http' package to construct and send the POST request. ```go package main import ( "fmt" "io/ioutil" "net/http" "strings" ) func main() { url := "https://api-baas-hml.zrobank.xyz/v1/pix/keys/:id/claims/start" token := "" client := &http.Client{} req, err := http.NewRequest("POST", url, nil) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Add("Accept", "application/json") req.Header.Add("Authorization", "Bearer "+token) res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println("Error reading response body:", err) return } fmt.Println("Status Code:", res.StatusCode) fmt.Println("Response Body:", string(body)) } ``` -------------------------------- ### Start Ownership Claim Process - Node.js Example Source: https://docs.zrobank.io/baas/endpoints/approve-ownership-claim-start-process-rest-controller-execute-v-1 Illustrates how to start the ownership claim process for a Pix Key using Node.js. This example uses the 'axios' library to make the HTTP POST request. ```javascript const axios = require('axios'); const url = 'https://api-baas-hml.zrobank.xyz/v1/pix/keys/:id/claims/start'; const token = ''; axios.post(url, null, { headers: { 'Accept': 'application/json', 'Authorization': `Bearer ${token}` } }) .then(response => { console.log(response.status); console.log(response.data); }) .catch(error => { console.error(error); }); ``` -------------------------------- ### Start Ownership Claim Process - C# Example Source: https://docs.zrobank.io/baas/endpoints/approve-ownership-claim-start-process-rest-controller-execute-v-1 A C# example demonstrating the initiation of the ownership claim process for a Pix Key. It uses the 'HttpClient' class to send a POST request. ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class StartClaim { public static async Task Main(string[] args) { using (var client = new HttpClient()) { var url = "https://api-baas-hml.zrobank.xyz/v1/pix/keys/:id/claims/start"; var token = ""; client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token); var response = await client.PostAsync(url, null); Console.WriteLine($"Status Code: {response.StatusCode}"); var responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Response Body: {responseBody}"); } } } ``` -------------------------------- ### Start Ownership Claim Process - Java Example Source: https://docs.zrobank.io/baas/endpoints/approve-ownership-claim-start-process-rest-controller-execute-v-1 Shows a Java implementation for initiating the ownership claim process of a Pix Key. This example uses the Apache HttpClient library to perform the POST request. ```java import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; public class StartClaim { public static void main(String[] args) throws Exception { try (CloseableHttpClient client = HttpClients.createDefault()) { HttpPost request = new HttpPost("https://api-baas-hml.zrobank.xyz/v1/pix/keys/:id/claims/start"); request.setHeader("Accept", "application/json"); request.setHeader("Authorization", "Bearer "); try (CloseableHttpResponse response = client.execute(request)) { System.out.println(response.getStatusLine().getStatusCode()); if (response.getEntity() != null) { System.out.println(EntityUtils.toString(response.getEntity())); } } } } } ``` -------------------------------- ### Get Onboarding Documents (Java) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-onboarding-document-rest-controller-execute-v-1 Java code example for retrieving onboarding documents. This snippet demonstrates using Apache HttpClient to send a GET request, setting the bearer token and other required headers. ```Java import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; public class GetOnboardingDocuments { public static void main(String[] args) { String url = "https://api-baas-hml.zrobank.xyz/v1/users/onboardings/{id}/documents"; String token = ""; // Replace with your actual token String nonce = ""; // Replace with a valid UUID try (CloseableHttpClient httpClient = HttpClients.createDefault()) { HttpGet request = new HttpGet(url); request.addHeader("Accept", "application/json"); request.addHeader("Authorization", "Bearer " + token); request.addHeader("Nonce", nonce); request.addHeader("X-Lang", "en-US"); // Optional: pt-BR or en-US // Add other optional headers like X-Product-UUID if needed try (CloseableHttpResponse response = httpClient.execute(request)) { HttpEntity entity = response.getEntity(); if (entity != null) { String result = EntityUtils.toString(entity); if (response.getStatusLine().getStatusCode() == 200) { System.out.println(result); // Process the JSON response body here } else { System.err.println("Error: " + response.getStatusLine().getStatusCode() + " - " + result); } } } } catch (Exception e) { e.printStackTrace(); } } } ``` -------------------------------- ### Start Ownership Claim Process - Python Example Source: https://docs.zrobank.io/baas/endpoints/approve-ownership-claim-start-process-rest-controller-execute-v-1 Provides a Python example for initiating the ownership claim process for a Pix Key. It utilizes the 'requests' library to send a POST request with the necessary headers and URL. ```python import requests url = "https://api-baas-hml.zrobank.xyz/v1/pix/keys/:id/claims/start" headers = { "Accept": "application/json", "Authorization": "Bearer " } response = requests.post(url, headers=headers) print(response.status_code) print(response.json()) ``` -------------------------------- ### Get Onboarding Documents (Node.js) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-onboarding-document-rest-controller-execute-v-1 Node.js example for fetching onboarding documents. This snippet uses the 'axios' library to send a GET request, demonstrating how to include the bearer token and other required headers. ```Node.js const axios = require('axios'); const apiUrl = 'https://api-baas-hml.zrobank.xyz/v1/users/onboardings/:id/documents'; const token = ''; // Replace with your actual token const nonce = ''; // Replace with a valid UUID axios.get(apiUrl, { headers: { 'Accept': 'application/json', 'Authorization': `Bearer ${token}`, 'Nonce': nonce, 'X-Lang': 'en-US' // Optional: pt-BR or en-US // Add other optional headers like X-Product-UUID if needed } }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error fetching documents:', error.response ? error.response.data : error.message); }); ``` -------------------------------- ### Start Ownership Claim Process - PHP Example Source: https://docs.zrobank.io/baas/endpoints/approve-ownership-claim-start-process-rest-controller-execute-v-1 This PHP snippet shows how to start the ownership claim process for a Pix Key. It uses cURL to send the POST request with the necessary headers. ```php '; $headers = [ 'Accept: application/json', 'Authorization: Bearer ' . $token ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } else { echo 'Status Code: ' . curl_getinfo($ch, CURLINFO_HTTP_CODE) . "\n"; echo 'Response Body: ' . $response; } curl_close($ch); ?> ``` -------------------------------- ### Get Card Tracking Request Examples Source: https://docs.zrobank.io/paas/endpoints/get-card-tracking-rest-controller-execute Examples of how to call the Get Card Tracking API endpoint using different programming languages and tools. These examples show how to construct the request with necessary headers and parameters. ```curl curl -L 'https://docs.zrobank.io/cards/:id/tracking' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` ```python # Python example would go here ``` ```go // Go example would go here ``` ```nodejs // Node.js example would go here ``` ```ruby # Ruby example would go here ``` ```csharp // C# example would go here ``` ```php // PHP example would go here ``` ```java // Java example would go here ``` ```powershell # PowerShell example would go here ``` -------------------------------- ### List Onboarding Documents (Go) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-onboarding-document-rest-controller-execute-v-1 Go language example for retrieving onboarding documents. This code snippet shows how to construct the HTTP request, set headers including the bearer token, and handle the JSON response. ```Go package main import ( "fmt" "io/ioutil" "net/http" "strings" ) func main() { url := "https://api-baas-hml.zrobank.xyz/v1/users/onboardings/:id/documents" token := "" // Replace with your actual token nonce := "" // Replace with a valid UUID client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Add("Accept", "application/json") req.Header.Add("Authorization", "Bearer "+token) req.Header.Add("Nonce", nonce) rereq.Header.Add("X-Lang", "en-US") // Optional: pt-BR or en-US // Add other optional headers like X-Product-UUID if needed resp, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response body:", err) return } if resp.StatusCode == 200 { fmt.Println(string(body)) // Process the JSON response body here } else { fmt.Printf("Error: %d %s\n", resp.StatusCode, string(body)) } } ``` -------------------------------- ### Error Handling Example Source: https://docs.zrobank.io/baas/api-overview/pagination Example of an error response when the payment date period end is before the start date. ```APIDOC ## Error Response Example ### Description This example demonstrates an error response when the `payment_date_period_end` is before the `payment_date_period_start`. ### Response #### Error Response (400 Bad Request) - **success** (boolean) - Indicates if the request was successful (false in case of error). - **data** (null) - Null when an error occurs. - **error** (string) - The type of error (e.g., 'USER', 'VALIDATION'). - **message** (string) - A human-readable message describing the error. - **code** (string) - An error code. #### Response Example ```json { "success": false, "data": null, "error": "USER", "message": "The field payment_date_period_end must be after the start date.", "code": "VALIDATION" } ``` ``` -------------------------------- ### Get Operation Statement - JSON Response Example Source: https://docs.zrobank.io/caas/endpoints/v-3-get-all-report-operation-statement-rest-controller-execute-v-3 This is an example of a successful JSON response when retrieving operation statement data. It includes details about transactions, balances, and pagination. ```json { "data": [ { "id": "23bf3d55-b336-4ca2-be4b-4b8df3cdd94a", "fee": 1, "value": 1, "updated_balance": 1, "previous_balance": 1, "description": "Get statement", "created_at": "2026-03-28T14:05:28.743Z", "updated_at": "2026-03-28T14:05:28.743Z", "transaction_id": "2026-03-28T14:05:28.743Z", "transaction_created_at": "2026-03-28T14:05:28.743Z", "transaction_created_at_unixtime": 1759337318878533, "currency_id": 1, "currency_symbol": "BRL", "transaction_type_id": 1, "transaction_type_tag": "PIXSEND", "transaction_type": "D", "owner_wallet_account_uuid": "23bf3d55-b336-4ca2-be4b-4b8df3cdd94a", "beneficiary_wallet_account_uuid": "23bf3d55-b336-4ca2-be4b-4b8df3cdd94a", "operation_ref_id": "23bf3d55-b336-4ca2-be4b-4b8df3cdd94a", "chargeback_id": "23bf3d55-b336-4ca2-be4b-4b8df3cdd94a", "merchant_id": "Merchant unique defined" } ], "has_next_page": true, "page_state": "string" } ``` -------------------------------- ### Get File URL by ID - API Request Example Source: https://docs.zrobank.io/paas/endpoints/v-2-get-file-url-by-id-rest-controller-execute-v-2 Demonstrates how to make an API request to get a file URL. This includes path and header parameters required for the request. ```http GET /v2/storage/files/:id/url HTTP/1.1 Host: docs.zrobank.io Accept: application/json Authorization: Bearer Nonce: x-lang: en-US x-product-uuid: x-product-target-user-uuid: ``` -------------------------------- ### Get Legal Representative Document (Node.js) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-by-id-legal-representative-document-rest-controller-execute-v-1 Example of how to retrieve a legal representative document using Node.js with the 'axios' library. This code shows how to construct and send the GET request. ```javascript const axios = require('axios'); const url = 'https://api-baas-hml.zrobank.xyz/v1/users/legal-representatives/:id/documents/:doc_id'; const token = ''; const nonce = ''; axios.get(url, { headers: { 'Accept': 'application/json', 'Authorization': `Bearer ${token}`, 'Nonce': nonce } }) .then(response => { console.log(response.data); }) .catch(error => { console.error(`Error: ${error.response.status}`); }); ``` -------------------------------- ### Get Legal Representative Document (cURL) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-by-id-legal-representative-document-rest-controller-execute-v-1 Example of how to retrieve a legal representative document using cURL. This command sends a GET request to the specified endpoint with necessary headers. ```bash curl -L 'https://api-baas-hml.zrobank.xyz/v1/users/legal-representatives/:id/documents/:doc_id' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### C# Example for Finalizing Legal Person Onboarding Source: https://docs.zrobank.io/baas/endpoints/v-1-finalize-legal-person-onboarding-rest-controller-execute-v-1 An example in C# using HttpClient to make the POST request for finalizing legal person onboarding. It demonstrates setting headers and sending the request. ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class OnboardingClient { public static async Task FinalizeOnboarding(string id, string token) { using (var client = new HttpClient()) { client.BaseAddress = new Uri("https://api-baas-hml.zrobank.xyz"); client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token); var response = await client.PostAsync($"/v1/users/onboardings/legal-person/{id}/finalize", null); var responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } } ``` -------------------------------- ### Get Terms of Use - Response Schema Example Source: https://docs.zrobank.io/caas/endpoints/get-terms-of-use-rest-controller-execute This example shows the structure of a successful response from the /card/onboarding/terms-of-use endpoint. It returns an array of objects, each containing the document type and its URL. ```json [ { "type": "PRIVACY_POLICY", "document_url": "https://example.com/terms-of-use.pdf" } ] ``` -------------------------------- ### Java Example for Finalizing Legal Person Onboarding Source: https://docs.zrobank.io/baas/endpoints/v-1-finalize-legal-person-onboarding-rest-controller-execute-v-1 A Java example using Apache HttpClient to send a POST request for finalizing legal person onboarding. It includes setting headers and handling the response. ```java import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; public class OnboardingClient { public static void finalizeOnboarding(String id, String token) { try (CloseableHttpClient client = HttpClients.createDefault()) { HttpPost request = new HttpPost("https://api-baas-hml.zrobank.xyz/v1/users/onboardings/legal-person/" + id + "/finalize"); request.setHeader("Accept", "application/json"); request.setHeader("Authorization", "Bearer " + token); // No request body needed for this POST request // request.setEntity(new StringEntity("{}")); var response = client.execute(request); var responseBody = EntityUtils.toString(response.getEntity()); System.out.println("Status Code: " + response.getStatusLine().getStatusCode()); System.out.println(responseBody); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { // Example usage: // finalizeOnboarding("your_onboarding_id", "your_bearer_token"); } } ``` -------------------------------- ### Create Wallet - Node.js Example Source: https://docs.zrobank.io/baas/endpoints/v-1-create-wallet-rest-controller-execute-v-1 Example of how to create a wallet using Node.js with the 'axios' library. This demonstrates making a POST request with necessary headers and body. ```javascript const axios = require('axios'); const url = 'https://api-baas-hml.zrobank.xyz/v1/operations/wallets'; const headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer ', 'x-transaction-uuid': 'your-transaction-uuid', 'nonce': 'your-nonce' }; const data = { 'name': 'Default wallet' }; axios.post(url, data, { headers: headers }) .then(response => { console.log(response.status); console.log(response.data); }) .catch(error => { console.error(error); }); ``` -------------------------------- ### Get Quotation by Conversion ID (C#) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-quotation-by-conversion-id-rest-controller-execute-v-1 This C# example shows how to consume the Zrobank API to get quotation information. It utilizes the `HttpClient` class to send a GET request, including the necessary authentication and identification headers, and processes the JSON response. ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class ZrobankApiClient { private static readonly HttpClient client = new HttpClient(); public static async Task GetQuotationAsync(string id, string token, string nonce) { client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token}"); client.DefaultRequestHeaders.Add("nonce", nonce); client.DefaultRequestHeaders.Add("Accept", "application/json"); string url = $"https://api-baas-hml.zrobank.xyz/v1/otc/conversions/{id}/quotations"; try { HttpResponseMessage response = await client.GetAsync(url); response.EnsureSuccessStatusCode(); // Throws if HTTP status code is not 2xx string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } catch (HttpRequestException e) { Console.WriteLine($"Request error: {e.Message}"); } } // Example usage: // public static async Task Main(string[] args) // { // await GetQuotationAsync("YOUR_CONVERSION_ID", "YOUR_TOKEN", "YOUR_NONCE_UUID"); // } } ``` -------------------------------- ### Get Client Accounts using cURL Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-client-account-rest-controller-execute-v-1 Example of how to retrieve client accounts using cURL. This command demonstrates making a GET request to the ZroBank API endpoint with necessary headers. ```curl curl -L 'https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/:client_id/accounts' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### POST /v1/pix/keys/:id/portabilities/start Source: https://docs.zrobank.io/baas/endpoints/approve-portability-claim-start-process-rest-controller-execute-v-1 Initiates the portability start process for a specific Pix key. ```APIDOC ## POST /v1/pix/keys/:id/portabilities/start ### Description Initiate a portability claim start process. If the key state is PORTABILITY_PENDING, the process is sent to DICT, and the key state transitions to PORTABILITY_OPENED. ### Method POST ### Endpoint https://api-baas-hml.zrobank.xyz/v1/pix/keys/:id/portabilities/start ### Parameters #### Path Parameters - **id** (string) - Required - Pix Key ID. #### Header Parameters - **x-wallet-uuid** (string) - Optional - Sender Wallet UUID. - **nonce** (string) - Required - UUID (v4) used to uniquely identify the request. - **x-lang** (string) - Optional - Preferred language (pt-BR, en-US). - **x-product-uuid** (string) - Optional - UUID (v4) of the product. - **x-product-target-user-uuid** (string) - Optional - UUID (v4) of the user on whose behalf the request runs. ### Request Example { "id": "pix-key-uuid-123" } ### Response #### Success Response (200) - **key** (object) - Returns the key object with state PORTABILITY_OPENED. #### Response Example { "id": "pix-key-uuid-123", "state": "PORTABILITY_OPENED" } ``` -------------------------------- ### Go Example for Finalizing Legal Person Onboarding Source: https://docs.zrobank.io/baas/endpoints/v-1-finalize-legal-person-onboarding-rest-controller-execute-v-1 Provides a Go code snippet for making the API request to finalize legal person onboarding. It illustrates setting up the HTTP client, request, and headers. ```go package main import ( "bytes" "fmt" "net/http" ) func main() { url := "https://api-baas-hml.zrobank.xyz/v1/users/onboardings/legal-person/{id}/finalize" headers := map[string]string{ "Accept": "application/json", "Authorization": "Bearer " } req, err := http.NewRequest("POST", url, bytes.NewBuffer(nil)) if err != nil { fmt.Println("Error creating request:", err) return } for key, value := range headers { req.Header.Set(key, value) } 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) } ``` -------------------------------- ### Get Legal Representatives - JSON Response Example Source: https://docs.zrobank.io/baas/endpoints/v-2-get-all-legal-representative-rest-controller-execute-v-2 Provides an example of a successful JSON response when retrieving legal representatives. It includes pagination details and an array of legal representative objects. ```json { "page": 1, "page_size": 20, "page_total": 20, "total": 100, "data": [ { "id": "d13ca8f2-4f0a-4a3d-b81e-5ee9c8bb8c56", "document": { "id": "a1df6c59-359d-4ec1-b7da-98dcc555dd76", "type": "CPF", "number": "02465676008", "country_of_issue": "BRA" }, "address": { "id": "7b5e8c47-b6a3-4e29-942f-7f5ec06b26a2", "zip_code": "60123456", "street": "Main Street", "number": 123, "neighborhood": "Downtown", "city": "São Paulo", "federative_unit": "SP", "country": "BRA", "complement": "Apt 12" }, "name": "Jane Doe", "representor_type": "PARTNER", "person_type": "NATURAL_PERSON", "income": 100000, "patrimony": 5000000, "participation_percentage": 35.5, "pep": false, "is_public_server": false, "phone_number": "5511955551234", "email": "partner@example.com", "registration_update_date": "2024-02-01", "birth_date": "1980-01-15", "relationship_start_date": "2020-05-01", "relationship_end_date": "2024-01-01", "created_at": "2026-03-26T14:02:59.220Z", "shareholder_id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d" } ] } ``` -------------------------------- ### Initiate Pix Devolution (Go) Source: https://docs.zrobank.io/paas/endpoints/create-pix-devolution-rest-controller-execute Go language example for initiating a Pix devolution. This code demonstrates setting up the HTTP request with headers and a JSON payload. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "https://docs.zrobank.io/pix/devolutions" token := "" payload := map[string]interface{}{ "operation_id": "f6e2e084-29b9-4935-a059-5473b13033aa", "amount": 2300, "description": "User defined description", "merchant_id": "User defined merchant ID" } 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("Accept", "application/json") req.Header.Set("Authorization", "Bearer "+token) req.Header.Set("x-transaction-uuid", "your-transaction-uuid") req.Header.Set("nonce", "your-nonce") client := &http.Client{} 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) var result map[string]interface{} if err := json.NewDecoder(resp.Body).Decode(&result); err != nil { fmt.Println("Error decoding response:", err) return } fmt.Println("Response Body:", result) } ``` -------------------------------- ### Create Wallet - Python Example Source: https://docs.zrobank.io/baas/endpoints/v-1-create-wallet-rest-controller-execute-v-1 Example of how to create a wallet using Python's requests library. This shows how to construct the request with headers and the JSON payload. ```python import requests url = "https://api-baas-hml.zrobank.xyz/v1/operations/wallets" headers = { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer ", "x-transaction-uuid": "your-transaction-uuid", "nonce": "your-nonce" } payload = { "name": "Default wallet" } response = requests.post(url, headers=headers, json=payload) print(response.status_code) print(response.json()) ``` -------------------------------- ### Create Wallet - cURL Example Source: https://docs.zrobank.io/baas/endpoints/v-1-create-wallet-rest-controller-execute-v-1 Example of how to create a wallet using cURL. This demonstrates the POST request to the wallets endpoint with required headers and the JSON body. ```bash curl -L 'https://api-baas-hml.zrobank.xyz/v1/operations/wallets' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' \ -d '{ \ "name": "Default wallet" \ }' ``` -------------------------------- ### Get Client by ID API Request Examples Source: https://docs.zrobank.io/baas/endpoints/v-1-get-client-by-id-rest-controller-execute-v-1 Examples of how to fetch a client's information using their ID via the ZroBank API. Includes cURL and various programming language SDKs. ```curl curl -L 'https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/:id' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` ```python import requests url = "https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/{id}" headers = { "Accept": "application/json", "Authorization": "Bearer " } response = requests.get(url, headers=headers) print(response.json()) ``` ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/{id}", nil) if err != nil { fmt.Println(err) return } req.Header.Add("Accept", "application/json") req.Header.Add("Authorization", "Bearer ") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) } ``` ```nodejs const https = require('https'); const options = { hostname: 'api-baas-hml.zrobank.xyz', port: 443, path: '/v1/crossborder/clients/:id', method: 'GET', headers: { 'Accept': 'application/json', 'Authorization': 'Bearer ' } }; const req = https.request(options, (res) => { let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { console.log(JSON.parse(data)); }); }); req.on('error', (error) => { console.error(error); }); req.end(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/:id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Accept"] = "application/json" request["Authorization"] = "Bearer " response = http.request(request) puts response.read_body ``` ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class Example { public static async Task Main(string[] args) { var client = new HttpClient(); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/{id}"), }; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); HttpResponseMessage response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); } } ``` ```php " ]); $response = curl_exec($curl); curl_close($curl); echo $response; ?> ``` ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; public class Example { public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/{id}")) .header("Accept", "application/json") .header("Authorization", "Bearer ") .GET() .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ```powershell Invoke-RestMethod -Uri "https://api-baas-hml.zrobank.xyz/v1/crossborder/clients/:id" -Method Get -Headers @{"Accept"="application/json"; "Authorization"="Bearer "} ``` -------------------------------- ### PowerShell Example: List Withdraw Settings Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-user-withdraw-setting-rest-controller-execute-v-1 Example of how to retrieve user withdraw settings using PowerShell. This code demonstrates making a GET request to the Zrobank API, including necessary headers. ```powershell $url = "https://api-baas-hml.zrobank.xyz/v1/utils/user-withdraw-settings" $headers = @{ "Accept" = "application/json" "Authorization" = "Bearer " "nonce" = "YOUR_NONCE_UUID" } $response = Invoke-RestMethod -Uri $url -Method Get -Headers $headers Write-Host $response ``` -------------------------------- ### Retrieve Legal Person Onboarding Document (Go) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-by-id-legal-person-onboarding-document-rest-controller-execute-v-1 This Go snippet demonstrates how to fetch a legal person onboarding document using an HTTP GET request. It includes setting up the request, headers, and handling the JSON response. Ensure you replace placeholders with actual values. ```go package main import ( "fmt" "io/ioutil" "net/http" ) func main() { url := "https://api-baas-hml.zrobank.xyz/v1/users/onboardings/legal-person/{id}/documents/{doc_id}" client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Add("Accept", "application/json") req.Header.Add("Authorization", "Bearer ") resp, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response body:", err) return } fmt.Println(string(body)) } ``` -------------------------------- ### PHP Example: List Withdraw Settings Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-user-withdraw-setting-rest-controller-execute-v-1 Example of how to retrieve user withdraw settings using PHP. This code demonstrates making a GET request to the Zrobank API, including necessary headers. ```php ', 'nonce: YOUR_NONCE_UUID' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } else { echo $response; } curl_close($ch); ?> ``` -------------------------------- ### Retrieve Onboarding Documents (cURL) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-onboarding-document-rest-controller-execute-v-1 Example using cURL to fetch onboarding documents. This command includes the necessary URL, headers for content type and authorization, and demonstrates how to pass the bearer token. ```cURL curl -L 'https://api-baas-hml.zrobank.xyz/v1/users/onboardings/:id/documents' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### C# Example: List Withdraw Settings Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-user-withdraw-setting-rest-controller-execute-v-1 Example of how to retrieve user withdraw settings using C#. This code demonstrates making a GET request to the Zrobank API, including necessary headers. ```csharp using System; using System.Net.Http; using System.Threading.Tasks; public class WithdrawSettings { public static async Task Main(string[] args) { using (var client = new HttpClient()) { var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://api-baas-hml.zrobank.xyz/v1/utils/user-withdraw-settings") }; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); request.Headers.Add("nonce", "YOUR_NONCE_UUID"); HttpResponseMessage response = await client.SendAsync(request); string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(response.StatusCode); Console.WriteLine(responseBody); } } } ``` -------------------------------- ### Fetch Onboarding Documents (C#) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-onboarding-document-rest-controller-execute-v-1 C# code example for retrieving onboarding documents. This snippet uses 'HttpClient' to send a GET request, including the bearer token and other necessary headers. ```C# using System; using System.Net.Http; using System.Threading.Tasks; public class OnboardingDocumentsClient { public static async Task GetDocumentsAsync(string id, string token) { using (var httpClient = new HttpClient()) { var requestUrl = $"https://api-baas-hml.zrobank.xyz/v1/users/onboardings/{id}/documents"; var nonce = Guid.NewGuid().ToString(); // Generate a new UUID for nonce httpClient.DefaultRequestHeaders.Accept.ParseAdd("application/json"); httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token); httpClient.DefaultRequestHeaders.Add("Nonce", nonce); httpClient.DefaultRequestHeaders.Add("X-Lang", "en-US"); // Optional: pt-BR or en-US // Add other optional headers like X-Product-UUID if needed try { HttpResponseMessage response = await httpClient.GetAsync(requestUrl); if (response.IsSuccessStatusCode) { string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); // Process the JSON response body here } else { Console.WriteLine($"Error: {response.StatusCode}"); string errorBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(errorBody); } } catch (Exception e) { Console.WriteLine($"Exception: {e.Message}"); } } } // Example usage: // public static async Task Main(string[] args) // { // string onboardingId = ""; // Replace with actual onboarding ID // string bearerToken = ""; // Replace with your actual token // await GetDocumentsAsync(onboardingId, bearerToken); // } } ``` -------------------------------- ### Fetch Onboarding Documents (Python) Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-onboarding-document-rest-controller-execute-v-1 Python code example for retrieving onboarding documents. It utilizes the 'requests' library to make a GET request to the API endpoint, including necessary headers for authentication and language. ```Python import requests url = "https://api-baas-hml.zrobank.xyz/v1/users/onboardings/{id}/documents" headers = { "Accept": "application/json", "Authorization": "Bearer ", "Nonce": "", "X-Lang": "en-US" # Optional: pt-BR or en-US # Add other optional headers like X-Product-UUID if needed } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") print(response.text) ``` -------------------------------- ### Ruby Example: List Withdraw Settings Source: https://docs.zrobank.io/baas/endpoints/v-1-get-all-user-withdraw-setting-rest-controller-execute-v-1 Example of how to retrieve user withdraw settings using Ruby. This code demonstrates making a GET request to the Zrobank API, including necessary headers. ```ruby require 'uri' require 'net/http' url = URI("https://api-baas-hml.zrobank.xyz/v1/utils/user-withdraw-settings") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Accept"] = "application/json" request["Authorization"] = "Bearer " request["Nonce"] = "YOUR_NONCE_UUID" response = http.request(request) puts response.read_body ``` -------------------------------- ### POST /pix/keys/:id/portabilities/start Source: https://docs.zrobank.io/paas/endpoints/approve-portability-claim-start-process-rest-controller-execute Initiates the portability claim start process for a given Pix key ID. ```APIDOC ## POST /pix/keys/:id/portabilities/start ### Description Initiate a portability claim start process. If the key state is PORTABILITY_PENDING, the process is sent to DICT, eventually changing the state to PORTABILITY_OPENED. ### Method POST ### Endpoint /pix/keys/:id/portabilities/start ### Parameters #### Path Parameters - **id** (string) - Required - Pix Key ID. #### Header Parameters - **x-wallet-uuid** (string) - Optional - Sender Wallet UUID. - **nonce** (string) - Required - UUID (v4) used to uniquely identify the request. - **x-lang** (string) - Optional - Preferred language (pt-BR, en-US). - **x-product-uuid** (string) - Optional - UUID (v4) of the product. - **x-product-target-user-uuid** (string) - Optional - UUID (v4) of the user on whose behalf the request should run. ### Request Example { "id": "key-123-uuid" } ### Response #### Success Response (200) - **state** (string) - Returns the key with a state of PORTABILITY_OPENED. #### Response Example { "id": "key-123-uuid", "state": "PORTABILITY_OPENED" } ```