🇬🇧
Yativo Documentation
Spanish
English
English
  • Yativo
  • Introduction to Yativo
    • Financial Infrastructure
    • About Us
  • Dashboard
  • Business Plans
  • Getting Started with Yativo API
  • Yativo API Glossary
  • API reference
    • Misc.
      • Countries
      • States
      • City
  • Security and Authentication
    • Security
    • Authentication
    • Idempotency in API Requests
  • Environment
    • Environments
  • Notifications
    • Webhook
  • Compliance
    • Verification
      • KYC
      • KYB
      • KYC/KYB Update
      • KYC Status
      • Global Business Search
    • Supported Jurisdiction
    • Supported Countries, Currencies and Payment Method
  • User Management
    • Customer
      • Get Customers
      • Retrieve customer
      • Add Customer
  • Payments
    • Currencies
    • Crypto Wallets
      • Generate Wallet Address
      • Fetch Wallet Address
      • Crypto Deposit History
      • Single crypto deposit history
    • Payout
      • Payout
      • Get Payouts
      • Get Payout
      • Beneficiaries
        • Get Beneficiaries
        • Add Beneficiary Payment Details
        • Update Beneficiary
        • Archive Beneficiary
        • Add Beneficiary
    • Payin
    • Virtual Cards
      • Supported Currency, Country
      • Create card
      • Fetch card
      • Top up card
      • Get Transactions
      • Freeze and Unfreeze Card
    • Virtual Accounts
      • Create VIrtual Accounts
        • USD Virtual Account
        • Mexico Virtual Account
        • Brazil PIX QR
      • Virtual Account Management
      • Transaction History
  • Foreign Exchange
    • Exchange Rate
      • Request Quote
  • Transactions
    • Transaction Summary
    • Get Single Transaction
  • Crypto System
    • Yativo Crypto Platform API
Powered by GitBook
On this page
  1. User Management
  2. Customer

Get Customers

GET /customer

Get Customers Endpoint - Yativo

The "Get Customers" endpoint is a crucial part of our API, designed to retrieve detailed information about customers stored in the system. This endpoint provides an efficient way for applications to access customer data for various purposes, including displaying customer profiles, analyzing customer demographics, or integrating with other systems.

Key Features:

  1. HTTP Method: GET

  2. Endpoint URL: {{baseUrl}}/customer

  3. Authentication: Requires API key or OAuth token to ensure secure access.

  4. Query Parameters:

    • per_page (optional): The page number for paginated results.

Response Structure:

  • Status Code: 200 OK on success, with other codes indicating various errors (e.g., 401 Unauthorized, 404 Not Found).

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Request sample and Response

import requests

url = "{{baseUrl}}/customer"

payload = {}
headers = {
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
const url = '{{baseUrl}}/customer';
const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
  }
};

fetch(url, options)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '{{baseUrl}}/customer',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'
  ),
));

$response = curl_exec($curl);
curl_close($curl);

echo $response;
?>

Success response
{
    "status": "success",
    "status_code": 200,
    "message": "Records retrieved successfully",
    "data": [
        {
            "customer_id": "2f103e55-1dc5-40bd-a78c-a4574f7a50e6",
            "customer_name": "Test Customer",
            "customer_email": "test_customer@yativo.com",
            "customer_phone": "+19203751411",
            "customer_country": "USA",
            "customer_address": {
                "city": "Anytown",
                "state": "Anystate",
                "zipcode": "12345",
                "street": "1234 Elm Street",
                "number": "5678",
                "country": "USA"
            }
        },
        {
            "customer_id": "3f103e55-1dc5-40bd-a78c-a4574f4a50e0"
            "customer_name": "Test Customer",
            "customer_email": "test_customer@yativo.com",
            "customer_phone": "+19203751411",
            "customer_country": "USA",
            "customer_address": {
                "city": "Anytown",
                "state": "Anystate",
                "zipcode": "12345",
                "street": "1234 Elm Street",
                "number": "5678",
                "country": "USA"
            }
        }
    ],
    "pagination": {
        "total": 2,
        "per_page": 20,
        "current_page": 1,
        "last_page": 1,
        "next_page_url": null,
        "prev_page_url": null
    }
}
{   "status_code": 400,
    "message": "Request failed",
    "data": {
        "error": "Oops. Error message"
    }
}
{
    "message": "Unauthenticated."
}

PreviousCustomerNextRetrieve customer

Last updated 2 months ago

Fetch customers

get
Authorizations
Responses
200
OK
application/json
Responseall of
and
anyOptionalExample: {"status":"success","status_code":200,"message":"Records retrieved successfully","data":[{"customer_id":"fabdb7dd-aa1e-4d25-84a4-514567056173","customer_name":"Test Customer","customer_email":"test_customer@yativo.com","customer_phone":"+19203751411","customer_country":"USA","customer_address":{"city":"Anytown","state":"Anystate","number":"5678","street":"1234 Elm Street","country":"USA","zipcode":"12345"},"can_create_vc":0,"can_create_va":0,"customer_status":"pending"}],"pagination":{"total":1,"per_page":20,"current_page":1,"last_page":1,"next_page_url":null,"prev_page_url":null}}
get
GET /api/v1/customer HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "status": "success",
  "status_code": 200,
  "message": "Records retrieved successfully",
  "data": [
    {
      "customer_id": "fabdb7dd-aa1e-4d25-84a4-514567056173",
      "customer_name": "Test Customer",
      "customer_email": "test_customer@yativo.com",
      "customer_phone": "+19203751411",
      "customer_country": "USA",
      "customer_address": {
        "city": "Anytown",
        "state": "Anystate",
        "number": "5678",
        "street": "1234 Elm Street",
        "country": "USA",
        "zipcode": "12345"
      },
      "can_create_vc": 0,
      "can_create_va": 0,
      "customer_status": "pending"
    }
  ],
  "pagination": {
    "total": 1,
    "per_page": 20,
    "current_page": 1,
    "last_page": 1,
    "next_page_url": null,
    "prev_page_url": null
  }
}