gitlabEdit

๐Ÿ“–Dispatcher OpenAPI

Complete API reference for Docs-Dispatcher services.

OpenAPI Specification

The Dispatcher API is fully documented using OpenAPI 3.0.4 specification.

Specification URL: https://api.docs-dispatcher.io/docs/swagger.json

Current Version: OpenAPI 3.0.4

Interactive Documentation

Access the interactive API documentation:

ReDoc (Clean API Documentation)

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

Features:

  • Clean, readable interface

  • Search functionality

  • Code samples in multiple languages

  • Mobile-friendly

SwaggerUI (Interactive API Explorer)

Features:

  • Try API calls directly from the browser

  • Authentication setup

  • Request/response examples

  • Schema exploration

Download Specification

OpenAPI JSON:

API Overview

Base URL

Authentication

All endpoints require JWT Bearer authentication:

See Get a JWT for authentication workflow.

Content Type

All requests must include:

Main Endpoints

Health Check

Authentication: Not required

Response:

Service Dispatch

Services:

  • invoicing - Invoice, quote, credit note generation

  • esign - Electronic signature workflows

  • postal - Physical mail dispatch

  • sms - SMS messaging

  • email - Email dispatch

  • file - Document generation

  • upload - File upload

Query Parameters:

  • async - Boolean (default: false) - Use async mode

Example:

Validation

Validate request without executing (no provider calls, no charges).

Configuration

List and validate provider configurations.

Webhooks

Provider webhook callbacks.

Request Schema

CompositeRequest

The main request object supports multiple service types:

Request Types:

  • BasicRequest - File generation

  • EmailRequest - Email dispatch

  • PostalRequest - Postal mail

  • ESignRequest - Electronic signature

  • InvoiceRequest - Invoicing

  • SMSRequest - SMS messaging

  • BasicListRequest - Batch operations

Common Fields:

See Request Model for complete schema.

Response Formats

Success Response (Sync)

Success Response (Async)

Error Response

HTTP Status Codes

Code
Description
Common Causes

200

Success

Request completed successfully

400

Bad Request

Invalid request data, missing fields

401

Unauthorized

Invalid or expired JWT token

403

Forbidden

Insufficient permissions

404

Not Found

Template or resource not found

409

Conflict

Duplicate resource (e.g., invoice number)

415

Unsupported Media Type

Missing or invalid Content-Type header

417

Expectation Failed

Missing required parameters

422

Unprocessable Entity

Validation errors

429

Too Many Requests

Rate limit exceeded

500

Internal Server Error

Server-side error

503

Service Unavailable

Provider temporarily unavailable

See Common Errors for detailed error handling.

Security Schemes

Bearer Authentication (JWT)

Usage:

Token Validity: 120 minutes

See Authentication for obtaining tokens.

Rate Limits

Endpoint
Limit
Window

/auth

10 requests

per minute

/api/* (dispatch)

100 requests

per minute

/api/*/validate

20 requests

per minute

Rate Limit Headers:

Pagination

List endpoints support pagination:

Query Parameters:

  • page - Page number (1-indexed)

  • limit - Items per page (default: 20, max: 100)

Response Headers:

Code Generation

Generate client code from the OpenAPI spec:

Using OpenAPI Generator

Using Swagger Codegen

Postman Collection

Import the API into Postman:

  1. Open Postman

  2. Click "Import" โ†’ "Link"

  3. Enter: https://api.docs-dispatcher.io/docs/swagger.json

  4. Configure authentication (Bearer token)

Alternatively, download the spec and import the file.

Testing with cURL

Health Check

Authenticated Request

Schema Validation

The API validates all requests against JSON Schema definitions.

Get Schema for a Service:

Response:

Versioning

The API uses URL-based versioning:

Current: v1 (implicit in /api/ endpoints)

Future versions:

  • /api/v2/ - When introduced, v1 will be supported for 6 months

See Changelog for version history.

Support

  • Interactive Docs: https://api.docs-dispatcher.io/docs

  • OpenAPI Spec: https://api.docs-dispatcher.io/docs/swagger.json

  • Issues: GitHub (TBD)

Next Steps

Last updated