Skip to content

Authentication ​

All API v1 requests require an API key.

http
X-API-KEY: factulit_test_example_key
Accept: application/json
Content-Type: application/json

Keys Belong to One Environment ​

The prefix of a key states which environment issued it, and a key is only valid against that environment's base URL:

PrefixEnvironmentBase URL
factulit_test_Testhttps://api.sandbox-factulit.es
factulit_live_Productionhttps://api.factulit.es

The pairing is checked before the key is looked up, so a mismatch always returns 401 and never reaches your data. There is no way to promote a test key to production: production issues its own key.

Binding Headers ​

An API connection only needs X-API-KEY. The official Factulit store modules also send two headers that identify their installation:

http
X-Factulit-Binding-Id: <uuid>
X-Factulit-Binding-Generation: <uuid>

They are optional for an API connection. If your integration sends them, send both, as UUIDs, matching the connection of the key: otherwise the response is 400 (format) or 409 (mismatch). If you do not need them, do not send them.

Key Handling ​

  • Keep real keys on the server.
  • Do not expose keys in browser JavaScript, mobile apps, public repositories, logs, or support screenshots.
  • Rotate credentials when a key may have been exposed.
  • Use placeholder values in documentation, tests, and examples.

Authentication Errors ​

StatusMeaning
401Missing, malformed, inactive, or invalid key, or a key that belongs to the other environment.
403The key is valid but cannot be associated with an allowed business context.
409The binding headers do not match the connection, or the connection is not active in this environment.
428Binding headers missing on a store module key. API connections never receive it.
429Too many failed authentication attempts. Respect Retry-After; a valid key that authenticated recently is not blocked.

Public API documentation for Factulit.