Auth service API (1.0.0-auth)

Download OpenAPI specification:

Public facing authentication API for anonymous users

auth

All authentication related calls, such as login, register etc.

Health check information for the auth service

Health check information for the auth service

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Login as an anonymous customer

Automatically generates a JWT for an anonymous customer

Authorizations:
bearerAuth
query Parameters
siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Logout of authorisation

Logs the user out so no further authorised transactions can be performed with the provided token

Authorizations:
bearerAuth
cookie Parameters
refreshToken
string

The JWT token to be refreshed

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Refresh token

Refreshes the token supplied in the request cookie. If successful the returned cookie will contain the refreshed token.

Authorizations:
bearerAuth
cookie Parameters
refreshToken
required
string

The JWT token to be refreshed

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Register a new user

Register a user

Authorizations:
x-api-secret
query Parameters
siteKey
required
string

The site key

header Parameters
anonymousId
string

The anonymousId of the customer before registering

Request Body schema: application/json
email
required
string
password
required
string
title
required
string
firstName
required
string
lastName
required
string
nationalHealthId
string
dateOfBirth
required
string
gender
required
string
phoneNumber
required
string
marketingOptIn
required
boolean

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "title": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "nationalHealthId": "string",
  • "dateOfBirth": "string",
  • "gender": "string",
  • "phoneNumber": "string",
  • "marketingOptIn": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update the customer email

Update the customer email

Authorizations:
x-api-secret
query Parameters
siteKey
required
string

The site key

Request Body schema: application/json
email
required
string
commercetoolsId
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "commercetoolsId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}