Fiskaly Upsert Client
Description
Section titled “Description”This module allows creating or updating a device (client) in Fiskaly via PUT (upsert) operation. In the Fiskaly context, a “Client” represents a point of sale or device from which invoices are issued. Each billing device must be registered as a client associated with a taxpayer.
If no client_id is provided, a UUIDv4 is automatically generated. Optional fields include client tax identification number, country code and address in JSON format.
The module is of type hidden (hidden in the main interface).
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Fiskaly credential |
| taxpayer_id | text | Yes | UUID of the taxpayer that owns the device |
| client_id | text | No | Client UUID (auto-generated if empty) |
| name | text | Yes | Identifying name of the device/POS |
| tax_number | text | No | Client NIF/CIF |
| country_code | text | No | ISO country code (default: ES) |
| address | textarea | No | Address in JSON: {street, city, postal_code} |
Credentials
Section titled “Credentials”Requires Fiskaly type credentials with:
- api_key: Fiskaly API Key
- api_secret: Fiskaly API Secret
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "success": true, "client": { "...datos del dispositivo creado..." }, "client_id": "550e8400-e29b-41d4-a716-446655440000", "message": "Cliente \"TPV Principal\" creado/actualizado exitosamente" }}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi-fiskaly", "taxpayer_id": "uuid-contribuyente", "name": "TPV Tienda Madrid", "tax_number": "B12345678", "country_code": "ES", "address": "{\"street\": \"Calle Mayor 1\", \"city\": \"Madrid\", \"postal_code\": \"28001\"}"}API Used
Section titled “API Used”- Fiskaly SIGN ES API - PUT
/taxpayers/{taxpayer_id}/clients/{client_id}
- Uses PUT (upsert): if the client already exists, it is updated
- If
client_idis not provided, a UUIDv4 is automatically generated - The
addressfield must be a valid JSON with the keys street, city and postal_code - The device name is required and should be identifying
Related Nodes
Section titled “Related Nodes”- FiskalyGetClients - Get devices
- FiskalyUpsertTaxpayer - Create/update taxpayer
- FiskalyCreateInvoice - Create/update invoice