Authentication
How to authenticate with the Marketplace Service API
Overview
The Marketplace Service uses JWT Bearer tokens for authentication. All endpoints (except health checks) require a valid JWT in the Authorization header.
Multi-Tenant Isolation
Every request is scoped to a tenant via the
x-tenant-id header or the tenantId claim in the JWT. Row-Level Security (RLS) enforces data isolation at the database level across all 13 marketplace tables.Getting a JWT Token
Authenticate via the Auth Service to obtain a JWT:
curl -X POST https://535ubezkse.execute-api.us-east-1.amazonaws.com/auth/v1/auth/login/email \
-H "Content-Type: application/json" \
-d '{
"email": "your-email@example.com",
"password": "your-password"
}'The response includes an accessToken in the data envelope:
{
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 3600
}
}Using the Token
Include the token in every request:
curl https://535ubezkse.execute-api.us-east-1.amazonaws.com/marketplace/v1/listings \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "x-tenant-id: 00000000-0000-0000-0000-000000000001"Required Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer JWT token |
x-tenant-id | Yes | UUID of the tenant |
Content-Type | For POST/PATCH | application/json |
Idempotency-Key | Recommended | UUID for write operations |
JWT Payload
{
"sub": "user-uuid",
"email": "user@example.com",
"tenantId": "00000000-0000-0000-0000-000000000001",
"roles": ["user", "organizer"],
"iat": 1700000000,
"exp": 1700003600
}Role-Based Access Control
| Role | Access |
|---|---|
user | Browse listings, submit quotes, create orders, manage own resources |
organizer | Create listings, manage exhibitor slots, sponsorships, RFPs, service tiers |
admin | Full access including disputes, analytics, bulk operations |
super_admin | Platform-wide access across all tenants |
Test Accounts
Staging Environment
Use these credentials against the staging API Gateway.
| Password | Role | |
|---|---|---|
| admin@eventzr.com | Password123! | super_admin |
| organizer@eventzr.com | Password123! | organizer |
| user@eventzr.com | Password123! | user |
Default Tenant
00000000-0000-0000-0000-000000000001