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

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)

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
    }
}

Last updated