Authentication
You'll need to authenticate your requests to access an endpoint. SYSE Core API requires you to authenticate with a bearer token.
Bearer token
To authenticate with the SYSE Core API you need to request a bearer token which represents a session between your client and the core.
You can optionally provide an expiry date in ISO 8601 format to automatically expire the token at a given time.
The "User-Agent" header is stored with the generated session. You can use it to further identify the usage of the token.
Usage
The bearer token should be used for a single purpose, or a single microservice.
Request a new token
This endpoint allows you to generate a new token you can use for subsequent requests towards the API.
Required attributes
- Name
email- Type
- string
- Description
The principal email address.
- Name
password- Type
- string
- Description
The principal password.
- Name
otp- Type
- string
- Description
Your One Time Password, valid for 30 seconds.
Optional attributes
- Name
expires- Type
- string
- Description
A date and time formatted according to ISO 8601, at which point the token will automatically expire.
Optional headers
- Name
User-Agent- Type
- string
- Description
Describe the intended usage of the token.
Request
curl -X POST https://core-api.syse.no/v2/tokens \
-H "User-Agent: My microservice" \
-H 'Content-Type: application/json' \
-d @- <<EOF
{
"email": "me@syse.no",
"password": "hush",
"otp": "123456",
"expires": "2023-02-18T21:54:42.123Z"
}
EOF
Response
{
"token": "07350df8-279d-4d3a-b543-87384815cc54"
}
Subsequent requests
Example request with a bearer token
curl https://core-api.syse.no/v2/brands/syse/partners/1/customers/1 \
-H "Authorization: Bearer {token}"
Always keep your token safe and reset it if you suspect it has been compromised.
