# Entities

## Fetch entities

> The \`entities\` endpoint returns all entities available in the account, along with optional date attributes and other metadata that can be used across the Sesame Data APIs.

```json
{"openapi":"3.1.0","info":{"title":"gateway-api","version":"0.0.1"},"servers":[{"url":"https://data.api.landytech.net","description":"Generated server url"}],"security":[{"basicAuth":[]}],"paths":{"/api/v2/entities":{"get":{"tags":["entities"],"summary":"Fetch entities","description":"The `entities` endpoint returns all entities available in the account, along with optional date attributes and other metadata that can be used across the Sesame Data APIs.","operationId":"getEntities","parameters":[{"name":"X-Result-Limit","in":"header","description":"Maximum number of items to retrieve","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"fields","in":"query","description":"List of field names to retrieve. If empty, all fields will be returned.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"entityId","in":"query","description":"Unique identifier provided by Landytech","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"List of entities with selected fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityResponse"}}}},"401":{"description":"Unauthorized, missing or invalid authentication"},"403":{"description":"Forbidden, user does not have permission"}}}}},"components":{"schemas":{"EntityResponse":{"type":"object","description":"Entity data returned by the API","properties":{"content":{"$ref":"#/components/schemas/EntityDetails","description":"Entity details"}}},"EntityDetails":{"type":"object","description":"Summary of the key dates of an entity","properties":{"ENTITY.ID":{"type":"integer","format":"int64","description":"Unique identifier of the entity. This identifier is created by Sesame"},"ENTITY.NAME":{"type":"string","description":"Name of the entity"},"ENTITY.TYPE":{"type":"string","description":"Type of the entity","enum":["FUND","HOLDING_COMPANY","TRUST","PORTFOLIO","PERSONAL","BASKET","BENCHMARK","GROUPING","CONSOLIDATION"]},"ENTITY.PORTFOLIO_PARENT_ENTITY_ID":{"type":"integer","format":"int64","description":"Parent entity ID of a portfolio entity"},"ENTITY.PORTFOLIO_CODES":{"type":"array","description":"List of portfolio codes for this portfolio. These codes are received in the custodial feed, and used to identify which portfolio the data belongs to. Depending on the feed, a portfolio may have only one or several PORTFOLIO_CODES","items":{"type":"string"}},"ENTITY.REPORTING_CURRENCY":{"type":"string","description":"Reporting currency of the entity, as defined in Sesame"},"ENTITY.CONSOLIDATION_TYPE":{"type":"string","description":"Indicates whether the entity was set up as DIRECT (Direct returns the entity's directly held assets) or LOOK_THROUGH (Look Through allows an entity to look-through its holdings, into underlying entities linked through Sesame-configured look-through relationships. For example, shares of ownership for a holding company will be represented as the proportional ownership of the positions and transactions of the holding company when an entity is LOOK_THROUGH)","enum":["DIRECT","LOOK_THROUGH"]},"ENTITY.PORTFOLIO_FEED":{"type":"string","description":"Name of the feed that populates data for this portfolio"},"ENTITY.CONSOLIDATION_DETAILS":{"$ref":"#/components/schemas/ConsolidationDetails","description":"Entities and participation within a consolidation."},"ENTITY.DETAILED_DATES":{"$ref":"#/components/schemas/EntityDetailedDatesDetails","description":"Key reporting and verification dates."},"ENTITY.KEY_DATES":{"$ref":"#/components/schemas/EntityKeyDatesDetails","description":"Summary of key date metrics."}},"required":["ENTITY.CONSOLIDATION_TYPE","ENTITY.ID","ENTITY.NAME","ENTITY.REPORTING_CURRENCY","ENTITY.TYPE"]},"ConsolidationDetails":{"type":"object","description":"A breakdown of the consolidation configuration, indicating which entities are included in the consolidation, and percentage of their participation. Only relevant for entities with type = 'CONSOLIDATION'","properties":{"ENTITY_ID":{"type":"integer","format":"int64","description":"ID of sub-entity in the consolidation."},"PARTICIPATION":{"type":"number","description":"Participation percentage in consolidation."}}},"EntityDetailedDatesDetails":{"type":"object","description":"Summary of the publication and pipeline status of all position dates per each entity","properties":{"DATE":{"type":"string","format":"date","description":"Date of position"},"PUBLISHED":{"type":"boolean","description":"Whether data is published, meaning that data can be requested for that date"},"PIPELINE_STATUS":{"type":"string","description":"Processing status of the position date in the Sesame data pipeline","enum":["RUNNING","FAILED","READY"]},"DATE_PUBLISHED":{"type":"string","description":"Timestamp of publication."}}},"EntityKeyDatesDetails":{"type":"object","description":"Key dates to help users understand the entity's history","properties":{"LATEST_PUBLISHED_DATE":{"type":"string","format":"date","description":"Most recent published date. Dates can only be published when there is a position on that date"},"FIRST_PUBLISHED_DATE":{"type":"string","format":"date","description":"Earliest published date. Dates can only be published when there is a position on that date"},"LATEST_TRANSACTION_DATE":{"type":"string","format":"date","description":"Most recent transaction date."},"FIRST_TRANSACTION_DATE":{"type":"string","format":"date","description":"Earliest transaction date."}}}}}}
```
