Aller au contenu

POST /v1/invoice/einvoicing/disconnect

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

Disconnected (idempotent); the org is no longer addressable.

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
connection

State of the OAuth connection to the platform: connected, pending_review (the platform is still verifying the company) or reauth_required (consent must be given again). Absent when the org never connected.

string | null
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

Example generated

{
"addressable": true,
"connection": "example",
"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

Example generated

{
"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

Example generated

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