# Organization

Organization

## List organizations

> List all organizations.

```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":"Accesstoken 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"}},"parameters":{"organizationExternalIdQuery":{"description":"External reference to an organization.","in":"query","name":"organizationExternalId","required":false,"schema":{"type":"string"}},"organizationNameQuery":{"description":"Reference to the name of an organization.","in":"query","name":"organizationName","required":false,"schema":{"type":"string"}},"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}},"schemas":{"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"},"OrganizationResponseSchema":{"title":"OrganizationResponseSchema","type":"object","required":["address","city","countryCode","createdAt","email","externalId","isActive","lastModifiedAt","name","postalCode","phone","organizationUid","vatNumber","bankInfo","websiteUrl"],"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"}}},"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"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"}},"responses":{"OrganizationListResponse":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OrganizationResponseSchema"},"type":"array"},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["items","paging"],"type":"object"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/organizations":{"get":{"description":"List all organizations.","operationId":"get-tenants-organizations","parameters":[{"$ref":"#/components/parameters/organizationExternalIdQuery"},{"$ref":"#/components/parameters/organizationNameQuery"},{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"responses":{"200":{"$ref":"#/components/responses/OrganizationListResponse"}},"summary":"List organizations","tags":["Organization"]}}}}
```

## Create a new organization

> Creates a new 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":"Accesstoken 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":{"OrganizationCreateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreateRequestSchema"}}}}},"schemas":{"OrganizationCreateRequestSchema":{"allOf":[{"$ref":"#/components/schemas/OrganizationUpdateRequestSchema"},{"properties":{"organizationUid":{"$ref":"#/components/schemas/UID"}}}],"type":"object","title":"OrganizationCreateRequestSchema"},"OrganizationUpdateRequestSchema":{"title":"OrganizationUpdateRequestSchema","type":"object","required":["name"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"isActive":{"type":"boolean"},"name":{"type":"string"},"phone":{"type":"string"},"postalCode":{"type":"string"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"websiteUrl":{"type":"string"},"bankInfo":{"$ref":"#/components/schemas/BankInfoRequestSchema"}}},"EmailTYPE":{"title":"Email","type":"string"},"VatNumberTYPE":{"description":"VAT identification number for value added tax reporting purposes.","title":"VatNumber","type":"string"},"BankInfoRequestSchema":{"title":"BankInfoSchema","type":"object","properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"OrganizationResponseSchema":{"title":"OrganizationResponseSchema","type":"object","required":["address","city","countryCode","createdAt","email","externalId","isActive","lastModifiedAt","name","postalCode","phone","organizationUid","vatNumber","bankInfo","websiteUrl"],"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"}}},"BankInfoResponseSchema":{"title":"BankInfoResponseSchema","type":"object","required":["accountNumber","bankName","iban","swift"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}}},"responses":{"OrganizationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/organizations":{"post":{"description":"Creates a new organization.","operationId":"post-tenants-organizations","requestBody":{"$ref":"#/components/requestBodies/OrganizationCreateRequest"},"responses":{"200":{"$ref":"#/components/responses/OrganizationResponse"}},"summary":"Create a new organization","tags":["Organization"]}}}}
```

## Get organization details

> Get details for an 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":"Accesstoken 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"}},"responses":{"OrganizationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}},"description":"Example response"}},"schemas":{"OrganizationResponseSchema":{"title":"OrganizationResponseSchema","type":"object","required":["address","city","countryCode","createdAt","email","externalId","isActive","lastModifiedAt","name","postalCode","phone","organizationUid","vatNumber","bankInfo","websiteUrl"],"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"}}},"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"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}":{"get":{"description":"Get details for an organization.","operationId":"get-tenants-organization-details","responses":{"200":{"$ref":"#/components/responses/OrganizationResponse"}},"summary":"Get organization details","tags":["Organization"]}}}}
```

## Update organization details

> Update details for an organization. Partial updates are allowed.

```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":"Accesstoken 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":{"OrganizationUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdateRequestSchema"}}}}},"schemas":{"OrganizationUpdateRequestSchema":{"title":"OrganizationUpdateRequestSchema","type":"object","required":["name"],"properties":{"address":{"type":"string"},"city":{"type":"string"},"countryCode":{"type":"string"},"email":{"$ref":"#/components/schemas/EmailTYPE"},"externalId":{"type":"string"},"isActive":{"type":"boolean"},"name":{"type":"string"},"phone":{"type":"string"},"postalCode":{"type":"string"},"vatNumber":{"$ref":"#/components/schemas/VatNumberTYPE"},"websiteUrl":{"type":"string"},"bankInfo":{"$ref":"#/components/schemas/BankInfoRequestSchema"}}},"EmailTYPE":{"title":"Email","type":"string"},"VatNumberTYPE":{"description":"VAT identification number for value added tax reporting purposes.","title":"VatNumber","type":"string"},"BankInfoRequestSchema":{"title":"BankInfoSchema","type":"object","properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}},"OrganizationResponseSchema":{"title":"OrganizationResponseSchema","type":"object","required":["address","city","countryCode","createdAt","email","externalId","isActive","lastModifiedAt","name","postalCode","phone","organizationUid","vatNumber","bankInfo","websiteUrl"],"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"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"},"BankInfoResponseSchema":{"title":"BankInfoResponseSchema","type":"object","required":["accountNumber","bankName","iban","swift"],"properties":{"accountNumber":{"type":"string"},"bankName":{"type":"string"},"iban":{"type":"string"},"swift":{"type":"string"}}}},"responses":{"OrganizationResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}},"description":"Example response"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}":{"put":{"description":"Update details for an organization. Partial updates are allowed.","operationId":"put-tenants-organizations-details","requestBody":{"$ref":"#/components/requestBodies/OrganizationUpdateRequest"},"responses":{"201":{"$ref":"#/components/responses/OrganizationResponse"}},"summary":"Update organization details","tags":["Organization"]}}}}
```

## Delete an organization

> Deletes a organizations.

```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":"Accesstoken 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"}}},"paths":{"/tenants/{tenantUid}/organizations/{organizationUid}":{"delete":{"description":"Deletes a organizations.","operationId":"delete-tenants-organizations-details","responses":{"204":{"description":"No Content"}},"summary":"Delete an organization","tags":["Organization"]}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/organization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
