gitlabEdit

๐ŸŒEnvironments & Base URLs

Docs-Dispatcher operates across multiple environments with different base URLs for each service.

Production Environment

Dispatcher API

Base URL: https://api.docs-dispatcher.io

Endpoints:

Authentication:

  • POST /auth - Login and get JWT

  • GET /auth/refresh - Refresh JWT token

Configuration & Templates:

  • GET /api/v1/my/config - Get user/company configurations

  • GET /api/v1/templates - List templates

  • GET /api/v1/templates/:id - Get template details

Service Dispatch:

  • POST /api/invoicing - Invoice/quote dispatch

  • POST /api/esign - eSign workflows

  • POST /api/postal - Postal mail dispatch

  • POST /api/sms - SMS messaging

  • POST /api/email - Email dispatch

  • POST /api/file - Document generation only

  • POST /api/upload - File upload

  • POST /api/:service/validate - Validation (all services)

Health:

  • GET /healthz - Health check

Sandbox Environment (Coming Soon)

Sandbox environment for testing without affecting production data.

Differences from production:

  • Isolated database (no production data)

  • Provider sandbox APIs used where available

  • No real emails/SMS/postal mail sent

  • No actual invoices created in accounting systems

  • Rate limits may differ

circle-info

Provider Sandboxes: Some providers offer sandbox modes (e.g., Qonto). Use the useSandbox flag in provider configs to test with real provider APIs without creating actual invoices.

Common Headers

Required for All Dispatcher Requests

Example:

circle-info

Basic Auth Encoding: The credentials format is email:password encoded as base64. Most HTTP clients handle this automatically. See Authentication for details.

Optional Headers

  • X-Request-ID: Track requests across services (generated if not provided)

  • X-Idempotency-Key: Prevent duplicate dispatches (recommended for production)

URL Patterns

Service Endpoints

All service endpoints follow this pattern:

Examples:

Validation Endpoints

Examples:

Webhook Endpoints

Webhook callbacks follow this pattern:

Examples:

Rate Limits

Production

  • Authentication: 10 requests/minute per IP

  • Dispatcher: 100 requests/minute per user

  • Validation: 20 requests/minute per user

Rate Limit Headers:

Rate Limit Exceeded (429):

Timeouts

Connection Timeouts

  • Dispatcher API: 30 seconds

  • Provider APIs: 60 seconds (varies by provider)

Request Timeouts

  • Sync requests: 120 seconds

  • Async requests: 5 seconds (queues immediately)

  • Validation: 10 seconds

circle-exclamation

SSL/TLS

All endpoints require HTTPS with TLS 1.2 or higher.

Certificate Validation:

  • Production certificates are valid and trusted

  • Self-signed certificates are not supported

  • Certificate pinning is not required

Regional Availability

Currently, all services are hosted in:

  • Primary Region: Europe (France)

  • Failover: Europe (Ireland)

Latency Expectations:

  • Europe: < 50ms

  • North America: 100-150ms

  • Asia: 200-300ms

CORS

Dispatcher API

CORS is not enabled by default for security:

triangle-exclamation

Recommended Architecture:

Health Check

Check service availability:

Response:

IP Whitelisting

For enhanced security, you can restrict API access to specific IP addresses:

  1. Contact support to enable IP whitelisting

  2. Provide list of allowed IPs/CIDR ranges

  3. Requests from other IPs will receive 403 Forbidden

Service Status

Monitor service status and incidents:

  • Status Page: https://status.docs-dispatcher.io (TBD)

  • Incidents: Subscribe to updates via email or RSS

Environment Variables

Recommended environment variables for your application:

circle-exclamation

Next Steps

Last updated