Update Customer (Individual/Business)

Get Started. It's Free
or sign up with your email address
Update Customer (Individual/Business) by Mind Map: Update Customer (Individual/Business)

1. Common Error Codes

1.1. If token not provided or expired 401 Error code

1.1.1. "message": "Authorization has been denied for this request."

1.2. If cusomerId is not supplied the error 405 Method Not Allowed occurs

1.2.1. framework standard error

1.3. If sending more requests than is allowed then 429: Too many requests

1.3.1. Configuration. To be confirmed with Dev

1.3.2. "message": "You have exceeded the maximum limit of request allowed. Please try your request again in a moment."

1.4. If client does not have permission to business provided then 403: Forbidden

1.4.1. { "errorCode": "access_denied", "message": "Unable to process this request as you do not have access to the business associated to this request." }

1.5. 500: Internal Server Error Lock database to test

1.6. 503: Service Unavailable Turn off CustomerServices in Application Pool to Test

2. Mandatory fields

2.1. firstName

2.1.1. firstName is not supplied / space provided as a value

2.1.1.1. 404 Bad request

2.1.1.2. { "field":"firstName", "message":"FirstName is required" }

2.1.2. firstName exceed 40 characters (41)

2.1.2.1. 404 Bad request

2.1.2.2. { "field":"firstName", "message":"FirstName must not exceed 40 characters." }

2.2. gender

2.2.1. gender value is not supplied / space provided as a value

2.2.1.1. 404 Bad request

2.2.1.2. { "field":"gender", "message":"Gender is required." }

2.2.2. provided gender value is not correct (not in the list)

2.2.2.1. 404 Bad request

2.2.2.2. { "field":"gender", "message":"Incorrect Gender option. Please choose from the available options (Male, Female, Unspecified, Non-Binary)." }

2.3. dateOfBirth

2.3.1. dateOfBirth value is not supplied / space provided as a value

2.3.1.1. 404 Bad request

2.3.1.2. { "field":"dateOfBirth", "message":"DateOfBirth is required." }

2.3.2. dateOfBirth value is in the future

2.3.2.1. 404 Bad request

2.3.2.2. { "field":"dateOfBirth", "message":"DateOfBirth must not be a future date." }

2.3.3. dateOfBirth value format is incorrect (DD-MM-YYYY, 01 January YYYY)

2.3.3.1. 404 Bad request

2.3.3.2. { "field":"dateOfBirth", "message":"Incorrect date format, please ensure date is formatted in 'YYYY-MM-DD' format." }

2.3.4. dateOfBirth value is out of range (current year - 151)

2.3.4.1. 404 Bad request

2.3.4.2. { "field":"dateOfBirth", "message":"DateOfBirth is out of range." }

3. Optional fields

3.1. title

3.1.1. title value exceeds 10 characters

3.1.1.1. 404 Bad request

3.1.1.2. { "field":"title", "message":"Title must not exceed 10 characters." }

3.2. middleName

3.2.1. middleName exceed 40 characters (41)

3.2.1.1. 404 Bad request

3.2.1.2. { "field":"middleName", "message":"MiddleName must not exceed 40 characters." }

3.3. lastName

3.3.1. lastName exceed 40 characters (41)

3.3.1.1. 404 Bad request

3.3.1.2. { "field":"lastName", "message":"LastName must not exceed 40 characters." }

4. Successful request: Response checks

4.1. Response code is 201

4.2. Response includes all provided values

4.3. a record in DB updated with provided values

4.4. all supplied values override existing ones

4.4.1. if optional field is not supplied it will be overrided with empty value

4.5. audit record created

4.5.1. Capture the delta and resourceid

4.5.2. if there is no delta the record should not be created

4.6. businessID returns in the response

5. Customers for updating

5.1. Created by API

5.2. Old customers

5.3. Business Customer

5.3.1. user has a permission for this business

5.3.1.1. 404 error returns

5.3.2. user doesn't have a permission for this business

5.3.2.1. 404 error returns

5.4. customerId with ClientTypeID = null

5.4.1. 404 error returns

5.5. customerId doesn't exist

5.5.1. 404 error returns