Update Customer
Update a customer's details.
Last updated
curl -X PATCH https://ramp-api.ivorypay.io/api/v1/customers/amina@example.com \
-H "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Aminat",
"phoneNumber": "+2348099999999"
}'const response = await fetch("https://ramp-api.ivorypay.io/api/v1/customers/amina@example.com", {
method: "PATCH",
headers: {
"Authorization": "your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
firstName: "Aminat",
phoneNumber: "+2348099999999",
}),
});
const data = await response.json();
console.log(data);import requests
response = requests.patch(
"https://ramp-api.ivorypay.io/api/v1/customers/amina@example.com",
headers={
"Authorization": "your_api_key",
"Content-Type": "application/json",
},
json={
"firstName": "Aminat",
"phoneNumber": "+2348099999999",
},
)
print(response.json())package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]string{
"firstName": "Aminat",
"phoneNumber": "+2348099999999",
})
req, _ := http.NewRequest("PATCH", "https://ramp-api.ivorypay.io/api/v1/customers/amina@example.com", bytes.NewBuffer(body))
req.Header.Set("Authorization", "your_api_key")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}{
"success": true,
"message": "Customer was updated successfully",
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-a12345678901",
"refCode": "abc123def4",
"firstName": "Aminat",
"lastName": "Okafor",
"email": "amina@example.com",
"phoneNumber": "+2348099999999"
}
}