Update an existing customer’s information
PATCH /customers/{id}
Authorization: YOUR_API_KEY
Show billing_address properties
curl -X PATCH "https://api.spendjuice.com/customers/6f7e1e7f-93d1-4fcc-b7a4-738f869615c8" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "phone_number": "+2348012345678", "billing_address": { "line1": "123 Test lane", "city": "Anon" } }'
{ "data": { "id": "6f7e1e7f-93d1-4fcc-b7a4-738f869615c8", "first_name": "Test", "last_name": "Customer", "email": "test@custom.er", "phone_number": "+2348012345678", "billing_address": { "line1": "123 Test lane", "line2": "3456 Mike Drive", "city": "Anon", "state": "Acme", "zip_code": "12345", "country": "US" } } }
400 Bad Request
{ "error": { "code": "invalid_request", "message": "Invalid parameters provided", "details": { "phone_number": ["Invalid phone number format"] } } }
404 Not Found
{ "error": { "code": "not_found", "message": "Customer not found" } }
422 Unprocessable Entity
{ "error": { "code": "validation_error", "message": "The request contains invalid parameters", "details": { "email": ["Invalid email format"] } } }
Accept: application/json;version=1