Skip to main content

Your First API Call

This guide walks you through making your first API call to GoRoute and understanding the response.

Check API Statusโ€‹

Start by verifying the API is operational:

curl -X GET https://app.goroute.ai/peppol-api/peppol/version \
-H "X-API-Key: YOUR_API_KEY"

Response:

{
"version": "1.0.0",
"peppol_ap_id": "POP000991",
"environment": "production",
"status": "operational"
}

Lookup a Peppol Participantโ€‹

Query the Peppol network to check if a participant exists:

curl -X GET "https://app.goroute.ai/peppol-api/api/v1/participants/lookup?peppol_id=9915:testparticipant" \
-H "X-API-Key: YOUR_API_KEY"

Response (Participant Found):

{
"found": true,
"participant_id": "9915:testparticipant",
"scheme": "0088",
"name": "Test Organization",
"country": "NL",
"capabilities": [
{
"document_type": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice",
"process_id": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0"
}
],
"smp_endpoint": "https://smp.goroute.ai"
}

Response (Participant Not Found):

{
"found": false,
"participant_id": "9915:unknown",
"message": "Participant not registered on the Peppol network"
}

List Your Organizationsโ€‹

Retrieve organizations associated with your API key:

curl -X GET https://app.goroute.ai/peppol-api/api/v1/organizations \
-H "X-API-Key: YOUR_API_KEY"

Response:

{
"organizations": [
{
"org_id": "org_abc123",
"name": "Acme Corporation",
"peppol_id": "0106:12345678",
"country": "NL",
"created_at": "2025-06-15T10:00:00Z",
"status": "active"
}
],
"total": 1
}

List Recent Transactionsโ€‹

View your recent invoice transactions:

curl -X GET "https://app.goroute.ai/peppol-api/api/v1/transactions?limit=5" \
-H "X-API-Key: YOUR_API_KEY"

Response:

{
"transactions": [
{
"transaction_id": "txn_xyz789",
"direction": "outbound",
"document_type": "invoice",
"invoice_number": "INV-2026-001",
"sender_id": "0106:12345678",
"receiver_id": "0204:DE987654321",
"status": "delivered",
"created_at": "2026-01-25T14:30:00Z",
"delivered_at": "2026-01-25T14:30:12Z"
}
],
"total": 1,
"limit": 5,
"offset": 0
}

Understanding Responsesโ€‹

Success Responsesโ€‹

Status CodeMeaning
200 OKRequest successful
201 CreatedResource created successfully
202 AcceptedRequest accepted for processing
204 No ContentSuccess with no response body

Error Responsesโ€‹

Status CodeMeaning
400 Bad RequestInvalid request syntax or parameters
401 UnauthorizedMissing or invalid API key
403 ForbiddenAPI key doesn't have permission
404 Not FoundResource doesn't exist
422 Unprocessable EntityValidation error
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorServer error (contact support)

Error Response Formatโ€‹

{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invoice validation failed",
"details": [
{
"field": "receiver.peppol_id",
"message": "Invalid Peppol identifier format"
}
]
},
"request_id": "req_abc123"
}
Request ID

Always include the request_id when contacting support about an error. It helps us locate your specific request in our logs.

Common Request Headersโ€‹

HeaderRequiredDescription
X-API-KeyYesYour API key
Content-TypeFor POST/PUTapplication/json
AcceptNoResponse format (default: application/json)
X-Idempotency-KeyNoPrevent duplicate operations

Next Stepsโ€‹

Now that you've made your first API call: