maas-schemas

profile Schema

http://maasglobal.com/core/profile.json

MaaS user profiles as returned by our API

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated Yes Develop No Forbidden Forbidden core/profile.json

Schema Hierarchy

profile Definitions

Property Type Group
active boolean http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
addons string[] http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
availability integer http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
coupons string[] http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
description string http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
level integer http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
name string http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
plan object http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
pointCost point-cost http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance
wmpGrant integer http://maasglobal.com/core/profile.json#/definitions/subscriptionInstance

active

active

active Type

boolean

addons

addons

addons Type

Array type: string[]

All items must be of the type: string

availability

availability

availability Type

integer

coupons

coupons

coupons Type

Array type: string[]

All items must be of the type: string

description

description

description Type

string

level

level

level Type

integer

name

name

name Type

string

plan

plan

plan Type

object with following properties:

Property Type Required
id string Required

id

id

id Type

string

pointCost

pointCost

pointCost Type

wmpGrant

wmpGrant

wmpGrant Type

integer

profile Properties

Property Type Required Nullable Defined by
balances fare Required No profile (this schema)
city string Optional No profile (this schema)
country string Optional No profile (this schema)
created integer Optional No profile (this schema)
email string Optional No profile (this schema)
favoriteLocations place Required No profile (this schema)
firstName string Optional No profile (this schema)
id integer Optional No profile (this schema)
identityId complex Required No profile (this schema)
lastName string Optional No profile (this schema)
modified integer Optional No profile (this schema)
paymentMethod object Required No profile (this schema)
phone string Required No profile (this schema)
profileImageUrl string Optional No profile (this schema)
region region Optional No profile (this schema)
regionId string Optional No profile (this schema)
subscription object Optional No profile (this schema)
subscriptionInstance object Required No profile (this schema)
zipCode string Optional No profile (this schema)

balances

balances

balances Type

Array type: fare

All items must be of the type:

city

Alphabetic city name

city

city Type

string

country

ISO 3166-1 alpha-2 country code, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

country

country Type

string

All instances must conform to this regular expression (test examples here):

^[A-Z]{2,2}$

created

POSIX time in milliseconds, https://en.wikipedia.org/wiki/Unix_time

created

created Type

integer

email

Rough validation of a valid e-mail address, see https://davidcel.is/posts/stop-validating-email-addresses-with-regex/

email

email Type

string

^.+@.+\..+$

email Example

"joe.customer@example.com"

favoriteLocations

favoriteLocations

favoriteLocations Type

Array type: place

All items must be of the type:

firstName

First or last name of a customer (e.g. John)

firstName

firstName Type

string

id

id

id Type

integer

identityId

identityId

identityId Type

Any following options needs to be fulfilled.

Option 1

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}$

Option 2

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}$

identityId Examples

"eu-west-1:4828507e-683f-41bf-9d87-689808fbf958"
"4828507e-683f-41bf-9d87-689808fbf958"

lastName

First or last name of a customer (e.g. John)

lastName

lastName Type

string

modified

POSIX time in milliseconds, https://en.wikipedia.org/wiki/Unix_time

modified

modified Type

integer

paymentMethod

paymentMethod

paymentMethod Type

object with following properties:

Property Type Required
expiry integer Optional
issuer string Optional
maskedNumber string Optional
type string Required
valid boolean Required

expiry

When this payment method expires

expiry

expiry Type

integer

issuer

The card issuer, e.g. ‘Visa’

issuer

issuer Type

string

maskedNumber

Typically the credit card number with all but the last four digits obfuscated

maskedNumber

maskedNumber Type

string

type

type

The value of this property must be equal to one of the known values below.

type Known Values
Value Description
unknown  
card  
stripe  

valid

Whether the payment method is valid and working

valid

valid Type

boolean

phone

ITU-T E.164 phone number, see https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9781449327453/ch04s03.html

phone

phone Type

string

All instances must conform to this regular expression

^\+(?:\d){6,14}\d$

phone Example

"+358401234567"

profileImageUrl

profileImageUrl

profileImageUrl Type

string

region

region

region Type

regionId

regionId

regionId Type

string

subscription

TODO Delete this legacy version of subscription (replaced by subscriptionInstance)

subscription

subscription Type

object with following properties:

| Property | Type | Required | | ——– | —- | ——– |

subscriptionInstance

subscriptionInstance

subscriptionInstance Type

object with following properties:

Property Type Required
active boolean Optional
addons array Required
availability integer Optional
coupons array Required
description string Optional
id integer Optional
level integer Optional
name string Optional
plan object Required
pointCost   Required
wmpGrant integer Optional

active

active

active Type

boolean

addons

addons

addons Type

Array type: string[]

All items must be of the type: string

availability

availability

availability Type

integer

coupons

coupons

coupons Type

Array type: string[]

All items must be of the type: string

description

description

description Type

string

id

id

id Type

integer

level

level

level Type

integer

name

name

name Type

string

plan

plan

plan Type

object with following properties:

Property Type Required
id string Required

id

id

id Type

string

pointCost

pointCost

pointCost Type

wmpGrant

wmpGrant

wmpGrant Type

integer

zipCode

Numeric zip code, see https://en.wikipedia.org/wiki/Postal_code

zipCode

zipCode Type

string