{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "BASEURL/customerInfo.json",
"title": "customerInfo",
"description": "Customer Information",
"type": "object",
"properties": {
"consumer": {
"properties": {
"salutation": {
"type": "string",
"enum": ["Mr", "Mrs", "Miss"]
},
"firstName": {
"type": "string",
"maxLength": 30
},
"lastName": {
"type": "string",
"maxLenght": 30
},
"birthDate": {
"type": "string",
"format": "full-date",
"description": "YYYY-MM-DD"
}
},
"required": ["firstName", "lastName"],
"additionalProperties": false
},
"business": {
"properties": {
"legalName": {
"type": "string",
"maxLenght": 50
},
"dbaName": {
"type": "string",
"maxLenght": 50,
"description": "Doing business as. Name of the company as usually known to consumers."
},
"registrationNumber": {
"type": "string",
"maxLenght": 20
}
},
"required": ["legalName"],
"additionalProperties": false
},
"phone": {
"type": "object",
"properties": {
"countryCode": {
"type": "string",
"minLength": 1,
"maxLenght": 3
},
"subscriberNumber": {
"type": "string",
"maxLenght": 12
}
},
"required": ["countryCode", "subscriberNumber"],
"additionalProperties": false
},
"mobilePhone": {
"type": "object",
"properties": {
"countryCode": {
"type": "string",
"minLength": 1,
"maxLenght": 3
},
"subscriberNumber": {
"type": "string",
"maxLenght": 12
}
},
"required": ["countryCode", "subscriberNumber"],
"additionalProperties": false
},
"email": {
"type": "string",
"maxLenght": 50,
"format": "idn-email"
}
},
"oneOf": [
{"required": ["consumer"]},
{"required": ["business"]}
],
"additionalProperties": false
} |