put https://apiprod.fattlabs.com/customer/
Modify an existing customer record in your merchant account.
The Update a Customer's Information endpoint allows merchants to modify an existing customer record in their account. This is essential for keeping customer data accurate and up-to-date, ensuring seamless operations and compliance.
Key Features
- Modify Existing Records: Update any field in the customer record, such as name, email, address, or phone number.
- Partial Updates: Only supply the fields you wish to modify. Fields left blank or omitted will remain unchanged.
- Correct Errors: Fix inaccurate or outdated data in the initial customer record.
Usage Notes
- GET Before PUT: Use the Get a Customer's Information endpoint to retrieve the existing record before making updates.
- Optional Parameters: All fields are optional; include only the fields you need to update.
- Key Parameters:
firstname
,lastname
,email
, orcompany
are typically the most commonly updated fields.address_country
should follow the ISO 3-letter country code standard if supplied.
Response Structure
Code | Response | Description |
---|---|---|
200 | Success | The customer record was successfully updated. |
400 | Bad Request | Invalid or missing fields in the request. |
401 | Unauthorized | API key invalid or missing. |
404 | Not Found | No customer found with the provided customer_id . |
500 | Internal Server Error | An unexpected error occurred on the server. |
Important Considerations
Required Access: The API key must belong to the merchant associated with the customer record.
Immutable Fields: Some fields, such as customer_id
, cannot be modified.
Deleted Records: Updates cannot be made to soft-deleted customer records. Use the Find all Customer endpoint to confirm the deleted_at
status.
Validation: Ensure all supplied fields follow the required formats. For example:
address_country
: Must be a valid ISO 3-letter code.email
: Should be a properly formatted email address.
Best Practices
- Retrieve the existing record with the Get a Customer's Information endpoint before updating to avoid overwriting fields unnecessarily.
- Log updates for auditing and troubleshooting purposes.
- Use this endpoint to maintain accurate customer data, which is critical for reporting and transactional accuracy.