GET
/
settings
curl https://api.contazen.ro/v1/settings \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
  "success": true,
  "data": {
    "object": "settings",
    "firm": {
      "name": "Exemplu Company",
      "legal_name": "Exemplu Company SRL",
      "trade_name": "Exemplu Company",
      "cui": "RO12345678",
      "rc": "J40/1234/2020",
      "address": "Str. Exemplu nr. 123",
      "city": "București, Sector 1",
      "county": "București",
      "country": "RO",
      "postal_code": "010101",
      "phone": "+40721234567",
      "email": "contact@exemplu.ro",
      "website": "https://www.exemplu.ro",
      "contact_person": "Ion Popescu",
      "contact_email": "ion.popescu@exemplu.ro"
    },
    "invoice_series": [
      {
        "id": "yMzhgkh",
        "name": "CTZ",
        "document_type": "fiscal",
        "format": "CTZ-{year}-{number}",
        "next_number": 145,
        "is_primary": true,
        "is_active": true
      },
      {
        "id": "xKwpf9j",
        "name": "PRO",
        "document_type": "proforma",
        "format": "PRO-{year}-{number}",
        "next_number": 23,
        "is_primary": true,
        "is_active": true
      },
      {
        "id": "zNmq8kl",
        "name": "TEST",
        "document_type": "fiscal",
        "format": "TEST-{year}-{number}",
        "next_number": 1,
        "is_primary": false,
        "is_active": true
      }
    ],
    "primary_series": {
      "fiscal": {
        "id": "yMzhgkh",
        "name": "CTZ",
        "document_type": "fiscal",
        "format": "CTZ-{year}-{number}",
        "next_number": 145,
        "is_primary": true,
        "is_active": true
      },
      "proforma": {
        "id": "xKwpf9j",
        "name": "PRO",
        "document_type": "proforma",
        "format": "PRO-{year}-{number}",
        "next_number": 23,
        "is_primary": true,
        "is_active": true
      }
    },
    "efactura": {
      "enabled": true,
      "oauth_configured": true,
      "test_mode_available": true,
      "live_mode_available": true,
      "oauth_created_at": "2024-01-15 10:30:00",
      "oauth_expires_at": "2024-01-15 11:30:00",
      "settings": {
        "environment": "live",
        "auto_send": true,
        "auto_send_timing": "immediate",
        "send_to_public_institutions": false
      }
    },
    "bank_accounts": [
      {
        "id": "bnk_1a2b3c",
        "bank_name": "Banca Transilvania",
        "iban": "RO49BTRL1234567890123456",
        "currency": "RON",
        "is_primary": true,
        "is_active": true
      },
      {
        "id": "bnk_4d5e6f",
        "bank_name": "Revolut",
        "iban": "RO98REVO9876543210987654",
        "currency": "EUR",
        "is_primary": false,
        "is_active": true
      }
    ],
    "subscription": {
      "plan": "Professional",
      "status": "active",
      "expires_at": "2024-12-31",
      "invoices_limit": 500,
      "invoices_used": 127
    }
  },
  "meta": {
    "version": "v1",
    "response_time": "45.67ms"
  }
}

Overview

Returns all configuration and settings for the authenticated firm including company details, invoice series, e-Factura status, bank accounts, available currencies, and subscription information. This is a read-only endpoint that provides a complete view of your account configuration.

Response

success
boolean
Indicates if the request was successful
data
object
meta
object
Response metadata including version and response time
curl https://api.contazen.ro/v1/settings \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
  "success": true,
  "data": {
    "object": "settings",
    "firm": {
      "name": "Exemplu Company",
      "legal_name": "Exemplu Company SRL",
      "trade_name": "Exemplu Company",
      "cui": "RO12345678",
      "rc": "J40/1234/2020",
      "address": "Str. Exemplu nr. 123",
      "city": "București, Sector 1",
      "county": "București",
      "country": "RO",
      "postal_code": "010101",
      "phone": "+40721234567",
      "email": "contact@exemplu.ro",
      "website": "https://www.exemplu.ro",
      "contact_person": "Ion Popescu",
      "contact_email": "ion.popescu@exemplu.ro"
    },
    "invoice_series": [
      {
        "id": "yMzhgkh",
        "name": "CTZ",
        "document_type": "fiscal",
        "format": "CTZ-{year}-{number}",
        "next_number": 145,
        "is_primary": true,
        "is_active": true
      },
      {
        "id": "xKwpf9j",
        "name": "PRO",
        "document_type": "proforma",
        "format": "PRO-{year}-{number}",
        "next_number": 23,
        "is_primary": true,
        "is_active": true
      },
      {
        "id": "zNmq8kl",
        "name": "TEST",
        "document_type": "fiscal",
        "format": "TEST-{year}-{number}",
        "next_number": 1,
        "is_primary": false,
        "is_active": true
      }
    ],
    "primary_series": {
      "fiscal": {
        "id": "yMzhgkh",
        "name": "CTZ",
        "document_type": "fiscal",
        "format": "CTZ-{year}-{number}",
        "next_number": 145,
        "is_primary": true,
        "is_active": true
      },
      "proforma": {
        "id": "xKwpf9j",
        "name": "PRO",
        "document_type": "proforma",
        "format": "PRO-{year}-{number}",
        "next_number": 23,
        "is_primary": true,
        "is_active": true
      }
    },
    "efactura": {
      "enabled": true,
      "oauth_configured": true,
      "test_mode_available": true,
      "live_mode_available": true,
      "oauth_created_at": "2024-01-15 10:30:00",
      "oauth_expires_at": "2024-01-15 11:30:00",
      "settings": {
        "environment": "live",
        "auto_send": true,
        "auto_send_timing": "immediate",
        "send_to_public_institutions": false
      }
    },
    "bank_accounts": [
      {
        "id": "bnk_1a2b3c",
        "bank_name": "Banca Transilvania",
        "iban": "RO49BTRL1234567890123456",
        "currency": "RON",
        "is_primary": true,
        "is_active": true
      },
      {
        "id": "bnk_4d5e6f",
        "bank_name": "Revolut",
        "iban": "RO98REVO9876543210987654",
        "currency": "EUR",
        "is_primary": false,
        "is_active": true
      }
    ],
    "subscription": {
      "plan": "Professional",
      "status": "active",
      "expires_at": "2024-12-31",
      "invoices_limit": 500,
      "invoices_used": 127
    }
  },
  "meta": {
    "version": "v1",
    "response_time": "45.67ms"
  }
}

Use Cases

Setting Up Your Integration

Use this endpoint to:
  • Retrieve available invoice series for creating invoices
  • Check e-Factura OAuth configuration status
  • Get list of bank accounts for payment instructions
  • Verify subscription limits before creating invoices
  • Discover available currencies for multi-currency invoices

Example: Check E-Factura Status

const response = await fetch('https://api.contazen.ro/v1/settings', {
  headers: { 'Authorization': 'Bearer sk_live_YOUR_API_KEY' }
});

const data = await response.json();

if (data.data.efactura.oauth_configured) {
  console.log('E-Factura is configured and ready');
  console.log('Available environments:', {
    test: data.data.efactura.test_mode_available,
    live: data.data.efactura.live_mode_available
  });
} else {
  console.log('E-Factura OAuth needs configuration');
}

Example: Get Primary Invoice Series

const settings = await getSettings(); // Your API call

const primaryFiscalSeries = settings.data.invoice_series.find(
  series => series.document_type === 'fiscal' && series.is_primary
);

console.log('Use this series_id for fiscal invoices:', primaryFiscalSeries.id);
This endpoint is read-only. To modify settings, use the Contazen web interface at https://app.contazen.ro