# Legal Entities

## GET /v1/core/legal-entities

> Lists all legal entities

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListLegalEntitiesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListLegalEntities_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListLegalEntities_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LegalEntityM"}},"next":{"type":"string"}},"required":["items"]},"LegalEntityM":{"type":"object","properties":{"crn":{"type":"string"},"vatNumber":{"type":"string"},"businessName":{"type":"string"},"businessCategory":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["crn","vatNumber","businessName","businessCategory","uid"]}}},"paths":{"/v1/core/legal-entities":{"get":{"operationId":"LegalEntities_listCategories","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLegalEntitiesApiResponse"}}}}},"summary":"Lists all legal entities","tags":["Legal Entities"]}}}}
```

## GET /v1/core/legal-entities/{uid}

> Returns a specific legal entity

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetLegalEntityApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetLegalEntity_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetLegalEntity_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetLegalEntity_Data_Item"}},"required":["item"]},"GetLegalEntity_Data_Item":{"type":"object","properties":{"crn":{"type":"string"},"vatNumber":{"type":"string"},"businessName":{"type":"string"},"businessCategory":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["crn","vatNumber","businessName","businessCategory","uid"]},"GetLegalEntityApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetLegalEntity_Error"}},"required":["error"]},"GetLegalEntity_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetLegalEntity_ErrorCodes_enum"}]}},"required":["code"]},"GetLegalEntity_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/legal-entities/{uid}":{"get":{"operationId":"LegalEntities_getCategory","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLegalEntityApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLegalEntityApiError"}}}}},"summary":"Returns a specific legal entity","tags":["Legal Entities"]}}}}
```

## GET /v1/core/legal-entities/export

> Exports all legal entities with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportLegalEntitiesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportLegalEntities_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportLegalEntities_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LegalEntityM"}},"next":{"type":"string"}},"required":["items"]},"LegalEntityM":{"type":"object","properties":{"crn":{"type":"string"},"vatNumber":{"type":"string"},"businessName":{"type":"string"},"businessCategory":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["crn","vatNumber","businessName","businessCategory","uid"]}}},"paths":{"/v1/core/legal-entities/export":{"get":{"operationId":"LegalEntities_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportLegalEntitiesApiResponse"}}}}},"summary":"Exports all legal entities with support for incremental fetching.","tags":["Legal Entities"]}}}}
```


---

# 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://developers.gormic.com/api-reference/core/legal-entities.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.
