Overview

The Customers API allows you to manage customer profiles in the cryptocurrency wallet system. You can create individual or batch customers, retrieve customer information, update customer details, and view customer transactions.

Endpoints

1. Create Customer

Creates a new customer profile associated with the authenticated user.

URL: {{base_url}}/customers

Method: POST

Auth Required: Yes

Request Body

Parameter Type Required Description
name String Yes Customer's name
email String Yes Customer's email address
phone String No Customer's phone number

Example Request

POST {{base_url}}/customers
Content-Type: application/json
Authorization: Bearer <your-token>

{
  "name": "John Doe",
  "email": "[email protected]",
  "phone": "+1234567890"
}

Success Response (200 OK)

{
  "status": "success",
  "message": "Customer created successfully",
  "data": {
    "customer_id": "62f85xxxxxxxx",
    "name": "John Doe",
    "email": "[email protected]",
    "phone_number": "+1234567890"
  }
}

Error Responses

Customer Already Exists (400 Bad Request)

{
  "status": "error",
  "message": "Customer with this email already exists"
}

Server Error (500 Internal Server Error)

{
  "status": "error",
  "message": "An internal server error occurred"
}