http://maasglobal.com/core/customer.json
MaaS customer schema
Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
---|---|---|---|---|---|---|
Can be instantiated | No | Develop | No | Forbidden | Forbidden | core/customer.json |
http://maasglobal.com/core/customer.json
{
"identityId": "eu-west-1:4828507e-683f-41bf-9d87-689808fbf958",
"id": 1234,
"favoriteLocations": [],
"phone": "+358407654321",
"email": "bob.customer@example.com",
"honorifics": "mr",
"sex": "male",
"firstName": "Bob",
"lastName": "Customer",
"created": 1553687004207,
"modified": 1553688004207,
"paymentMethod": {
"type": "unknown",
"valid": false
},
"subscriptionInstance": {
"id": 10,
"name": "Whim to Go",
"plan": {
"id": "fi-whim-payg_v2"
},
"addons": {
"0": "eur-whim-rollover-100_v1",
"1": "fi-whim-car"
},
"region": {
"id": "fi-helsinki",
"name": "Helsinki Region",
"active": true,
"hidden": false,
"created": "2019-03-27T14:00:00.12345+00:00",
"zipCode": "00100",
"currency": "EUR",
"location": {
"lat": 60.1699,
"lon": 24.9384
},
"geometryId": 2,
"countryCode": "FI",
"countryDefault": true
},
"coupons": [],
"topUpId": "fi-whim-top-up",
"wmpGrant": 0,
"pointCost": 0.01,
"description": "Pay for each trip as you go"
},
"balances": {
"WMP": {
"currency": "WMP",
"amount": 1234,
"type": "charge"
},
"cx-test-token_v2": {
"currency": "TOKEN",
"tokenId": "cx-test-token_v2",
"amount": 1,
"type": "charge"
}
},
"referral": {
"code": "XXXX-XXXX-XXXX-XXXX"
},
"regionId": "fi-helsinki",
"region": {
"id": "fi-helsinki",
"name": "Helsinki Region",
"countryCode": "FI",
"countryDefault": true,
"zipCode": "00100",
"location": {
"lat": 60.1699,
"lon": 24.9384
},
"active": true,
"hidden": false,
"geometryId": 2,
"created": 1553687004207,
"modified": 0,
"currency": "EUR"
}
}
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
address | string |
Optional | No | customer (this schema) |
appInstanceId | string |
Optional | No | customer (this schema) |
authToken | string |
Optional | No | customer (this schema) |
balances | object |
Optional | No | customer (this schema) |
city | string |
Optional | No | customer (this schema) |
clientId | enum |
Optional | No | customer (this schema) |
country | string |
Optional | No | customer (this schema) |
dob | complex | Optional | No | customer (this schema) |
documents | personal-document | Optional | No | customer (this schema) |
string |
Optional | No | customer (this schema) | |
firstName | string |
Optional | No | customer (this schema) |
firstNameLocalized | string |
Optional | No | customer (this schema) |
honorifics | string |
Optional | No | customer (this schema) |
identityId | complex | Optional | No | customer (this schema) |
lastName | string |
Optional | No | customer (this schema) |
lastNameLocalized | string |
Optional | No | customer (this schema) |
locale | string |
Optional | No | customer (this schema) |
opaqueId | string |
Optional | No | customer (this schema) |
phone | string |
Optional | No | customer (this schema) |
referral | object |
Optional | No | customer (this schema) |
sex | string |
Optional | No | customer (this schema) |
ssid | complex | Optional | No | customer (this schema) |
state | string |
Optional | No | customer (this schema) |
subscriberType | string |
Optional | No | customer (this schema) |
zipCode | string |
Optional | No | customer (this schema) |
Street address (and optional number), http://www.bitboost.com/ref/international-address-formats.html
address
string
string
An id specific to a user device
appInstanceId
string
string
Authentication Token
authToken
string
string
balances
object
object
with following properties:
Property | Type | Required |
---|---|---|
WMP |
object | Required |
WMP
object
object
with following properties:
Property | Type | Required |
---|---|---|
amount |
integer | Required |
currency |
Required |
amount
integer
integer
0
currency
const
The value of this property must be equal to:
"WMP"
Alphabetic city name
city
string
string
An id indicating the source of the client
clientId
enum
The value of this property must be equal to one of the known values below.
Value | Description |
---|---|
whim |
|
wechat |
ISO 3166-1 alpha-2 country code, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
country
string
string
All instances must conform to this regular expression (test examples here):
^[A-Z]{2,2}$
The customer’s date of birth or boolean indicating if the value is already in DB
dob
Any following options needs to be fulfilled.
boolean
http://maasglobal.com/core/components/units.json#/definitions/isoDate
documents
Array type: personal-document
All items must be of the type:
http://maasglobal.com/core/personal-document.json
Rough validation of a valid e-mail address
email
string
string
^.+@.+\..+$
"joe.customer@example.com"
First name of the customer (e.g. John)
firstName
string
string
Localized first name of the customer (e.g. John)
firstNameLocalized
string
string
honorifics
string
string
identityId
Any following options needs to be fulfilled.
string
All instances must conform to this regular expression
^[aepus]{2}-[\w]{4}-\d:[a-f\d]{8}(-[a-f\d]{4}){3}-[a-f\d]{12}$
string
All instances must conform to this regular expression
^[A-Fa-f0-9]{8}(-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}$
"eu-west-1:4828507e-683f-41bf-9d87-689808fbf958"
"4828507e-683f-41bf-9d87-689808fbf958"
Last name of the customer (e.g. Doe)
lastName
string
string
Localized last name of the customer (e.g. Doe)
lastNameLocalized
string
string
locale
string
string
All instances must conform to this regular expression (test examples here):
^[a-z]{2,3}(?:-[a-zA-Z]{4})?(?:-[A-Z]{2,3})?$
Typically the hash of the identityId
opaqueId
string
string
All instances must conform to this regular expression (test examples here):
^[0-9abcdefABCDEF]+$
ITU-T E.164 phone number
phone
string
string
All instances must conform to this regular expression
^\+(?:\d){6,14}\d$
"+358401234567"
referral
object
object
with following properties:
Property | Type | Required |
---|---|---|
code |
string | Optional |
code
string
string
sex
string
string
Social Security ID
ssid
Any following options needs to be fulfilled.
boolean
http://maasglobal.com/core/components/common.json#/definitions/ssid
Alphabetic state name
state
string
string
Subscriber Type
subscriberType
string
string
Numeric zip code, see https://en.wikipedia.org/wiki/Postal_code
zipCode
string
string