Create Customer (Individual/Business)

Get Started. It's Free
or sign up with your email address
Rocket clouds
Create Customer (Individual/Business) by Mind Map: Create 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 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.1.2. title is provided and CustomerType = Business

2.1.2.1. 400 Bad request

2.1.2.2. { "field":"title", "message":"Title is not required for Business customer." }

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":"MiddleName must not exceed 40 characters." }

2.2.2. middleName is provided and CustomerType = Business

2.2.2.1. 400 Bad request

2.2.2.2. { "field":"middleName", "message":"MiddleName is not required for Business customer." }

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.3.2. lastName is provided and CustomerType = Business

2.3.2.1. 400 Bad request

2.3.2.2. { "field":"lastName", "message":"LastName is not required for Business customer." }

2.4. address

2.4.1. addressLine2

2.4.1.1. addressLine2 value exceeds 60 characters (61)

2.4.1.1.1. 400 Bad request

2.4.1.1.2. { "field":"address.addressLine2", "message":"AddressLine2 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. { "field":"address.suburb", "message":"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":"address.city", "message":"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":"emailAddress.emailName", "message":"EmailName must not exceed 50 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":"AreaCode must not exceed 4 characters." }

3. Mandatory fields

3.1. businessId

3.1.1. no access in bussinessID supplied or invalid

3.1.1.1. 403 Forbidden

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

3.1.2. BusinessID is not supplied/space

3.1.2.1. 400 Forbidden

3.1.2.2. { "field":"businessId", "message":"BusinessId is required." }

3.1.3. BusinessID is invalid

3.1.3.1. 400 Forbidden

3.1.3.2. { "field":"businessId", "message":"BusinessId is invalid." }

3.2. CustomerType

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

3.2.1.1. 400 Bad request

3.2.1.2. { "field":"customerType", "message":"CustomerType is required." }

3.2.2. CustomerType is invalid

3.2.2.1. 400 Bad request

3.2.2.2. { "field":"customerType", "message":"CustomerType is invalid." }

3.3. firstName

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

3.3.1.1. 400 Bad request

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

3.3.2. firstName exceed 40 characters (41)

3.3.2.1. 400 Bad request

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

3.4. gender

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

3.4.1.1. 400 Bad request

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

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

3.4.2.1. 400 Bad request

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

3.4.3. Gender is provided and CustomerType = Business

3.4.3.1. 400 Bad request

3.4.3.2. { "field":"gender", "message":"Gender is not required for Business customer." }

3.5. dateOfBirth

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

3.5.1.1. 400 Bad request

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

3.5.2. dateOfBirth value is in the future

3.5.2.1. 400 Bad request

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

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

3.5.3.1. 400 Bad request

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

3.5.4. dateOfBirth value format is incorrect (DD-MM-YYYY, 30-01-1999)

3.5.4.1. 400 Bad request

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

3.5.5. Gender is provided and CustomerType = Business

3.5.5.1. 400 Bad request

3.5.5.2. { "field":"dateOfBirth", "message":"DateOfBirth is not required for Business customer." }

3.6. address

3.6.1. addressLine1

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

3.6.1.1.1. 400 Bad request

3.6.1.1.2. { "field":"address.addressLine1", "message":"AddressLine1 is required." }

3.6.1.2. addressLine1 value exceeds 60 characters (61)

3.6.1.2.1. 400 Bad request

3.6.1.2.2. { "field":"address.addressLine1", "message":"AddressLine1 must not exceed 60 characters." }

3.6.2. postcode

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

3.6.2.1.1. 400 Bad request

3.6.2.1.2. { "field":"address.postcode", "message":"Postcode is required." }

3.6.2.2. postcode value exceeds 10 characters (11)

3.6.2.2.1. 400 Bad request

3.6.2.2.2. { "field":"address.postcode", "message":"Postcode must not exceed 10 characters." }

3.6.3. countryISOCode

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

3.6.3.1.1. 400 Bad request

3.6.3.1.2. { "field":"address.countryISOCode", "message":"CountryISOCode is required." }

3.6.3.2. countryISOCode value is not from the list

3.6.3.2.1. 400 Bad request

3.6.3.2.2. { "field":"address.countryISOCode", "message":"CountryISOCode is invalid." }

3.6.4. type

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

3.6.4.1.1. 400 Bad request

3.6.4.1.2. { "field":"address.addressType", "message":"AddressType is required." }

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

3.6.4.2.1. 400 Bad request

3.6.4.2.2. { "field":"address.addressType", "message":"AddressType is invalid." }

3.6.4.3. provided deprecate Address Type like Previous and Clubware

3.6.4.3.1. 400 Bad request

3.6.4.3.2. { "field":"address.addressType", "message":"AddressType is invalid." }

3.7. emailAddress

3.7.1. emailAddress

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

3.7.1.1.1. 400 Bad request

3.7.1.1.2. { "field":"emailAddress.emailAddress", "message":"EmailAddress is required." }

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

3.7.1.2.1. 400 Bad request

3.7.1.2.2. { "field":"emailAddress.emailAddress", "message":"EmailAddress format is invalid." }

3.7.1.3. emailAddress value exceeds 75 characters (76)

3.7.1.3.1. 400 Bad request

3.7.1.3.2. { "field":"emailAddress.emailAddress", "message":"EmailAddress must not exceed 75 characters." }

3.8. phoneNumber

3.8.1. name

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

3.8.1.1.1. 400 Bad request

3.8.1.1.2. { "field":"phoneNumber.phoneName", "message":"PhoneName is required." }

3.8.1.2. name value exceeds 40 characters (41)

3.8.1.2.1. 400 Bad request

3.8.1.2.2. { "field":"phoneNumber.phoneName", "message":"PhoneName must not exceed 40 characters." }

3.8.2. countryCode

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

3.8.2.1.1. 400 Bad request

3.8.2.1.2. { "field":"phoneNumber.countryCode", "message":"CountryCode is required." }

3.8.2.2. CountryCode value exceeds 4 characters (5)

3.8.2.2.1. 400 Bad request

3.8.2.2.2. { "field":"phoneNumber.countryCode", "message":"CountryCode must not exceed 4 characters." }

3.8.3. phoneNumber

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

3.8.3.1.1. 400 Bad request

3.8.3.1.2. { "field":"phoneNumber.phoneNumber", "message":"PhoneNumber is required." }

3.8.3.2. phoneNumber value exceeds 75 characters (76)

3.8.3.2.1. 400 Bad request

3.8.3.2.2. { "field":"phoneNumber.phoneNumber", "message":"PhoneNumber must not exceed 75 characters." }

3.8.4. type

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

3.8.4.1.1. 400 Bad request

3.8.4.1.2. { "field":"phoneNumber.phoneType", "message":"PhoneType is required." }

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

3.8.4.2.1. 400 Bad request

3.8.4.2.2. { "field":"phoneNumber.phoneType", "message":"PhoneType is invalid." }

3.8.4.3. deprecated types: Previous, Clubware, Clubware Phone

3.8.4.3.1. 400 Bad request

3.8.4.3.2. { "field":"phoneNumber.phoneType", "message":"PhoneType 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. businessId returns

5.5. address

5.5.1. addressId returns

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

5.5.1.2. Address.Preferred = 1

5.5.2. Address has a isPrimary field is true

5.6. emailAddress

5.6.1. emailAddressId returns

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

5.6.1.2. Created email Preferred column = 1

5.6.2. emailAddress has a isPrimary field is true

5.7. phoneNumber

5.7.1. phoneNumberId returns

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

5.7.1.2. created phoneNumber Preferred column = 1

5.7.2. phoneNumber has a isPrimary field is true

5.8. Audit record created

5.8.1. Entire request saved in the DB

5.9. Customer tbl

5.9.1. Default preferred contactID = Phone

5.9.2. new record for successful added customer

5.9.2.1. FacilityNo value is correct based on facility supplied

5.9.2.2. ClientTypeId

5.9.2.2.1. 100 for Individual

5.9.2.2.2. 200 for Business