const response = await fetch('https://service.pcibooking.net/api/accounts/authenticate/', {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key'
}
});
console.log(response.status); // 200 if valid
import requests
response = requests.post(
'https://service.pcibooking.net/api/accounts/authenticate/',
headers={
'Authorization': 'APIKEY your-api-key'
}
)
print(response.status_code) # 200 if valid
// Empty body. The API key is valid and the service is available.
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
Authentication
Authenticate API Key
Verify that the PCI Booking service is available and your API key is valid.
POST
/
api
/
accounts
/
authenticate
/
const response = await fetch('https://service.pcibooking.net/api/accounts/authenticate/', {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key'
}
});
console.log(response.status); // 200 if valid
import requests
response = requests.post(
'https://service.pcibooking.net/api/accounts/authenticate/',
headers={
'Authorization': 'APIKEY your-api-key'
}
)
print(response.status_code) # 200 if valid
// Empty body. The API key is valid and the service is available.
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}
This method lets you verify that the PCI Booking service is available and that your API key is valid.
Both
Authentication Guide
Learn about API key authentication
Error Responses
| HTTP Status | Error Code | Description |
|---|---|---|
| 401 | -1003 | Not authenticated. The API key is missing, malformed, or invalid. |
| 401 | -1005 | User suspended. The account associated with this API key has been suspended. |
| 401 | -1006 | User closed. The account associated with this API key has been closed. |
| 429 | Rate limited. Too many authentication requests in a short period. |
POST and GET methods are supported:
GET https://service.pcibooking.net/api/accounts/authenticate/
Error detail
Each condition below gives the exactmoreInfo text, why it happens and how to resolve it. The full set is on the Error Handling page.
-1002 Missing authentication header - no Authorization header
-1002 Missing authentication header - no Authorization header
HTTP status: Reason. The request carried no
401message: Missing authentication headermoreInfo: one of the following, depending on which scheme the endpoint uses:Missing or empty 'Authorization:' header
Badly formatted 'Authorization:' header
Missing 'APIKEY' keyword in the 'Authorization:' header
No accessToken query parameter value
No captureCardId query parameter value
Authorization header at all. This is a missing header, not a rejected credential - a wrong or expired credential returns -1003 instead.How to resolve.- Add an
Authorizationheader. For API key auth the value is your key prefixed withAPIKEY, for exampleAPIKEY your-api-key. - Check that your HTTP client is not stripping the header on redirect. A 301 or 302 between your client and the API drops
Authorizationin most clients.
-1003 You are not authorized to access this resource - credential not accepted
-1003 You are not authorized to access this resource - credential not accepted
HTTP status: The two expiration variants apply to one-time access tokens: the first means the token has passed its expiry, the second that the requested lifetime exceeded the maximum allowed and was refused outright rather than capped.Reason. Authentication itself failed: the API key or session token was not recognised, has expired, or belongs to a different environment than the endpoint you called.How to resolve.
401message: You are not authorized to access this resource. Please contact customer support.moreInfo:Invalid API Key <key>
Expiration time invalid: Already expired
Expiration time invalid: too late
- Confirm the
APIKEYprefix is present and there is a single space between it and the key. - Confirm the key belongs to the same environment as the host you called. Sandbox and production keys are not interchangeable.
- If you are using a session token, check it has not passed its time to live and start a new session if it has.
Parameters
Headers
string
required
Your API key prefixed with
APIKEY. Example: APIKEY your-api-key. See the Authentication guide.const response = await fetch('https://service.pcibooking.net/api/accounts/authenticate/', {
method: 'POST',
headers: {
'Authorization': 'APIKEY your-api-key'
}
});
console.log(response.status); // 200 if valid
import requests
response = requests.post(
'https://service.pcibooking.net/api/accounts/authenticate/',
headers={
'Authorization': 'APIKEY your-api-key'
}
)
print(response.status_code) # 200 if valid
Response
// Empty body. The API key is valid and the service is available.
{
"code": -1003,
"message": "Not authorized to access this resource",
"moreInfo": "Bad or missing authorization data, expected APIKEY",
"errorList": null
}

