Prezio API uses key-based authentication for all requests. We support both standard API keys and JSON Web Tokens (JWT). This guide explains how to obtain and use API keys effectively.

Authentication Flow

1

Obtain an API key

Get your unique API key through the Prezio customer dashboard or by contacting support.

2

Include the key in requests

Add your key to the Authorization header with prefix Token for all API requests.

3

Access API resources

Make authenticated requests to any Prezio API endpoint you have permission to access.

Obtaining API Keys

Customer Dashboard

  1. Sign up and log in to the Prezio Customer Dashboard
  2. Navigate to the API section
  3. Find your API key with appropriate permissions
  4. Copy the key securely for use in your applications

Contact Support

For enterprise access or if you don’t have dashboard access, contact:

support@prezio.eu

Include your account details and required access level.

Upon initial registration, users receive a sandbox API key valid for 30 days. Our team will contact you near the end of this period to discuss extending access based on your needs.

Using API Keys

Include your API key in the HTTP Authorization header with the prefix Token:

Authorization: Token YOUR_API_KEY

Example Requests

curl -X GET "https://api.prezio.eu/api/live/?country=DK&tariff_id=tar_123" \
  -H "Authorization: Token YOUR_API_KEY"

Security Best Practices

API Key Storage

Handling Authentication Errors

401 Unauthorized

{
  "detail": "Invalid token."
}

The API key is invalid, expired, or missing. Verify you’re using the correct API key with the “Token” prefix.

403 Forbidden

{
  "detail": "You do not have permission to perform this action."
}

Your API key lacks permission for the requested resource. Contact support to adjust permissions.

Authentication failures count toward your rate limits. Implement proper error handling to avoid excessive authentication attempts.

Environment-Specific Access

Use the same API key for both environments, but make requests to different base URLs:

# Sandbox environment (open access)
curl -X GET "https://sandbox.prezio.eu/api/live/..." \
  -H "Authorization: Token YOUR_API_KEY"

# Production environment (requires contract)
curl -X GET "https://api.prezio.eu/api/live/..." \
  -H "Authorization: Token YOUR_API_KEY"

Sandbox access is available to all registered users. Production access depends on your contract - contact our support team at support@prezio.eu to enable production access.

For questions regarding authentication or API key management, contact our support team at support@prezio.eu.