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:
HTTP Method:
GET
Endpoint URL:
{{baseUrl}}/customer
Authentication: Requires API key or OAuth token to ensure secure access.
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
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)
{
"status": "success",
"status_code": 200,
"message": "Records retrieved successfully",
"data": [
{
"customer_id": "2f103e55-1dc5-40bd-a78c-a4574f7a50e6",
"customer_name": "Test Customer",
"customer_email": "[email protected]",
"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": "[email protected]",
"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":"success","status_code":200,"message":"Records retrieved successfully","data":[{"customer_id":"fabdb7dd-aa1e-4d25-84a4-514567056173","customer_name":"Test Customer","customer_email":"[email protected]","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 /api/v1/customer HTTP/1.1
Host: smtp.yativo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"status": "success",
"status_code": 200,
"message": "Records retrieved successfully",
"data": [
{
"customer_id": "fabdb7dd-aa1e-4d25-84a4-514567056173",
"customer_name": "Test Customer",
"customer_email": "[email protected]",
"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
}
}
Last updated