e-invoice-api
Version:
The official TypeScript library for the e-invoice API
29 lines • 1.34 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../core/resource.mjs";
import { multipartFormRequestOptions } from "../internal/uploads.mjs";
export class Validate extends APIResource {
/**
* Validate if the JSON document can be converted to a valid UBL document
*/
validateJson(body, options) {
return this._client.post('/api/validate/json', { body, ...options });
}
/**
* Validate if a Peppol ID exists in the Peppol network and retrieve supported
* document types. The peppol_id must be in the form of `<scheme>:<id>`. The scheme
* is a 4-digit code representing the identifier scheme, and the id is the actual
* identifier value. For example, for a Belgian company it is `0208:0123456789`
* (where 0208 is the scheme for Belgian enterprises, followed by the 10 digits of
* the official BTW / KBO number).
*/
validatePeppolID(query, options) {
return this._client.get('/api/validate/peppol-id', { query, ...options });
}
/**
* Validate the correctness of a UBL document
*/
validateUbl(body, options) {
return this._client.post('/api/validate/ubl', multipartFormRequestOptions({ body, ...options }, this._client));
}
}
//# sourceMappingURL=validate.mjs.map