FURS Certificate
FURS Certificate
Upload and manage the P12/PFX certificate required for FURS fiscalization
Upload FURS certificate
/fiscalization/furs/settings/certificateUpload a P12/PFX certificate for FURS fiscalization. The certificate is extracted, then verified with a live probe against the FURS authority for the entity's environment, and is stored securely only after that probe succeeds; the passphrase is encrypted before storage. Responds with 400 when FURS rejects the supplied certificate, and with 500 when FURS, its gateway, or the network cannot complete the verification (including a probe timeout) - retry later in that case. Nothing is persisted on failure. Certificate is entity-specific and required for fiscalizing invoices.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
P12/PFX certificate file
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
import fs from 'fs';
const sdk = new SpaceInvoices('YOUR_API_KEY');
// Read file as Buffer
const fileBuffer = fs.readFileSync('/path/to/certificate.p12');
const file = new File([fileBuffer], 'certificate.p12', { type: 'application/x-pkcs12' });
const response = await sdk.fursCertificate.uploadFursCertificate({
file,
passphrase: "cert-password"
}, { entity_id: 'YOUR_ENTITY_ID' });
console.log(response);Returns
{
"certificate_expiry": "2025-12-31T23:59:59.000Z",
"certificate_cn": "12345678",
"certificate_issuer": "SIGOV-CA2",
"uploaded_at": "2025-01-15T10:30:00.000Z",
"message": "Certificate uploaded and validated successfully"
}Get certificate metadata
/fiscalization/furs/settings/certificateRetrieve certificate metadata including expiry date and upload time. Does not return the certificate or private key.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
const response = await sdk.fursCertificate.getFursCertificate({
entity_id: "YOUR_ENTITY_ID"
});
console.log(response);Returns
{
"certificate_expiry": "2025-12-31T23:59:59.000Z",
"certificate_cn": "12345678",
"certificate_issuer": "SIGOV-CA2",
"uploaded_at": "2025-01-15T10:30:00.000Z",
"message": "Certificate uploaded and validated successfully"
}Delete FURS certificate
/fiscalization/furs/settings/certificateDelete the FURS certificate for the entity. This will remove both the uploaded file reference and the extracted certificate from the database.
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
import SpaceInvoices from '@spaceinvoices/js-sdk/sdk';
const sdk = new SpaceInvoices('YOUR_API_KEY');
await sdk.fursCertificate.delete({
entity_id: "YOUR_ENTITY_ID"
});
console.log('Deleted successfully');