Individual Clients Data Update API
Clients Data Update.
URL: /api/v1/individual-client-data-update/<str:reference_id>/
Method: POST
Auth required: YES
Headers
| Parameter Name | Type | Description |
|---|---|---|
| Content-Type | application/json | Request and Response Format |
Payload:
{
"first_name": "xyz",
"last_name": "xyz",
"address": "xyz",
"country_code": "GB",
"city": "xyz",
"date_of_birth": "yyyy-MM-dd",
"postcode": "xyz",
"state": "xyz"
}Success Response
The response will contain a JSON object with the following fields:
{
"status_code": 200,
"message": "Individual Client data updated successfully",
"data": []
}Error Response
- Token not provided
{
"detail": "Authentication credentials were not provided."
}- If Payload is empty
{
"status_code": 400,
"error": "Empty payload received. Please provide the required data in the request body.",
"expected_payload": {
"payload_value": [
"first_name",
"last_name",
"address",
"country_code",
"city",
"postcode",
"state",
"date_of_birth"
]
}
}- Payload validation error
{
"status_code": 400,
"message": "Error in data provided.",
"errors": {
"first_name": "This field may not be blank./ Not more than 20 character",
"last_name": "This field may not be blank./ Not more than 20 character",
"address": "This field may not be blank.",
"country_code": "Ensure this field has no more than 2 characters.",
"city": "City name must not contain numeric values.",
"date_of_birth": "Date has wrong format. Use one of these formats instead: YYYY-MM-DD."
},
"data": []
}- If Country Code Not Match
{
"status_code": 404,
"message": "No Country found for country_code: UQ",
"data": []
}- This error occurs when reference ID is not correct
{
"status_code": 404,
"message": "Invalid Reference ID.",
"data": []
}Status Code list
| status_code | error_message | reason |
|---|---|---|
| 200 | Success | All the provided data are consistent |
| 400 | Bad Request | data inconsistency |
| 401 | UnAuthorized | Auth Token Not Provided |
| 404 | Individual Client with this reference ID not found | if reference ID is not correct |