Viewing Customer Details
API Documentation for Viewing Customer Details
This document provides detailed instructions for developers to view details of a specific customer for a specific merchant using the provided API.
Endpoint
- URL:
/api/merchants/{merchantId}/customers/{customerId} - Method:
GET - Content-Type:
application/json
Description
This API endpoint allows you to retrieve details of a specific customer for a specific merchant.
Request URL
Replace {merchantId} with the actual merchant ID and {customerId} with the actual customer ID.
https://api.paylink.sa/api/merchants/{merchantId}/customers/{customerId}
HTTP Method
GET
Request Headers
Content-Type: application/jsonX-API-KEY: your_api_key
Example curl Command
curl Commandcurl -X GET https://api.paylink.sa/api/merchants/{merchantId}/customers/{customerId} \
-H "Content-Type: application/json" \
-H "X-API-KEY: your_api_key"Replace {merchantId} and {customerId} with the actual merchant ID and customer ID, and your_api_key with your actual API key in the headers.
Success Response
If the request is successful, you will receive a 200 OK status code with the following response body:
{
"customerId": "customer123",
"customerName": "Customer XYZ",
"customerEmail": "[email protected]",
"customerPhone": "966123456789"
}Error Response
If there is an error in the request, you will receive a 400 Bad Request status code with an error message:
{
"message": "Invalid request data"
}By following these steps and using the provided documentation, you should be able to successfully view details of a specific customer for a specific merchant using the API.
Updated 2 months ago
