IRS filing season is open. File your IRS for free (early access) →
descodify

Developers

A real invoicing API, certified for Portugal

Issue AT-certified invoices, sync customers and products, straight from your own storefront, back-office, or automation. It's a REST API over the same certified path Descodify's own app uses, not a bolt-on.

Certified invoicing, coming soon

Get early access - free tier includes unlimited invoicing.

Already have an account? Create a key in Settings → Developers.

Three calls to your first certified invoice

Create a key in Settings → Developers, then create a customer and issue an invoice against it. Money is in cents, VAT rates are integer percent, and an Idempotency-Key header is required whenever you issue.

curl https://descodify.pt/api/v1/customers \
  -H "Authorization: Bearer dsc_live_..." \
  -H "Content-Type: application/json" \
  -d '{"customerType":"business","name":"Acme Lda","country":"PT"}'

curl https://descodify.pt/api/v1/invoices \
  -H "Authorization: Bearer dsc_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f2c6b6a-2f0e-4b0a-9c0a-000000000001" \
  -d '{
    "invoiceType": "invoice",
    "customerId": "<id from above>",
    "action": "issue",
    "items": [
      { "description": "Consulting", "quantity": 1, "unitPrice": 50000, "vatRate": 23, "itemType": "services" }
    ]
  }'

The response is the issued invoice: sequential number, ATCUD, QR code data, and at_comm_status: "pending" while AT communication runs in the background. Full walkthrough, field-by-field, in the quickstart guide.

What's in the API

Three resources, full lifecycle. Every response mirrors the same data model the app itself uses, so nothing is a stripped-down view.

Customers

List, get, create, update, delete. Business or private customers, with EU VAT number validation.

Products

List, get, create, update, delete. Goods or services, with their own VAT tier and unit price.

Invoices

Create a draft, issue it, cancel it, fetch the PDF, and create credit or debit notes. Issuing runs the same certified path as the app: series, ATCUD, digital signature, AT communication.

Business profile

Read-only. Your issuer identity and VAT regime, so your integration knows how to construct a valid invoice.

Auth, scopes, and rate limits

Org-scoped API keys

The account owner creates a key in Settings → Developers. Each key belongs to exactly one organization, no org identifier in the URL, and acts with that owner's permissions, never more. Send it as Authorization: Bearer dsc_live_.... The secret is shown once, at creation.

Scopes

Six scopes: customers:read, customers:write, and the matching pair for products and invoices. A write scope always covers read on the same resource; pick only what your key needs at creation, since scopes are fixed after that (rotate the key if you need more).

Rate limits and fair usage

Every call is rate-limited per key under a fair-usage policy. Go over it and you get a 429 with a Retry-After header telling you how long to back off. Certified invoice issuance additionally has a daily quota (drafts and reads don't count against it). Hit it and that call returns a daily_quota_exceeded response with a mailto to request a higher threshold.

Certified, not just connected

A lot of invoicing APIs built for other markets will happily hand you back a PDF that isn't a legally valid Portuguese invoice. Software that issues Portuguese invoices has to be AT-certified, assign sequential ATCUD codes, and report every issued document to the tax authority. Descodify is certified software, and the API is a thin layer over the exact same certified path, not a workaround.

Every request, and everything it touches, stays on infrastructure hosted in the EU (Germany).

Reference and terms

The full OpenAPI 3.1 document is public, no key required, at /api/v1/openapi.json. Browse it interactively on the API reference page, or read the quickstart guide for a worked example of every step. Using the API is covered by the same Terms of Service as the rest of the product.

Create your account and generate your first API key from Settings → Developers.

Get started free