API reference

Company

The company the credential belongs to: its tax data, its activity codes (CAE) and whether it is ready to issue. 1 operation.

Get company and issuance readiness

GET /company

Authentication: an API key (x-api-key) or an OAuth access token.

curl 'https://api.fiz.co/company' \
  --header "x-api-key: $FIZ_API_KEY"
import { Fiz } from '@fiz-co/sdk';

const fiz = new Fiz(); // reads FIZ_API_KEY
const result = await fiz.company.retrieve();
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.company.retrieve()
<?php
require 'vendor/autoload.php';

$fiz = new Fiz\Fiz(); // reads FIZ_API_KEY
$result = $fiz->company->retrieve();

Response 200

Connected company and preliminary issuance checks

FieldTypeDescription
idstring
environmentstringBackend environment the key reaches: production (live AT) or sandbox (AT test webservices, no fiscal effect; fiz_test_ keys)
One of: production, sandbox
namestring
taxpayerNumberstring · can be null
caestring[]
vatSettingsobjectThe VAT settings the company issues under: the company's own in FIZ, prefilled from the AT and editable, not the AT portal's record
vatSettings.selectedVATRegimestring · can be nullThe VAT regime configured for the company in FIZ (the starting point automatic VAT uses). Each line's rate and exemption reason also depend on the customer, the item and the operation. Null when not set in FIZ yet.
One of: CASH_ACCOUNTING, EXEMPTION_ARTICLE_9, EXEMPTION_ARTICLE_53, FLATRATE_AGRICULTURAL, MARGIN_SCHEME_GOODS, MARGIN_SCHEME_TRAVEL, SMALL_RETAILERS, SPECIAL_SCHEME, STANDARD_MONTHLY, STANDARD_QUARTERLY
vatSettings.ossEnabledboolean · can be nullOSS (one-stop shop) regime enabled for sales to consumers in other Member States
grantedScopesstring[]OAuth scopes this token carries (wire form, e.g. invoicing.issue). An API key carries every scope.
requestedScopesstring[]Scopes the application asked for at consent. A difference from grantedScopes is reported as SCOPE_MISSING.
installationobject · can be nullThe company/application connection behind an OAuth token. A revoked authorization answers 401 instead, so a returned installation is always connected. Absent for API keys.
installation.idstring
installation.sponsoredbooleanCommercial coverage by the partner, independent of the company plan.
installation.sponsorshipExpiresAtstring (date-time) · can be null
installation.updatedAtstring (date-time)
readinessobject
readiness.readyboolean
readiness.checkedAtstring (date-time)
readiness.reasonsobject[]
readiness.reasons[].codestringSCOPE_MISSING: the consent granted fewer scopes than the application asked for; only a new authorization widens it, and actionUrl is the application install page.
One of: AT_CREDENTIALS_REQUIRED, AT_SYNC_REQUIRED, SERIES_REQUIRED, SCOPE_MISSING
readiness.reasons[].actionUrlstring (uri)

Errors

  • 429 The OAuth connection’s request limit is reached. Nothing was executed: repeat the same request after Retry-After seconds.

Errors

Errors share one shape: statusCode, message, code and error, with the request id in the X-Request-Id header.

All resources