Create Customer (Individual)

Get Started. It's Free
or sign up with your email address
Rocket clouds
Create Customer (Individual) by Mind Map: Create Customer (Individual)

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 sending more requests than is allowed then 429: Too many requests

1.2.1. Configuration. To be confirmed with Dev

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

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

1.3.1. "errorCode": "required_claims", "message": "Unable to process this request due to insufficient client claims.", "errors": [ { "claim": "The name of the claim required."

1.4. 500: Internal Server Error Lock database to test

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

2. Optional fields

2.1. title

2.1.1. title value exceeds 10 characters

2.1.1.1. 400 Bad request

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

2.2. middleName

2.2.1. middleName exceed 40 characters (41)

2.2.1.1. 400 Bad request

2.2.1.2. { "field":"middleName", "message":"Middle Name must not exceed 40 characters." }

2.3. lastName

2.3.1. lastName exceed 40 characters (41)

2.3.1.1. 400 Bad request

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

2.4. address

2.4.1. addressLine2

2.4.1.1. addressLane2 value exceeds 60 characters (61)

2.4.1.1.1. 400 Bad request

2.4.1.1.2. "message":"Address Line2 must not exceed 60 characters."

2.4.2. suburb

2.4.2.1. suburb value exceeds 50 characters (51)

2.4.2.1.1. 400 Bad request

2.4.2.1.2. "message":"Address suburb must not exceed 50 characters."

2.4.3. state

2.4.3.1. Country AUS, USA or any other country that has states

2.4.3.1.1. State value is not supplied

2.4.3.1.2. State value is not from the list

2.4.3.1.3. State value is more than 3 chars

2.4.4. city

2.4.4.1. city value exceeds 50 characters (51)

2.4.4.1.1. 400 Bad request

2.4.4.1.2. { "field":"addresses.city", "message":"Address city must not exceed 50 characters." }

2.5. emailAddress

2.5.1. name

2.5.1.1. name value exceeds 40 characters (41)

2.5.1.1.1. 400 Bad request

2.5.1.1.2. { "field":"emailAddresses.name", "message":"Email address name must not exceed 40 characters." }

2.6. phoneNumber

2.6.1. areaCode

2.6.1.1. areaCode value exceeds 4 characters (5)

2.6.1.1.1. 400 Bad request

2.6.1.1.2. { "field":"phoneNumber.areaCode", "message":"Phone number area code must not exceed 4 characters." }

3. Mandatory fields

3.1. businessId

3.1.1. businessId is not supplied or invalid

3.1.1.1. 403 Forbidden

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

3.2. firstName

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

3.2.1.1. 400 Bad request

3.2.1.2. { "field":"firstName", "message":"First Name is required" }

3.2.2. firstName exceed 40 characters (41)

3.2.2.1. 400 Bad request

3.2.2.2. { "field":"firstName", "message":"First Name must not exceed 40 characters." }

3.3. gender

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

3.3.1.1. 400 Bad request

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

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

3.3.2.1. 400 Bad request

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

3.4. dateOfBirth

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

3.4.1.1. 400 Bad request

3.4.1.2. { "field":"dateOfBirth", "message":"Date of Birth is required." }

3.4.2. dateOfBirth value is in the future

3.4.2.1. 400 Bad request

3.4.2.2. { "field":"dateOfBirth", "message":"Date of Birth must not be a future date." }

3.4.3. dateOfBirth value is <1753 ex. 1752-12-11

3.4.3.1. 400 Bad request

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

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

3.4.4.1. 400 Bad request

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

3.5. address

3.5.1. addressLine1

3.5.1.1. addressLine1 value is not supplied / space provided as a value

3.5.1.1.1. 400 Bad request

3.5.1.1.2. { "field":"addresses.addressLine1", "message":"Address Line1 is required." }

3.5.1.2. addressLane1 value exceeds 60 characters (61)

3.5.1.2.1. 400 Bad request

3.5.1.2.2. { "field":"addresses.addressLine1", "message":"Address Line1 must not exceed 60 characters." }

3.5.2. postcode

3.5.2.1. postcode value is not supplied / space provided as a value

3.5.2.1.1. 400 Bad request

3.5.2.1.2. { "field":"addresses.postcode", "message":"Address postcode is required." }

3.5.2.2. postcode value exceeds 10 characters (11)

3.5.2.2.1. 400 Bad request

3.5.2.2.2. { "field":"addresses.postcode", "message":"Address postcode must not exceed 10 characters." }

3.5.3. countryISOCode

3.5.3.1. countryISOCode value is not supplied / space provided as a value

3.5.3.1.1. 400 Bad request

3.5.3.1.2. { "field":"addresses.countryISOCode", "message":"Address country code is required." }

3.5.3.2. countryISOCode value is not from the list

3.5.3.2.1. 400 Bad request

3.5.3.2.2. { "field":"addresses.countryISOCode", "message":"Address country ISO code is invalid" }

3.5.4. type

3.5.4.1. type value is not supplied / space provided as a value

3.5.4.1.1. 400 Bad request

3.5.4.1.2. { "field":"Address.AddressType", "message":"Addresstype is required." }

3.5.4.2. type value is not from the list Business, Home, Physical, Postal, Legal

3.5.4.2.1. 400 Bad request

3.5.4.2.2. { "field":"addresses.type", "message":"Address type is invalid." }

3.6. emailAddress

3.6.1. emailAddress

3.6.1.1. emailAddress value is not supplied / space provided as a value

3.6.1.1.1. 400 Bad request

3.6.1.1.2. { "field":"emailAddresses.emailAddress", "message":"Email address is required." }

3.6.1.2. emailAddress value exceeds 75 characters (76)

3.6.1.2.1. 400 Bad request

3.6.1.2.2. { "field":"emailAddresses.emailAddress", "message":"Email address must not exceed 75 characters." }

3.6.1.3. emailAddress value is not correct (no @, no . in the second part of email address)

3.6.1.3.1. 400 Bad request

3.6.1.3.2. { "field":"emailAddresses.emailAddress", "message":"Email address format is invalid." }

3.7. phoneNumber

3.7.1. name

3.7.1.1. name value is not supplied / space provided as a value

3.7.1.1.1. 400 Bad request

3.7.1.1.2. { "field":"phoneNumbers.name", "message":"Phone Number name is required." }

3.7.1.2. name value exceeds 40 characters (41)

3.7.1.2.1. 400 Bad request

3.7.1.2.2. { "field":"phoneNumbers.name", "message":"Phone Number name must not exceed 40 characters." }

3.7.2. countryCode

3.7.2.1. countryCode value is not supplied / space provided as a value

3.7.2.1.1. 400 Bad request

3.7.2.1.2. { "field":"phoneNumbers.countryCode", "message":"Phone Number country code is required." }

3.7.3. phoneNumber

3.7.3.1. phoneNumber value is not supplied / space provided as a value

3.7.3.1.1. 400 Bad request

3.7.3.1.2. { "field":"phoneNumbers.phoneNumber", "message":"Phone Number is required." }

3.7.3.2. phoneNumber value exceeds 75 characters (76)

3.7.3.2.1. 400 Bad request

3.7.3.2.2. { "field":"phoneNumbers.phoneNumber", "message":"Phone Number must not exceed 75 characters." }

3.7.4. type

3.7.4.1. type value is not supplied / space provided as a value

3.7.4.1.1. 400 Bad request

3.7.4.1.2. { "field":"phoneNumbers.type", "message":"Phone Number type is required." }

3.7.4.2. type value is not from the list Business, Home, Physical, Postal, Legal

3.7.4.2.1. 400 Bad request

3.7.4.2.2. { "field":"phoneNumbers.type", "message":"Phone Number type is invalid." }

4. Checking DB and API values length for consistency

4.1. API and DB should have the same field length

5. Successful request: Response checks

5.1. Response code is 201

5.2. Response includes all provided values

5.3. customerId returns

5.3.1. DB has a record with the same customerId and provided values

5.4. address

5.4.1. addressId returns

5.4.1.1. DB has a record with the same addressId and provided values

5.4.1.2. Address.Preferred = 1

5.4.2. Address has a isPrimary field is true

5.5. emailAddress

5.5.1. emailAddressId returns

5.5.1.1. DB has a record with the same emailAddressId and provided values

5.5.1.2. Created email Preferred column = 1

5.5.2. emailAddress has a isPrimary field is true

5.6. phoneNumber

5.6.1. phoneNumberId returns

5.6.1.1. DB has a record with the same phoneNumberId and provided values

5.6.1.2. created phoneNumber Preferred column = 1

5.6.2. phoneNumber has a isPrimary field is true

5.7. Audit record created

5.7.1. Entire request saved in the DB

5.8. Customer tbl

5.8.1. Default preferred contactID = Phone

5.8.2. new record for successful added customer

5.8.2.1. FacilityNo value is correct based on facility supplied

5.8.2.2. ClientTypeId = 100