HiiRelevate Customer Service API (1.0)

Download OpenAPI specification:Download

License: UNLICENSED

HiiRelevate Customer Service API docs

OpenAPI Document (json)

Health

Get availability of a service

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Customer

Get customer by id

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer unique id in uuid format

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "email": [
    ],
  • "phoneNumber": [
    ],
  • "socialSecurityNumber": "string",
  • "identifiers": [
    ],
  • "displayName": "string",
  • "birthdate": "2019-08-24",
  • "addresses": [
    ],
  • "gender": "male",
  • "currency": "string",
  • "businessUnitId": "string",
  • "consents": [
    ],
  • "status": "string",
  • "createdBy": "string",
  • "createdDate": "string",
  • "channelChoices": [
    ]
}

Delete customer by id

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer id

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Update customer by id

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer id

Request Body schema: application/json

Update customer DTO

Array of objects (AddressDto) <= 5 items

Customer addresses

birthdate
string <date>

Birthday

businessUnitId
string

Business unit id where the customer is registered

Array of objects (CreateChannelChoiceDto)

Channels accepted by this customer

currency
string

Currency to use for this customer

displayName
string

Customer name

Array of objects (EmailDto) <= 5 items

Customer email. Used for identification.

gender
string (Gender)
Enum: "male" "female" "other"
identifiers
Array of strings

External identifiers used to identify this customer

Array of objects (PhoneNumberDto) <= 5 items

Customer phone number. Used for identification

socialSecurityNumber
string

Customer social security number. Used for identification

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Get customer by either email or phone number

Authorizations:
Bearer
Request Body schema: application/json

Find customer DTO

email
required
string <email>

Email Address of customer

phoneNumber
required
string

Phone Number of customer

socialSecurityNumber
required
string

Social security number of customer

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "phoneNumber": "string",
  • "socialSecurityNumber": "string"
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Create customer by id

Authorizations:
Bearer
Request Body schema: application/json

Create customer DTO

Array of objects (AddressDto) <= 5 items

Customer addresses

birthdate
string <date>

Birthday

businessUnitId
string

Business unit id where the customer is registered

Array of objects (CreateChannelChoiceDto)

Channels accepted by this customer

Array of objects (ConsentDto)

Communication channels accepted by this customer

currency
string

Currency to use for this customer

displayName
required
string

Customer name

required
Array of objects (EmailDto) <= 5 items

Customer email. Used for identification.

gender
string (Gender)
Enum: "male" "female" "other"
identifiers
Array of strings

External identifiers used to identify this customer

Array of objects (PhoneNumberDto) <= 5 items

Customer phone number. Used for identification

socialSecurityNumber
string

Customer social security number. Used for identification

Responses

Request samples

Content type
application/json
{
  • "email": [
    ],
  • "displayName": "string"
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Channel

Get channels

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Consent

Get consents

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Create consent

Authorizations:
Bearer
Request Body schema: application/json

Create consent DTO

availableFrom
required
string <date>

A date from which consent is accessible

createdDate
string <date>

Created Date

description
required
string

Consent description

isRequired
required
boolean

Consent Require

modifiedDate
string <date>

Modified Date

name
required
string

Consent name

url
required
string

Consent URL

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "isRequired": true,
  • "url": "string",
  • "availableFrom": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Create consent version

Authorizations:
Bearer
path Parameters
consentBaseId
required
string

Consent Base Id is used to create the consent version

Request Body schema: application/json

Consent values to create the consent

availableFrom
required
string <date>

A date from which consent is accessible

createdDate
string <date>

Created Date

description
required
string

Consent description

isRequired
required
boolean

Consent Require

modifiedDate
string <date>

Modified Date

name
required
string

Consent name

url
required
string

Consent URL

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "isRequired": true,
  • "url": "string",
  • "availableFrom": "2019-08-24"
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

CustomerConsent

Get Consents by customer id

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer unique id in uuid format

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Create consent for customer

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer unique id in uuid format

Request Body schema: application/json
Array
string

Responses

Request samples

Content type
application/json
[
  • "string"
]

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

CustomerChannel

Create channels for customer

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer id

Request Body schema: application/json

Create customer DTO

Array
channelId
required
string

Channel Id

optIn
required
boolean

Opt in

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Get Channels by customer id

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer unique id in uuid format

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Segment

Create segment

Authorizations:
Bearer
Request Body schema: application/json

Create Segment DTO

allowMultiple
required
boolean

Allow customers to belong to multiple segment values of the same Segment at once

daysValid
required
number

Validity field

name
required
string

A name of the segment

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "daysValid": 0,
  • "allowMultiple": true
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Get segments

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Create segment value using the name of the Segment that the value should belong to

Authorizations:
Bearer
path Parameters
segmentName
required
string

Name of Segment

Request Body schema: application/json

Create Segment Value DTO

index
required
number

A ranking order of the segment values in that Segment

name
required
string

Name of the segment value

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "index": 0
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

CustomerSegment

Create segments for customer

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer id

Request Body schema: application/json
expires
string <date>

A date when customer segment expires

segment
required
string

A name that describes the segment

segmentValue
required
string

A name that describes the segment value

Responses

Request samples

Content type
application/json
{
  • "segment": "string",
  • "segmentValue": "string"
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Update segments for customer

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer id

Request Body schema: application/json
required
object

The new segment values that has to be updated for customer

required
object

The old customer segment

Responses

Request samples

Content type
application/json
{
  • "oldSegment": {
    },
  • "newSegment": {
    }
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Get Segment Values by customer id

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer unique id in uuid format

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

CustomerDevice

Add device for customer

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer id

Request Body schema: application/json
deviceOs
required
string

An OS of a device that a customer is using

deviceUid
required
string

A uid of a device that a customer is using

token
required
string

A token

Responses

Request samples

Content type
application/json
{
  • "deviceOs": "string",
  • "deviceUid": "string",
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

Get devices for customer

Authorizations:
Bearer
path Parameters
customerId
required
string

Customer unique id in uuid format

Responses

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}

PubSubChannel

Create, update pubsub channel

Authorizations:
Bearer
Request Body schema: application/json

Pubsub channel DTO

required
object

PubSub Message.

subscription
required
string

Channel subscription

Responses

Request samples

Content type
application/json
{
  • "subscription": "string",
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "message": [
    ],
  • "error": "Bad Request"
}