gitlabEdit

๐Ÿš€Quickstart (Mock Sandbox)

Get started with Docs-Dispatcher in 5 minutes using the validation endpoint - no real API calls, no provider configuration needed.

What You'll Do

In this quickstart, you'll:

  1. Get a JWT authentication token

  2. Validate an invoice request (without sending it)

  3. Understand the request/response format

  4. See what a successful dispatch looks like

No risk: The validation endpoint checks your request format without calling external providers or charging credits.

Prerequisites

  • An account on Docs-Dispatcher (sign up at TBD)

  • curl or an HTTP client

  • No provider configuration needed for validation

Step 1: Get Your JWT Token

First, authenticate to get a JWT token:

Response:

Save the token - you'll use it in the next step:

circle-info

Token Validity: JWT tokens expire after 120 minutes. See Get a JWT for refresh workflow.

Step 2: Validate an Invoice Request

Now send a validation request to test your invoice format:

Success Response:

Validation Error Example:

circle-check

Step 3: Understand the Request Format

Let's break down the validation request:

providerName (required)

Specifies which invoicing provider to use. Options:

  • ipaidthat - iPaidThat

  • qonto - Qonto

  • pennylane - PennyLane

  • superpdp - SuperPDP

documentType (required)

What type of document to generate:

  • INVOICE - Standard invoice

  • E_INVOICE - Electronic invoice (France)

  • QUOTE - Quote/Devis

  • CREDIT - Credit note/Avoir

template (required)

  • id - Template ID from Templater (created via UI or API)

  • data - JSON object with template variables

circle-info

Template Data Schema: Each template has its own data schema. The validation endpoint checks that your data matches the template's expected structure.

Step 4: Send a Real Invoice

Once your request validates successfully, change /validate to actual dispatch:

Real Dispatch Example:

Success Response:

circle-exclamation

Next Steps

Now that you've validated your first request:

  1. Set up provider configs - Configure Qonto, PennyLane, etc.

  2. Full invoice recipe - Generate and send with all options

  3. Async dispatch - Use webhooks for background processing

  4. Use SDKs - Node.js, PHP, or Java instead of curl

Common Quickstart Issues

"Unauthorized" (401)

  • JWT token expired (120min validity)

  • Wrong credentials

  • Fix: Get a new token via /auth

"Template not found" (404)

  • Template ID doesn't exist

  • Template belongs to different company

  • Fix: Check template ID in Templater UI

"Invalid provider" (400)

  • Provider name typo (case-sensitive)

  • Provider not supported for service

  • Fix: See Providers Overview for valid names

Validation Fails

  • Check error messages for specific field issues

  • Verify required fields for your provider

  • Fix: See provider-specific docs for requirements

Validation vs Real Dispatch

Feature

/validate

Real dispatch

Checks request format

โœ…

โœ…

Validates field requirements

โœ…

โœ…

Calls external provider

โŒ

โœ…

Generates document

โŒ

โœ…

Sends to customer

โŒ

โœ…

Charges credits

โŒ

โœ…

Returns provider response

โŒ

โœ…

Quickstart Summary

You've learned:

  • โœ… How to authenticate and get a JWT

  • โœ… How to validate requests without risk

  • โœ… The basic request structure for invoicing

  • โœ… How to switch from validation to real dispatch

Ready for production? โ†’ Full Invoice Recipe

Last updated