Entur Developer
Customers API

Customer accounts client

Api for creating, fetching and modifying customers account ids.


Get customer accounts

GET
https://api.entur.io/customers/v2
/profiles/{customerNumber}/customer-accounts

Get customer accounts by customer number.

Get customer accounts › path Parameters

customerNumber
​integer · int64 · required · style: simple

Get customer accounts › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Get customer accounts › Responses

OK

Customer account connected to a customer
createdAt
​string · date-time · required

When the customer account was created. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
createdBy
​string · required

Who created the customer account.

customerAccountId
​string · required

Customer account id string

Example: ATB:CustomerAccount:abc58673cde-1c82-4bc5-989c-9d5eaa7ea866
customerNumber
​integer · int64 · required

Unique customer number

id
​integer · int64 · required

Customer account unique id.

alias
​string

Alias for the customer account

Example: Tommy
changedAt
​string · date-time

When the customer account was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
changedBy
​string

Who changed the customer account.

isDefault
​boolean

True if the account is the default account for the customer


Create a new customer account

POST
https://api.entur.io/customers/v2
/profiles/{customerNumber}/customer-accounts

Create a new customer account for the customer.

Create a new customer account › path Parameters

customerNumber
​integer · int64 · required · style: simple

Create a new customer account › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Create a new customer account › Request Body

Create a customer account connected to a customer
accountId
​string · maxLength: 60 · required

Customer account id.

alias
​string · maxLength: 50 · required

Customer account alias

isDefault
​boolean

True if account is default for customer. Default false.

Create a new customer account › Responses

OK

Customer account connected to a customer
createdAt
​string · date-time · required

When the customer account was created. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
createdBy
​string · required

Who created the customer account.

customerAccountId
​string · required

Customer account id string

Example: ATB:CustomerAccount:abc58673cde-1c82-4bc5-989c-9d5eaa7ea866
customerNumber
​integer · int64 · required

Unique customer number

id
​integer · int64 · required

Customer account unique id.

alias
​string

Alias for the customer account

Example: Tommy
changedAt
​string · date-time

When the customer account was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
changedBy
​string

Who changed the customer account.

isDefault
​boolean

True if the account is the default account for the customer


DELETE
https://api.entur.io/customers/v2
/profiles/{customerNumber}/customer-accounts/{accountId}

Delete a customer account tied to a customer profile

path Parameters

customerNumber
​integer · int64 · required · style: simple

Customer number

accountId
​string · required · style: simple

Customer account id

Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Responses

OK

No data returned

Patch a customer account. Follows the JSON Merge Patch RFC7396 standard.

PATCH
https://api.entur.io/customers/v2
/profiles/{customerNumber}/customer-accounts/{accountId}

A JSON merge patch document describes changes to be made to a target JSON document using a syntax that closely mimics the document being modified. Recipients of a merge patch document determine the exact set of changes being requested by comparing the content of the provided patch against the current content of the target document. If the provided merge patch contains members that do not appear within the target, those members are added. If the target does contain the member, the value is replaced. Null values in the merge patch are given special meaning to indicate the removal of existing values in the target.

See 'CustomerAccountPatchRequest' for available fields to patch.

Patch a customer account. Follows the JSON Merge Patch RFC7396 standard. › path Parameters

customerNumber
​integer · int64 · required · style: simple

Customer number

accountId
​string · required · style: simple

Customer account id

Patch a customer account. Follows the JSON Merge Patch RFC7396 standard. › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Patch a customer account. Follows the JSON Merge Patch RFC7396 standard. › Request Body

Update a customer account connected to a customer
alias
​string · maxLength: 50

Customer account alias

isDefault
​boolean

True if account is the default account for the customer.

Patch a customer account. Follows the JSON Merge Patch RFC7396 standard. › Responses

OK

Customer account connected to a customer
createdAt
​string · date-time · required

When the customer account was created. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
createdBy
​string · required

Who created the customer account.

customerAccountId
​string · required

Customer account id string

Example: ATB:CustomerAccount:abc58673cde-1c82-4bc5-989c-9d5eaa7ea866
customerNumber
​integer · int64 · required

Unique customer number

id
​integer · int64 · required

Customer account unique id.

alias
​string

Alias for the customer account

Example: Tommy
changedAt
​string · date-time

When the customer account was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
changedBy
​string

Who changed the customer account.

isDefault
​boolean

True if the account is the default account for the customer


Get profile by customer account id

GET
https://api.entur.io/customers/v2
/customer-accounts/{accountId}/profiles

Get profile by customer account id

Get profile by customer account id › path Parameters

accountId
​string · required · style: simple

Get profile by customer account id › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Get profile by customer account id › Responses

OK

A registered customer response
changedAt
​string · date-time · required

When the customer was last changed. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
changedBy
​string · maxLength: 100 · required

Who last changed the customer. Either web, app or username of employee. Used for traceability in accordance with GDPR

changedByChannel
​string · maxLength: 100 · required

Which sales channel or system who last changed the customer. Used for traceability in accordance with GDPR

createdAt
​string · date-time · required

When the customer was created. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
createdBy
​string · maxLength: 100 · required

Who created the customer. Either web, app or username of employee. Used for traceability in accordance with GDPR

createdByChannel
​string · maxLength: 100 · required

Which sales channel or system who created the customer. Used for traceability in accordance with GDPR

customerNumber
​integer · int64 · required

Customer number.

firstName
​string · maxLength: 50 · required

First and middle name.

organisationId
​integer · int64 · required

The organisation the customer is registered with.

profileType
​string · enum · required

Type of profile. Types supported: 'S' = Standard customer, 'P' = Personnel ticket customer, 'T' = Temporary customer. Default is 'S'.

Enum values:
S
P
T
status
​string · enum · required

Customer status. Statuses supported: 'A' = Active, 'P' = Passive, 'D' = Deleted. Default is 'A'.

Enum values:
A
P
D
surname
​string · maxLength: 50 · required

Surname.

uuid
​string · minLength: 32 · maxLength: 32 · required

A universal unique id for the customer. 32 random alphanumeric characters. Not RFC 4122 compliant

Example: 7018222E18CB5C46E05400144FF9F89C
countryCode
​string · maxLength: 4

Telephone number country code, starting with +.

Example: +47
customerAccountId
​string · maxLength: 60

Customer account id used for account based ticketing

Example: XYZ:CustomerAccount:<uuid>
​CustomerAccountResponse[]

Customer accounts used for account based ticketing

​CustomerConsent[]

The legacy consents connected to the customer.

customerRef
​string · maxLength: 40

Optional customer reference. Defaults to customer number if not set.

​LocalDateResponse

Date as object

​LocalDateResponse

Date as object

​EcardOwnershipResponse[]

The ecards connected to the customer.

email
​string · maxLength: 80

Contact email. May become different from username

emailOld
​string · maxLength: 80

When customer is deleted (status='D'), the value of 'email' is moved here to allow creation of a new customer with the same email.

emailVerifiedAt
​string · date-time

When the email was verified. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
expirationDate
​string · date-time

The date when the customers personal data should be deleted. Personal data will be deleted continuously. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
landlineNumber
​string · maxLength: 20

Landline telephone number.

languagePreferenceISO6393
​string · enum

Which language the customer wants information in. ISO 639-3 format. Default is 'NOB'.

Enum values:
NOB
NNO
ENG
lastSignInAt
​string · date-time

When the customer last signed in. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
lastSignInFrom
​string · maxLength: 100

Where the customer last signed in from. Typically web or app. Typically used to display to the user where the last login was performed.

nationality
​string · minLength: 3 · maxLength: 3

The customers nationality. ISO 3166-1 alpha-3 format

Example: NOR
parentId
​object

Id of the parent customer. Used to connect different customer types.

​PersonnelTicketBearer

The personnel tickets connected to the customer. Deprecated. Does not contain updated information.

​PostalAddressResponse[]

The postal addresses connected to the customer.

The preferences connected to the customer.

relatedCustomerNumbers
​integer[]

The customer number of profiles which has been merged into the current profile. These may be used to lookup customer information in other systems

telephoneNumber
​string · maxLength: 20

Deprecated. Please use countryCode and telephoneNumberNoCountryCode. Telephone number for customer. This should be a cell phone number.

telephoneNumberNoCountryCode
​string · maxLength: 12

Telephone number without country code or punctuation.

telephoneNumberVerifiedAt
​string · date-time

When the telephone number was verified. ISO 8601 date format

Example: 2019-04-05T14:30:30+02:00
username
​string

Username the customer can use to log unto their profile. Only available on profile type S(tamkunde) and profile status A(ctive)


Did you find what you were looking for?