GET /v1/invoice/einvoicing/enrollment
const url = 'https://api.asap.cool/v1/invoice/einvoicing/enrollment';const options = {method: 'GET', headers: {cookie: 'asap_session=<asap_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.asap.cool/v1/invoice/einvoicing/enrollment \ --cookie asap_session=<asap_session>Authorizations
Section intitulée « Authorizations »Responses
Section intitulée « Responses »Current enrolment state (never 404: an org that never enrolled reads as not_enrolled).
Public projection of an org’s directory enrolment.
object
Whether inbound invoices for this SIREN can be routed to the org.
Reason of the last failed attempt, when the status is error.
Recipient identifier assigned by the directory, set once active.
SIREN the org is (or would be) addressable by, when known.
not_enrolled | pending | active | error.
RFC3339 timestamp of the last enrolment change, when enrolled at all.
Examplegenerated
{ "addressable": true, "last_error": "example", "recipient_id": "example", "siren": "example", "status": "example", "updated_at": "example"}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Examplegenerated
{ "code": "example", "field": "example", "message": "example"}Missing invoice:read scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Examplegenerated
{ "code": "example", "field": "example", "message": "example"}