The xmlvalid collection has a request for each endpoint of the API, grouped as Validate, Results and Account, each with a description and example responses recorded from the real API.
Get the collection
- In Postman, choose Import.
- Paste the link
https://xmlvalid.com/docs/api/postman.json, or download the file and drop it in.
Prefer generating it yourself? Postman also imports the OpenAPI description, but the collection adds the examples, the variables and the scripts below.
Add your API key
- Make a key under Dashboard → API keys (a free account includes 100 validations a month).
- Select the collection, open Variables and paste the key into the Current value of
apiKey. Current values stay on your machine and are not shared when you share the collection. - Save. Every request sends it as
Authorization: Bearer xv_…, set once on the collection.
Using several keys, or a staging server? Put apiKey and baseUrl in a Postman environment instead; an environment's values take precedence over the collection's.
Your first validation
Open Validate → Validate an e-invoice by URL and send it. Its body asks xmlvalid to fetch an example Peppol invoice and check it with schema: auto:
{
"url": "https://xmlvalid.com/schemas/peppol-bis-3-invoice/example",
"schema": "auto",
"wait": 30
}
The answer is the finished validation with "valid": true. Then open Validate XML sent as the body: the body is the same invoice. Change the amount in cbc:PayableAmount and send it again to see business rule BR-CO-16 fail, with its line and a link to the rule's page. The request's Examples show both answers.
If a validation takes longer than wait seconds, the API answers 202 with the status queued or running: send Results → Fetch a validation until it is done.
Files and your own schemas
- Validate a file: in Body → form-data, choose a file for
document. XML, gzip, ZIP archives and Factur-X or ZUGFeRD PDFs are accepted. - Validate against your own schema: a file for
documentand an XSD, DTD or RelaxNG file forschema_file. For a schema with imports, save it once and pass its name (my-12) asschemainstead. - Validate with your own Schematron rules: a
.schfile forrules_file, run after the schema check.
Account → List schemas gives the name of every catalog schema and of your saved ones.
Results and reports
Each validate request saves the id of its validation in the collection variable validationId (see its Scripts tab), so the requests under Results work right after it: fetch it, cancel it, get its HTML report, or share it as a public link (Pro). The Postman Console shows a one-line summary of each run.
From Postman to code
When a request does what you need, open its Code panel (the </> icon) for the same call in curl, Python, JavaScript, PHP, Java, C# and more. For the response fields and the error codes, see the API reference; for CI and scripts, the command-line client does the requests and the polling for you.
Run it in CI with Newman
Newman runs the collection from the command line, for a smoke test of your key and quota:
npx newman run https://xmlvalid.com/docs/api/postman.json \
--env-var apiKey=$XMLVALID_API_KEY \
--folder Account
The requests that send a file need one chosen in Postman, so leave them out of unattended runs.