# Company

> Markdown edition of https://api.fiz.co/docs/api/company. Português: https://api.fiz.co/docs/api/company.md?lang=pt. Index: https://api.fiz.co/llms.txt

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**

```shell
curl 'https://api.fiz.co/company' \
  --header "x-api-key: $FIZ_API_KEY"
```

**TypeScript**

```ts
import { Fiz } from '@fiz-co/sdk';

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

**Python**

```python
from fiz_sdk import Fiz

fiz = Fiz()  # reads FIZ_API_KEY
result = fiz.company.retrieve()
```

**PHP**

```php
<?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

| Field | Type | Description |
| --- | --- | --- |
| `id` | string |  |
| `environment` | string | Backend environment the key reaches: production (live AT) or sandbox (AT test webservices, no fiscal effect; fiz\_test\_ keys) — One of: `production`, `sandbox` |
| `name` | string |  |
| `taxpayerNumber` | string · can be null |  |
| `cae` | string\[\] |  |
| `vatSettings` | object | The 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.selectedVATRegime` | string · can be null | The 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.ossEnabled` | boolean · can be null | OSS (one-stop shop) regime enabled for sales to consumers in other Member States |
| `grantedScopes` | string\[\] | OAuth scopes this token carries (wire form, e.g. invoicing.issue). An API key carries every scope. |
| `requestedScopes` | string\[\] | Scopes the application asked for at consent. A difference from grantedScopes is reported as SCOPE\_MISSING. |
| `installation` | object · can be null | The 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.id` | string |  |
| `installation.sponsored` | boolean | Commercial coverage by the partner, independent of the company plan. |
| `installation.sponsorshipExpiresAt` | string (date-time) · can be null |  |
| `installation.updatedAt` | string (date-time) |  |
| `readiness` | object |  |
| `readiness.ready` | boolean |  |
| `readiness.checkedAt` | string (date-time) |  |
| `readiness.reasons` | object\[\] |  |
| `readiness.reasons[].code` | string | SCOPE\_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[].actionUrl` | string (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

-   [Company](https://api.fiz.co/docs/api/company) ([Markdown](https://api.fiz.co/docs/api/company.md))
-   [Customers](https://api.fiz.co/docs/api/customers) ([Markdown](https://api.fiz.co/docs/api/customers.md))
-   [Items](https://api.fiz.co/docs/api/items) ([Markdown](https://api.fiz.co/docs/api/items.md))
-   [Invoices](https://api.fiz.co/docs/api/invoices) ([Markdown](https://api.fiz.co/docs/api/invoices.md))
-   [Recurring invoices](https://api.fiz.co/docs/api/recurring-invoices) ([Markdown](https://api.fiz.co/docs/api/recurring-invoices.md))
-   [Pro formas](https://api.fiz.co/docs/api/pro-formas) ([Markdown](https://api.fiz.co/docs/api/pro-formas.md))
-   [Transport documents](https://api.fiz.co/docs/api/transport-documents) ([Markdown](https://api.fiz.co/docs/api/transport-documents.md))
-   [Series](https://api.fiz.co/docs/api/series) ([Markdown](https://api.fiz.co/docs/api/series.md))
-   [PDF templates](https://api.fiz.co/docs/api/pdf-templates) ([Markdown](https://api.fiz.co/docs/api/pdf-templates.md))
-   [Exports](https://api.fiz.co/docs/api/exports) ([Markdown](https://api.fiz.co/docs/api/exports.md))
-   [Expenses](https://api.fiz.co/docs/api/expenses) ([Markdown](https://api.fiz.co/docs/api/expenses.md))
-   [VAT](https://api.fiz.co/docs/api/vat) ([Markdown](https://api.fiz.co/docs/api/vat.md))
-   [Bank](https://api.fiz.co/docs/api/bank) ([Markdown](https://api.fiz.co/docs/api/bank.md))
