POST /v1/invoice/einvoicing/enrollment
const url = 'https://api.asap.cool/v1/invoice/einvoicing/enrollment';const options = {method: 'POST', 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 POST \ --url https://api.asap.cool/v1/invoice/einvoicing/enrollment \ --cookie asap_session=<asap_session>Authorizations
Section intitulée « Authorizations »Responses
Section intitulée « Responses »Enrolment requested (or already active); the worker confirms asynchronously.
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"}Not a signed-in Owner or Admin of the 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"}The company profile has no valid SIREN.
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"}The enrolment job could not be queued; retry.
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"}