Documentation
Creating Credentials
If you do not have API credentials already, API credentials can be created on the dedicated settings pagesandbox in MidwayPlus. To create credentials, click the "Create API Account" button, select the Brands that account will have access to, optionally change the default randomly generated Client ID and Password, then click the "Save" button. Be sure to note the password as it cannot be retrieved later.
JSON Web Token
MidwayPlus uses JWT (JSON Web Tokens) for API authentication. The JSON web tokens expire 24 hours after creation.
The token should be defined in the HTTP headers, for example:
Authorization: Bearer <token>
To create a bearer token, send your Client ID and Password to the /v1/Auth endpoint.
{
"clientId": "string",
"password": "string"
}
If successful, you will get a bearer token in the response's body.
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjAzZWFjYmRlLTM1NTItNGQzZC1hODcxLWE4NmV..."
}