Account
An API key selects one account and one environment. Retrieve it at /v1/account; no account ID is required in the path. The live field identifies Live or Test data.
Update business identity, contact information, and address through PATCH /v1/account. Issued invoices retain their supplier snapshot. Invoicing configuration has its own resource at /v1/account/invoicing.
The Account object
id
string
object
string
account.live
boolean
name
string
tax_id
object
Show child propertiesHide child properties
id
string
object
string
tax_id.live
boolean
country
string
type
enum
es_nif
A Spanish NIF, including DNI and NIE identifiers for individuals and NIF identifiers for legal entities.
eu_vat
A VAT identifier issued by an EU member state and checked for intra-EU registration.
local
A domestic fiscal identifier that FiscalRail validates locally without querying a registry.
value
string
owner
object
Show child propertiesHide child properties
type
enum
account
The FiscalRail account whose legal entity uses this Tax ID.
customer
The customer associated with this Tax ID.
id
string
type.verification
object or null
Show child propertiesHide child properties
status
enum
pending
The registry check is queued, running or waiting to be retried.
completed
The registry returned a result; inspect valid for the outcome.
failed
FiscalRail could not complete the registry query; this is not evidence that the Tax ID is invalid.
valid
boolean or null
completed_at
string or null
email
string or null
phone
string or null
address
object
Show child propertiesHide child properties
line_1
string
line_2
string or null
city
string
postal_code
string
state
string or null
country
string
tax_regime
string
timezone
string
created_at
string
updated_at
string
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
Retrieve the authenticated account
/v1/accountReturns the account selected by the API key.
200
An Account object.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
account = client.account.retrieve()
require "fiscalrail"
client = FiscalRail::Client.new(api_key: ENV.fetch("FISCALRAIL_API_KEY"))
account = client.account.retrieve
curl --request GET \
'https://api.fiscalrail.com/v1/account' \
--header "Authorization: Bearer fra_test_..."
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
Update the authenticated account
/v1/accountUpdates business identity, contact information, or address. Issued invoices retain their immutable supplier snapshot.
name
string
email
string or null
phone
string or null
address
object
Show child propertiesHide child properties
line_1
string or null
line_2
string or null
city
string or null
postal_code
string or null
state
string or null
country
string or null
200
The updated Account object.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
account = client.account.update(
address={
"line_1": "Clara del Rey 64",
"line_2": "6\u00BAB",
},
)
require "fiscalrail"
client = FiscalRail::Client.new(api_key: ENV.fetch("FISCALRAIL_API_KEY"))
account = client.account.update(
address: {
"line_1" => "Clara del Rey 64",
"line_2" => "6ºB",
},
)
curl --request PATCH \
'https://api.fiscalrail.com/v1/account' \
--header "Authorization: Bearer fra_test_..." \
--json '{
"address": {
"line_1": "Clara del Rey 64",
"line_2": "6ºB"
}
}'
{
"id": "acct_14Vxtqg2nwvPR75TpsGH8N",
"object": "account",
"live": true,
"name": "Example supplier",
"tax_id": {
"id": "tax_id_14Vxtqg2nwvPR75TpsGH8N",
"object": "tax_id",
"live": true,
"country": "ES",
"type": "es_nif",
"value": "B02850360",
"owner": {
"type": "account",
"id": "acct_14Vxtqg2nwvPR75TpsGH8N"
},
"verification": {
"status": "completed",
"valid": true,
"completed_at": "2026-08-09T10:24:00Z"
}
},
"email": "billing@example.com",
"phone": "+34910000000",
"address": {
"line_1": "Gran Via 1",
"line_2": null,
"city": "Madrid",
"postal_code": "28013",
"state": "Madrid",
"country": "ES"
},
"tax_regime": "es",
"timezone": "Europe/Madrid",
"created_at": "2026-07-31T09:00:00Z",
"updated_at": "2026-07-31T09:00:00Z"
}
Invoicing settings
The invoicing resource controls PDF locale and footer, numbering scope, default series, and ordered default payment instructions. default_series replaces all three assignments when supplied. Use footer: null to clear the footer. An empty payment-instruction array removes all defaults.
A rendered PDF remains cached when these settings change. An older invoice whose PDF has not yet been rendered can use the new locale or footer.
The Account Invoicing object
object
string
account_invoicing.locale
enum
en
es
footer
string or null
numbering_scope
enum
account.account
customer
default_series
object
Show child propertiesHide child properties
invoice
string
series.credit_note
object or null
amendment
object or null
default_payment_instructions
array of strings
{
"object": "account_invoicing",
"locale": null,
"footer": null,
"numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"amendment": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
]
}
Retrieve invoicing settings
/v1/account/invoicingReturns the selected account's invoicing configuration.
200
Account invoicing settings.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
invoicing = client.account.invoicing.retrieve()
require "fiscalrail"
client = FiscalRail::Client.new(api_key: ENV.fetch("FISCALRAIL_API_KEY"))
invoicing = client.account.invoicing.retrieve
curl --request GET \
'https://api.fiscalrail.com/v1/account/invoicing' \
--header "Authorization: Bearer fra_test_..."
{
"object": "account_invoicing",
"locale": null,
"footer": null,
"numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"amendment": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
]
}
Update invoicing settings
/v1/account/invoicingOmitted fields remain unchanged. Default series and payment instructions are replaced atomically when supplied. Settings affect PDFs rendered after the update, including older invoices without a cached PDF.
locale
enum
en
es
footer
string or null
numbering_scope
enum
account.account
customer
default_series
object
Show child propertiesHide child properties
invoice
string
required
series.credit_note
object or null
required
amendment
object or null
required
default_payment_instructions
array of strings
200
Updated account invoicing settings.
JSON
import os
from fiscalrail import FiscalRail
client = FiscalRail(os.environ["FISCALRAIL_API_KEY"])
invoicing = client.account.invoicing.update(
numbering_scope="customer",
)
require "fiscalrail"
client = FiscalRail::Client.new(api_key: ENV.fetch("FISCALRAIL_API_KEY"))
invoicing = client.account.invoicing.update(
numbering_scope: "customer",
)
curl --request PATCH \
'https://api.fiscalrail.com/v1/account/invoicing' \
--header "Authorization: Bearer fra_test_..." \
--json '{
"numbering_scope": "customer"
}'
{
"object": "account_invoicing",
"locale": null,
"footer": null,
"numbering_scope": "account",
"default_series": {
"invoice": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"credit_note": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ",
"amendment": "inv_ser_14Vxtqg4QFd6rL8cUoK3sZ"
},
"default_payment_instructions": [
"pay_ins_14Vxtqm9KHu4rP3eZyN8gT"
]
}