Aller au contenu

POST /v1/invoice/einvoicing/enrollment

POST
/v1/invoice/einvoicing/enrollment
curl --request POST \
--url https://api.asap.cool/v1/invoice/einvoicing/enrollment \
--cookie asap_session=<asap_session>

Enrolment requested (or already active); the worker confirms asynchronously.

Media typeapplication/json

Public projection of an org’s directory enrolment.

object
addressable
required

Whether inbound invoices for this SIREN can be routed to the org.

boolean
last_error

Reason of the last failed attempt, when the status is error.

string | null
recipient_id

Recipient identifier assigned by the directory, set once active.

string | null
siren

SIREN the org is (or would be) addressable by, when known.

string | null
status
required

not_enrolled | pending | active | error.

string
updated_at

RFC3339 timestamp of the last enrolment change, when enrolled at all.

string | null
Examplegenerated
{
"addressable": true,
"last_error": "example",
"recipient_id": "example",
"siren": "example",
"status": "example",
"updated_at": "example"
}

No active org.

Media typeapplication/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Examplegenerated
{
"code": "example",
"field": "example",
"message": "example"
}

Not a signed-in Owner or Admin of the org.

Media typeapplication/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Examplegenerated
{
"code": "example",
"field": "example",
"message": "example"
}

The company profile has no valid SIREN.

Media typeapplication/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Examplegenerated
{
"code": "example",
"field": "example",
"message": "example"
}

The enrolment job could not be queued; retry.

Media typeapplication/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Examplegenerated
{
"code": "example",
"field": "example",
"message": "example"
}