Aller au contenu

PUT /v1/invoice/settings

PUT
/v1/invoice/settings
curl --request PUT \
--url https://api.asap.cool/v1/invoice/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "acompte_prefix": "example", "auto_convert_signed_quotes": true, "auto_finalize_signed_invoices": true, "auto_send_signed_invoices": true, "avoir_prefix": "example", "bic": "example", "default_discount_terms": "example", "default_payment_terms": "example", "default_validity_days": 1, "default_vat_exigibility": "example", "devis_prefix": "example", "einvoicing_enabled": true, "ereporting_prefs": "example", "facture_prefix": "example", "footer_mentions": "example", "iban": "example", "pdp_config": "example", "penalty_rate": "example", "recovery_fee": 1 }'
Media type application/json

Body of PUT /v1/invoice/settings. Prefixes and the few non-nullable fields default to sensible French values; omitted optionals reset.

object
acompte_prefix

Number prefix for deposit invoices (defaults to AC).

string
auto_convert_signed_quotes

Whether to auto-convert a signed quote to a draft facture on acceptance (defaults to false).

boolean
auto_finalize_signed_invoices

Whether to also finalize (NF203) the auto-created invoice. Implies auto_convert_signed_quotes; the cascade is normalized server-side.

boolean
auto_send_signed_invoices

Whether to also email the auto-finalized invoice to the client. Implies auto_finalize_signed_invoices; the cascade is normalized server-side.

boolean
avoir_prefix

Number prefix for credit notes (defaults to AV).

string
bic

Settlement BIC.

string | null
default_discount_terms

Default discount terms.

string | null
default_payment_terms

Default payment terms.

string | null
default_validity_days

Default quote validity, in days (defaults to 30).

integer format: int32
default_vat_exigibility

Default VAT exigibility (debits/encaissements, defaults to debits).

string | null
devis_prefix

Number prefix for quotes (defaults to DEV).

string
einvoicing_enabled

Whether to opt into the e-invoicing flow (defaults to false).

boolean
ereporting_prefs

E-reporting preferences (JSONB).

facture_prefix

Number prefix for invoices (defaults to FAC).

string
footer_mentions

Footer mentions.

string | null
iban

Settlement IBAN.

string | null
pdp_config

PDP config (JSONB).

penalty_rate

Late-payment penalty rate as a percentage token.

string | null
recovery_fee

Fixed recovery indemnity, in cents (defaults to 4000 = 40 EUR).

integer format: int64
Example generated
{
"acompte_prefix": "example",
"auto_convert_signed_quotes": true,
"auto_finalize_signed_invoices": true,
"auto_send_signed_invoices": true,
"avoir_prefix": "example",
"bic": "example",
"default_discount_terms": "example",
"default_payment_terms": "example",
"default_validity_days": 1,
"default_vat_exigibility": "example",
"devis_prefix": "example",
"einvoicing_enabled": true,
"ereporting_prefs": "example",
"facture_prefix": "example",
"footer_mentions": "example",
"iban": "example",
"pdp_config": "example",
"penalty_rate": "example",
"recovery_fee": 1
}

Upserted invoice settings.

Media type application/json

Public projection of [InvoiceSettings]. Amounts are in cents.

object
acompte_prefix
required

Number prefix for deposit invoices.

string
auto_convert_signed_quotes
required

Whether a signed quote is auto-converted to a draft facture on acceptance.

boolean
auto_finalize_signed_invoices
required

Whether an invoice auto-created from a signed quote is also finalized (NF203) automatically. Implies auto_convert_signed_quotes.

boolean
auto_send_signed_invoices
required

Whether an auto-finalized invoice is also emailed to the client. Implies auto_finalize_signed_invoices.

boolean
avoir_prefix
required

Number prefix for credit notes.

string
bic

Settlement BIC.

string | null
created_at
required

RFC3339 creation timestamp.

string
default_discount_terms

Default early-payment discount terms.

string | null
default_payment_terms

Default payment terms.

string | null
default_validity_days
required

Default quote validity, in days.

integer format: int32
default_vat_exigibility
required

Default VAT chargeability basis.

string
devis_prefix
required

Number prefix for quotes.

string
einvoicing_enabled
required

Whether this org opted into the e-invoicing flow.

boolean
ereporting_prefs

E-reporting preferences.

facture_prefix
required

Number prefix for invoices.

string
footer_mentions

Footer mentions / legal notes.

string | null
iban

Settlement IBAN.

string | null
org_id
required

Owning org id.

string format: uuid
pdp_config

Partner dematerialization-platform (PDP) config.

penalty_rate

Late-payment penalty rate as a percentage token.

string | null
recovery_fee
required

Fixed recovery indemnity, in cents.

integer format: int64
updated_at
required

RFC3339 last-update timestamp.

string
Example generated
{
"acompte_prefix": "example",
"auto_convert_signed_quotes": true,
"auto_finalize_signed_invoices": true,
"auto_send_signed_invoices": true,
"avoir_prefix": "example",
"bic": "example",
"created_at": "example",
"default_discount_terms": "example",
"default_payment_terms": "example",
"default_validity_days": 1,
"default_vat_exigibility": "example",
"devis_prefix": "example",
"einvoicing_enabled": true,
"ereporting_prefs": "example",
"facture_prefix": "example",
"footer_mentions": "example",
"iban": "example",
"org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"pdp_config": "example",
"penalty_rate": "example",
"recovery_fee": 1,
"updated_at": "example"
}

No active org.

Media type application/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"
}

Missing invoice:write scope.

Media type application/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"
}

Invalid settings payload.

Media type application/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"
}