Making Requests

This guide covers the conventions and formats used across all Partner API endpoints.

Base URL

All API requests should be made to:

https://roundtable.eu/api/partners/v1

Required Headers

Every request must include:

Header Value Required
Authorization Bearer rt_sk.prod.xxx Yes
Content-Type application/json For POST/PUT/PATCH
Accept application/json Recommended
X-Request-ID UUID Optional (for request correlation)

Response Format

All responses are wrapped in a consistent envelope structure.

Success Response (Single Resource)

{
  "data": {
    "id": "usr_123abc",
    "email": "investor@example.com",
    "firstName": "Jane",
    "lastName": "Smith",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Success Response (List)

{
  "data": [
    { "id": "usr_123abc", "email": "investor@example.com" },
    { "id": "usr_456def", "email": "partner@example.com" }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalCount": 150,
    "totalPages": 8
  }
}

Error Response

{
  "error": {
    "code": "NOT_FOUND",
    "message": "User not found",
    "details": []
  }
}

HTTP Status Codes

Status Description
200 Success (GET, PUT, PATCH)
201 Resource created (POST)
204 Success with no content (DELETE, health check)
400 Bad request (validation error, malformed JSON)
401 Unauthorized (missing or invalid token)
403 Forbidden (insufficient scope)
404 Resource not found
429 Rate limit exceeded
500 Internal server error

Error Codes

Code Description
BAD_REQUEST Malformed JSON or validation failed
UNAUTHORIZED Missing or invalid API token
FORBIDDEN Token lacks required scope
NOT_FOUND Requested resource does not exist
RATE_LIMITED Too many requests
INTERNAL_ERROR Unexpected server error

Validation Errors

When request validation fails, the details array contains field-level errors:

{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Validation failed",
    "details": [
      { "field": "email", "message": "Invalid email format" },
      { "field": "limit", "message": "Must be between 1 and 100" }
    ]
  }
}

Request ID

Every response includes an X-Request-ID header containing a unique identifier for that request. Use this ID when contacting support to help debug issues.

X-Request-ID: 550e8400-e29b-41d4-a716-446655440000

You can also provide your own request ID by including the X-Request-ID header in your request. The ID must be a valid UUID v4. This enables end-to-end request correlation across your systems.

Response Headers

Header Description
X-Request-ID Unique request identifier
X-RateLimit-Limit Maximum requests per window
X-RateLimit-Remaining Requests remaining
X-RateLimit-Used Requests used in current window
Retry-After Seconds to wait (only on 429 responses)
Content-Type Always application/json