Individual Clients Data Update

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 NameTypeDescription
Content-Typeapplication/jsonRequest 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

  1. Token not provided
{
  "detail": "Authentication credentials were not provided."
}
  1. 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"
    ]
  }
}
  1. 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": []
}
  1. If Country Code Not Match
{
  "status_code": 404,
  "message": "No Country found for country_code: UQ",
  "data": []
}
  1. This error occurs when reference ID is not correct
{
  "status_code": 404,
  "message": "Invalid Reference ID.",
  "data": []
}

Status Code list

status_codeerror_messagereason
200SuccessAll the provided data are consistent
400Bad Requestdata inconsistency
401UnAuthorizedAuth Token Not Provided
404Individual Client with this reference ID not foundif reference ID is not correct