> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/organization/enroll-an-organization-with-the-fiscal-control-system.md).

# Enroll an organization with the fiscal control system

Creates the organization as a taxpayer at the fiscal control system and commissions it, in one call that can be repeated.

What it does depends on where the organization already is: with no taxpayer it is created and commissioned, with a taxpayer that was created but not commissioned only the commissioning is retried, and an organization already commissioned is returned unchanged - the values in the body are then ignored, because a commissioned taxpayer cannot be replaced.

Requires the FISCAL extension to be active on the tenant and the organization to have fiscal credentials.

Required permissions: ORGANIZATION

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"Organization","description":"Organization"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"OrganizationFiscalEnrollmentRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationFiscalEnrollmentRequestSchema"}}},"required":true}},"schemas":{"OrganizationFiscalEnrollmentRequestSchema":{"title":"OrganizationFiscalEnrollmentRequestSchema","type":"object","description":"What an operator confirms before the organization exists as a taxpayer\nat the fiscal control system.\n\nNone of it is taken from the organization itself. The control system\nkeeps a legal name and a trade name where Flow keeps one name, and\nwants the organisation number, which is not the same string as the\nVAT number Flow stores. A client can fill the fields in from the\norganization as a suggestion; the operator decides what is sent,\nbecause the values are permanent once the taxpayer is commissioned.\n","required":["legalName","tradeName","organisationNumber","address"],"properties":{"legalName":{"type":"string","maxLength":128,"description":"Registered legal name of the company."},"tradeName":{"type":"string","maxLength":128,"description":"Name the company trades under."},"organisationNumber":{"type":"string","description":"Swedish organisationsnummer: ten digits starting with 2-9, with no\ncountry prefix and no hyphen.\n"},"address":{"$ref":"#/components/schemas/FiscalEnrollmentAddressSchema"}}},"FiscalEnrollmentAddressSchema":{"title":"FiscalEnrollmentAddressSchema","type":"object","description":"A postal address split the way the fiscal control system wants it.\n\nFlow keeps an address as one line beside a postal code and a city,\nwhile the control system wants the street apart from its number. The\nsplit is not guessed from the stored address: a client proposes it,\nan operator confirms it, and what is confirmed goes into a record the\ncontrol system never deletes.\n","required":["street","number","postalCode","city","countryCode"],"properties":{"street":{"type":"string","description":"Street name, without the number."},"number":{"type":"string","description":"Street number."},"postalCode":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string","description":"Two-letter country code (ISO 3166-1 alpha-2), for example SE."}}},"OrganizationResponseSchema":{"title":"OrganizationResponseSchema","type":"object","required":["address","city","countryCode","createdAt","email","externalId","isActive","lastModifiedAt","name","postalCode","phone","organizationUid","vatNumber","bankInfo","websiteUrl","appSettings"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"isActive":{"type":"boolean"},"lastModifiedAt":{"format":"date-time","type":"string"},"name":{"type":"string"},"postalCode":{"type":"string"},"phone":{"type":"string"},"organizationUid":{"$ref":"#/components/schemas/UID"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"bankInfo":{"$ref":"#/components/schemas/BankInfoResponseSchema"},"websiteUrl":{"type":"string"},"appSettings":{"$ref":"#/components/schemas/OrgAppSettingResponseSchema"},"fiscal":{"$ref":"#/components/schemas/OrganizationFiscalResponseSchema"}}},"EmailTYPE":{"title":"Email","type":"string"},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"VatNumberTYPE":{"description":"VAT identification number for value added tax reporting purposes.","title":"VatNumber","type":"string"},"BankInfoResponseSchema":{"title":"BankInfoResponseSchema","type":"object","required":["accountNumber","bankName","iban","swift","giroAccountNumber"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"},"giroAccountNumber":{"type":"string","description":"National giro/payment-slip creditor account tied to the bank account, e.g. the Danish FIK creditor number (8 digits). Used to emit a giro payment block (FIK) on electronic invoices."}}},"OrgAppSettingResponseSchema":{"title":"OrgAppSettingResponseSchema","type":"object","required":["requireGtinScanBeforeDeliverOut"],"properties":{"requireGtinScanBeforeDeliverOut":{"type":"boolean"}}},"OrganizationFiscalResponseSchema":{"title":"OrganizationFiscalResponseSchema","type":"object","description":"The organization's identity at the fiscal control system.\n\nThe object is absent for an organization that has nothing to do with\nfiscalization, which is every organization outside the countries the\nintegration covers. It appears as soon as anything fiscal has been\nentered or enrolled, and every field inside it is then present: a value\nnot yet assigned is an empty string, never null.\n","required":["unitId","credentialsStored","taxpayerId","taxpayerState"],"properties":{"unitId":{"type":"string","description":"Identifier of the organization as a unit at the fiscal control\nsystem. Not a secret, and the value most often mistyped, so it is\nreturned to be checked. Empty until it has been entered.\n"},"credentialsStored":{"type":"boolean","description":"Whether an API key and secret are stored for this organization.\nThe values are never returned. To confirm that a credential\nauthenticates, send it again in fiscal.credentials on an\norganization update: it is verified before it is stored.\n"},"taxpayerId":{"type":"string","description":"Identifier of the organization as a taxpayer at the fiscal control\nsystem. Written when the organization is enrolled, and empty until\nthen.\n"},"taxpayerState":{"description":"Current state of the organization's taxpayer at the fiscal control\nsystem. Empty until the organization has been enrolled. Nothing\nbelow it - a store's location, a till's register - can be created\nuntil this is COMMISSIONED.\n","$ref":"#/components/schemas/FiscalRegisterStateENUM"}}},"FiscalRegisterStateENUM":{"description":"State of a resource at the fiscal control system: an organization's\ntaxpayer, a store's location, or a till's register. The three share\none set of states and are commissioned top down.\n\nThe empty string is a state of its own: the resource has not been\nregistered yet. It exists because the fiscal objects carry no nullable\nfields - an object that is present has every field present, and \"not\nyet\" is the empty value.\n|ENUM | Description |\n| --- | --- |\n|  | Not registered at the fiscal control system |\n| ACQUIRED | Registered, not yet commissioned |\n| COMMISSIONED | Billing has started |\n| DECOMMISSIONED | Permanently retired, cannot be undone |","enum":["","ACQUIRED","COMMISSIONED","DECOMMISSIONED"],"title":"FiscalRegisterState","type":"string"}},"responses":{"OrganizationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}/fiscal/enroll":{"post":{"summary":"Enroll an organization with the fiscal control system","description":"Creates the organization as a taxpayer at the fiscal control system\nand commissions it, in one call that can be repeated.\n\nWhat it does depends on where the organization already is: with no\ntaxpayer it is created and commissioned, with a taxpayer that was\ncreated but not commissioned only the commissioning is retried, and\nan organization already commissioned is returned unchanged - the\nvalues in the body are then ignored, because a commissioned taxpayer\ncannot be replaced.\n\nRequires the FISCAL extension to be active on the tenant and the\norganization to have fiscal credentials.\n\nRequired permissions: ORGANIZATION\n","operationId":"post-tenants-organizations-fiscal-enroll","requestBody":{"$ref":"#/components/requestBodies/OrganizationFiscalEnrollmentRequest"},"responses":{"200":{"$ref":"#/components/responses/OrganizationResponse"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}},"tags":["Organization"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/organization/enroll-an-organization-with-the-fiscal-control-system.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
