> For the complete documentation index, see [llms.txt](https://api.qvalia.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.qvalia.io/api-documentation/apis/account-api/account-functions-invoice-functions.md).

# Account Functions/Invoice Functions

Operations related to Qvalia accounts functions

## Get invoice status

> Delivery and processing status for a single invoice.\
> \
> \*\*NB!\*\* All Invoice data under the \`/account\` endpoints requires JSON; only UBL\
> JSON is supported. The response is always JSON regardless of the \`Accept\` header.\
> \
> \`{integrationId}\` is matched against the invoice's \`integrationId\` first. If\
> nothing matches, the same value is retried as an \*\*invoice number\*\*, so either\
> identifier works here.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Account Functions/Invoice Functions","description":"Operations related to Qvalia accounts functions"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"direction":{"name":"direction","in":"path","required":true,"description":"Whether to address an invoice received by, or sent from, the account.","schema":{"type":"string","enum":["incoming","outgoing"]}},"integrationId":{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"},"description":"The integration id (UUID v4) of the transaction/message to get status for"}},"responses":{"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/account/{accountRegNo}/action/invoice/{direction}/status/{integrationId}":{"get":{"tags":["Account Functions/Invoice Functions"],"summary":"Get invoice status","description":"Delivery and processing status for a single invoice.\n\n**NB!** All Invoice data under the `/account` endpoints requires JSON; only UBL\nJSON is supported. The response is always JSON regardless of the `Accept` header.\n\n`{integrationId}` is matched against the invoice's `integrationId` first. If\nnothing matches, the same value is retried as an **invoice number**, so either\nidentifier works here.","operationId":"account-functions/invoice-functions/get-status","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/integrationId"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"data":{"type":"object","description":"","properties":{"message":{"type":"string","description":""},"status":{"type":"object","description":"","properties":{"document_id":{"type":"string","description":""},"order_number":{"type":"string","description":""},"payment_reference":{"type":"string","description":""},"credit_note":{"type":"string","description":""},"reminder":{"type":"string","description":""},"status":{"type":"string","description":""},"sent_at":{"type":"string","description":""},"paid_at":{"type":"string","description":""},"cancelled_at":{"type":"string","description":""},"send_method":{"type":"string","description":""}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not Found. Either no invoice matches `{integrationId}` — as an integrationId or\nas an invoice number — or the invoice exists but has no status recorded yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unprocessable Entity. Returned when `{direction}` is neither `incoming` nor\n`outgoing`, or `{integrationId}` is absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Create from Order

> \_(Requires “Order to Cash” (O2C) or Order Management addon)\_\n\n\`/account/{accountRegNo}/action/invoice/createandsend/{integrationId}\`\n\nThis Endpoint will use an Incoming Order and generate an Outgoing Invoice from it.\n\nNB! The Addressing (EndpointID) in the Order will be used as Address for the Outgoing Invoice!\n\nYou need to “update” the Order by using the overwrite flag on it to change the Addressing, if needed!

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Account Functions/Invoice Functions","description":"Operations related to Qvalia accounts functions"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"integrationId":{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"},"description":"The integration id (UUID v4) of the transaction/message to get status for"}},"responses":{"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/account/{accountRegNo}/action/invoice/createandsend/{integrationId}":{"post":{"tags":["Account Functions/Invoice Functions"],"summary":"Create from Order","description":"_(Requires “Order to Cash” (O2C) or Order Management addon)_\\n\\n`/account/{accountRegNo}/action/invoice/createandsend/{integrationId}`\\n\\nThis Endpoint will use an Incoming Order and generate an Outgoing Invoice from it.\\n\\nNB! The Addressing (EndpointID) in the Order will be used as Address for the Outgoing Invoice!\\n\\nYou need to “update” the Order by using the overwrite flag on it to change the Addressing, if needed!","operationId":"account-functions/invoice-functions/create-from-order","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/integrationId"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"data":{"type":"object","description":"","properties":{"message":{"type":"string","description":""},"data":{"type":"object","description":"","properties":{"invoice":{"type":"object","description":"","properties":{"Invoice":{"type":"string","description":""}}}}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not Found. Either no order matches `{integrationId}`, or one of the two\ntransformation steps could not produce a document — the order could not be\nturned into an invoice, or the invoice could not be turned into a QIP invoice.\nNothing is stored and nothing is sent in any of these cases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict. A `invoice.number` was supplied in the body and an outgoing invoice\nwith that number already exists for this account. Nothing is created. Omit\n`invoice.number` to have one generated, or use a different one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unprocessable Entity. Either the request body failed validation — `send.method`\nis required and must be `peppol`, `email` or `postal`, and unknown properties\nare rejected — or, for `send.method: peppol`, the generated invoice failed\nPeppol validation. In the latter case the invoice is never sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"send":{"type":"object","description":"","properties":{"method":{"type":"string","description":""}}}}}}}}}}}}
```

## Get Invoice from Order

> \_(Requires “Order to Cash” (O2C) or Order Management addon)\_\
> \
> Generates a Peppol (UBL) Invoice from an Incoming Order and returns it. Use it to\
> review the Invoice before it is sent, or to adjust it and send it yourself.\
> \
> Nothing is stored and nothing is sent, and the Order is not marked as read, so the\
> same Order can be requested again.\
> \
> NB! The Addressing (EndpointID) in the Order will be used as Address for the Invoice!\
> \
> The Invoice is returned as UBL JSON by default; send \`Accept: application/xml\` to\
> get the UBL XML document instead.\
> \
> The Invoice is only validated against Peppol when you add \`validate=true\`. Without\
> it, a \`200\` does not mean the Invoice is valid Peppol.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Account Functions/Invoice Functions","description":"Operations related to Qvalia accounts functions"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"integrationId":{"name":"integrationId","in":"path","required":true,"schema":{"type":"string"},"description":"The integration id (UUID v4) of the transaction/message to get status for"}},"responses":{"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/account/{accountRegNo}/action/order/{integrationId}/toinvoice":{"get":{"tags":["Account Functions/Invoice Functions"],"summary":"Get Invoice from Order","description":"_(Requires “Order to Cash” (O2C) or Order Management addon)_\n\nGenerates a Peppol (UBL) Invoice from an Incoming Order and returns it. Use it to\nreview the Invoice before it is sent, or to adjust it and send it yourself.\n\nNothing is stored and nothing is sent, and the Order is not marked as read, so the\nsame Order can be requested again.\n\nNB! The Addressing (EndpointID) in the Order will be used as Address for the Invoice!\n\nThe Invoice is returned as UBL JSON by default; send `Accept: application/xml` to\nget the UBL XML document instead.\n\nThe Invoice is only validated against Peppol when you add `validate=true`. Without\nit, a `200` does not mean the Invoice is valid Peppol.","operationId":"account-functions/invoice-functions/get-invoice-from-order","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/integrationId"},{"name":"validate","in":"query","required":false,"description":"Validate the generated Invoice against the Peppol rules (schematron) before\nreturning it. An Invoice that fails is answered `422` instead. The recipient's\nPeppol registration is not checked, since nothing is sent.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":""},"data":{"type":"array","description":"A single element, the generated Invoice.","items":{"type":"object","properties":{"Invoice":{"type":"object","description":"UBL JSON Invoice data"}}}}}}},"application/xml":{"schema":{"type":"string","description":"The generated Invoice as a UBL XML document."}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not Found. Either no Incoming Order for this account matches `{integrationId}`,\nor the Order could not be turned into an Invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unprocessable Entity. Either the request failed validation — unknown query\nparameters are rejected — or, with `validate=true`, the generated Invoice failed\nPeppol validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Look up a Peppol participant

> Queries the Peppol directory for a participant and returns the document types it is\
> registered to receive. Use it before sending to confirm a recipient can accept the\
> document you intend to send — an invoice to a participant not registered for it is\
> rejected by the network.\
> \
> Optionally narrow the answer to a single document type with \`docTypeRoot\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Account API","version":"1.0.0"},"tags":[{"name":"Account Functions/Invoice Functions","description":"Operations related to Qvalia accounts functions"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"peppolId":{"name":"peppolId","in":"path","required":true,"description":"Peppol participant identifier, as `<scheme>:<identifier>` — e.g. `0007:1234567890`\nfor a Swedish organisation number.","schema":{"type":"string","pattern":"^[0-9]{4}:[a-zA-Z0-9-_]{6,}$"}}},"responses":{"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/account/{accountRegNo}/action/lookup/peppol/{peppolId}":{"get":{"tags":["Account Functions/Invoice Functions"],"summary":"Look up a Peppol participant","description":"Queries the Peppol directory for a participant and returns the document types it is\nregistered to receive. Use it before sending to confirm a recipient can accept the\ndocument you intend to send — an invoice to a participant not registered for it is\nrejected by the network.\n\nOptionally narrow the answer to a single document type with `docTypeRoot`.","operationId":"account-functions/invoice-functions/lookup-peppol","parameters":[{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/peppolId"},{"name":"docTypeRoot","in":"query","required":false,"description":"Restrict the lookup to one document type, named by its UBL root element, e.g.\n`Invoice`, `OrderResponse` or `CreditNote`.","schema":{"type":"string","pattern":"^[A-Z]{1}[a-zA-Z]{2,}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","description":"The participant as the Peppol directory reports it, including the\ndocument types it is registered to receive."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"description":"Unprocessable Entity. Returned when `peppolId` is not of the form\n`<scheme>:<identifier>`, e.g. `0007:1234567890`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api.qvalia.io/api-documentation/apis/account-api/account-functions-invoice-functions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
