> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListEntityAttributes

# Package: attributes

# Namespace: AttributeValuesService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/attributes/attribute-value/list-entity-attributes.md

## Permission Scopes:
Manage_Wix_Attributes_Forms_submissions: SCOPE.ATTRIBUTES.MANAGE

## Introduction

Retrieves the entity's attribute values, each paired with its attribute definition (for the name, type, and config).

`visibility` is defined on the attribute definition and is not enforced here: results include values for non-visible attributes. When rendering public-facing output, filter out attributes whose `visibility` is `false`.

---

## REST API

### Schema

```
 Method: listEntityAttributes
 Description: Retrieves the entity's attribute values, each paired with its attribute definition (for the name, type, and config).  `visibility` is defined on the attribute definition and is not enforced here: results include values for non-visible attributes. When rendering public-facing output, filter out attributes whose `visibility` is `false`.
 URL: https://www.wixapis.com/_api/attributes/v1/attribute-values/{entityId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  entityId
 Method parameters: 
   param name: entityId | type:   none | required: true 
   param name: paging | type: CursorPaging    
        - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
 Return type: ListEntityAttributesResponse
  - name: entityAttributes | type: array<EntityAttribute> | description: The entity's attribute values, each paired with its attribute definition. Order isn't guaranteed.  | validation: maxItems 50
     - name: attributeDefinition | type: AttributeDefinition | description: The attribute definition.  
        - ONE-OF: 
           - name: stringConfig | type: StringConfig | description: String configuration: the list of allowed string values.  
              - name: allowedValues | type: array<string> | description: Allowed string values for this attribute. Values can be added, removed, or renamed; on update, any entity value that no longer matches the allowed values is reset to the attribute's default.  | validation: minItems 1, maxItems 50, maxLength 40
           - name: numberConfig | type: NumberConfig | description: Number configuration: the valid integer range.  
              - name: min | type: integer | description: Minimum allowed value (integer).  
              - name: max | type: integer | description: Maximum allowed value (integer). Must be greater than or equal to `min`.  
        - name: id | type: string | description: Attribute definition GUID.  | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the attribute definition is updated. To prevent conflicting changes, the current revision must be passed when updating. Ignored when creating an attribute definition.  | validation: format int64
        - name: createdDate | type: string | description: Date and time the attribute definition was created.  | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the attribute definition was last updated.  | validation: format date-time
        - name: name | type: string | description: Display name for the attribute, shown to end users (for example, `Capacity`).  Must be unique within the site. Required when creating an attribute definition.  | validation: minLength 1, maxLength 40
        - name: valueType | type: ValueType | description: Value type of this attribute. Immutable after creation. `UpdateAttributeDefinition` rejects requests that change `value_type`. Required when creating an attribute definition.  
             - enum:
             -     STRING: String attribute: single-select from a predefined list of allowed string values.
             -     NUMBER: Integer number attribute with a required min/max range.
             -     BOOL: Boolean attribute (true/false).
        - name: visibility | type: boolean | description: Whether this attribute is shown to end users on the public site.  - `true`: shown in the UI and available for filtering. - `false`: hidden from end users. Back-office admins can still see and edit the attribute.  Default: `true`.  
        - name: defaultValue | type: AttributeDefaultValue | description: Default value for the attribute. When a configuration change leaves a stored attribute value out of range or outside the allowed values, that value is reset to this default (see Update Attribute Definition).  The variant must match `valueType`. Required when creating an attribute definition.  
           - ONE-OF: 
              - name: stringDefault | type: string | description: Default value for a STRING-type attribute. Must be in StringConfig.allowed_values.  | validation: maxLength 40
              - name: numberDefault | type: integer | description: Default value for a NUMBER-type attribute. Must be within NumberConfig [min, max].  
              - name: boolDefault | type: boolean | description: Default value for a BOOL-type attribute.  
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the attribute definition. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: Custom tags for organizing and filtering attribute definitions. Manage tags using `BulkUpdateAttributeDefinitionTags` or `BulkUpdateAttributeDefinitionTagsByFilter`.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
     - name: attributeValue | type: AttributeValue | description: The entity's value for this attribute.  
        - ONE-OF: 
           - name: stringData | type: string | description: Value for STRING-type attribute. Must be in StringConfig.allowed_values.  | validation: maxLength 40
           - name: numberData | type: integer | description: Value for NUMBER-type attribute. Must be within NumberConfig [min, max].  
           - name: boolData | type: boolean | description: Value for BOOL-type attribute.  
        - name: id | type: string | description: Attribute value GUID.  | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the attribute value is updated.  | validation: format int64
        - name: createdDate | type: string | description: Date and time the attribute value was created.  | validation: format date-time
        - name: updatedDate | type: string | description: Date and time the attribute value was last updated.  | validation: format date-time
        - name: attributeDefinitionId | type: string | description: GUID of the attribute definition this value belongs to.  | validation: format GUID
        - name: entityId | type: string | description: GUID of the entity this value belongs to. An entity is any resource your application owns (in the current Rentals integration, a Bookings resource); this API does not validate it. Use the same GUID passed to `BulkUpsertAttributeValues` and `ListEntityAttributes`.  | validation: format GUID
        - name: valueType | type: ValueType | description: Value type of this attribute. Matches the related attribute definition's value_type. Set on create and never changes.  
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the attribute value. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard before they can be accessed with API calls.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### List an entity's attribute values with their definitions.
```curl
curl -X GET \
'https://www.wixapis.com/attributes/v1/attribute-values/5a9b3e88-1f6c-4f3b-9c7e-08e2f3b5a1b2' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bookings.attributeValue.listEntityAttributes(entityId, options)
 Description: Retrieves the entity's attribute values, each paired with its attribute definition (for the name, type, and config).  `visibility` is defined on the attribute definition and is not enforced here: results include values for non-visible attributes. When rendering public-facing output, filter out attributes whose `visibility` is `false`.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  entityId
 Method parameters: 
   param name: entityId | type: string | description: GUID of the entity whose attributes to retrieve. | required: true | validation: format GUID
   param name: options | type: ListEntityAttributesOptions  none  
        - name: paging | type: CursorPaging | description: Cursor-based paging.  
           - name: limit | type: integer | description: Maximum number of items to return in the results.  | validation: minimum 0, maximum 100, format int32
           - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
 Return type: PROMISE<ListEntityAttributesResponse>
  - name: entityAttributes | type: array<EntityAttribute> | description: The entity's attribute values, each paired with its attribute definition. Order isn't guaranteed.  | validation: maxItems 50
     - name: attributeDefinition | type: AttributeDefinition | description: The attribute definition.  
        - ONE-OF: 
           - name: stringConfig | type: StringConfig | description: String configuration: the list of allowed string values.  
              - name: allowedValues | type: array<string> | description: Allowed string values for this attribute. Values can be added, removed, or renamed; on update, any entity value that no longer matches the allowed values is reset to the attribute's default.  | validation: minItems 1, maxItems 50, maxLength 40
           - name: numberConfig | type: NumberConfig | description: Number configuration: the valid integer range.  
              - name: min | type: integer | description: Minimum allowed value (integer).  
              - name: max | type: integer | description: Maximum allowed value (integer). Must be greater than or equal to `min`.  
        - name: _id | type: string | description: Attribute definition GUID.  | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the attribute definition is updated. To prevent conflicting changes, the current revision must be passed when updating. Ignored when creating an attribute definition.  | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the attribute definition was created.  
        - name: _updatedDate | type: Date | description: Date and time the attribute definition was last updated.  
        - name: name | type: string | description: Display name for the attribute, shown to end users (for example, `Capacity`).  Must be unique within the site. Required when creating an attribute definition.  | validation: minLength 1, maxLength 40
        - name: valueType | type: ValueType | description: Value type of this attribute. Immutable after creation. `UpdateAttributeDefinition` rejects requests that change `value_type`. Required when creating an attribute definition.  
             - enum:
             -     STRING: String attribute: single-select from a predefined list of allowed string values.
             -     NUMBER: Integer number attribute with a required min/max range.
             -     BOOL: Boolean attribute (true/false).
        - name: visibility | type: boolean | description: Whether this attribute is shown to end users on the public site.  - `true`: shown in the UI and available for filtering. - `false`: hidden from end users. Back-office admins can still see and edit the attribute.  Default: `true`.  
        - name: defaultValue | type: AttributeDefaultValue | description: Default value for the attribute. When a configuration change leaves a stored attribute value out of range or outside the allowed values, that value is reset to this default (see Update Attribute Definition).  The variant must match `valueType`. Required when creating an attribute definition.  
           - ONE-OF: 
              - name: stringDefault | type: string | description: Default value for a STRING-type attribute. Must be in StringConfig.allowed_values.  | validation: maxLength 40
              - name: numberDefault | type: integer | description: Default value for a NUMBER-type attribute. Must be within NumberConfig [min, max].  
              - name: boolDefault | type: boolean | description: Default value for a BOOL-type attribute.  
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the attribute definition. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard before they can be accessed with API calls.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
        - name: tags | type: Tags | description: Custom tags for organizing and filtering attribute definitions. Manage tags using `BulkUpdateAttributeDefinitionTags` or `BulkUpdateAttributeDefinitionTagsByFilter`.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: List of tag GUIDs.  | validation: maxItems 100, maxLength 5
           - name: publicTags | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.  
     - name: attributeValue | type: AttributeValue | description: The entity's value for this attribute.  
        - ONE-OF: 
           - name: stringData | type: string | description: Value for STRING-type attribute. Must be in StringConfig.allowed_values.  | validation: maxLength 40
           - name: numberData | type: integer | description: Value for NUMBER-type attribute. Must be within NumberConfig [min, max].  
           - name: boolData | type: boolean | description: Value for BOOL-type attribute.  
        - name: _id | type: string | description: Attribute value GUID.  | validation: format GUID
        - name: revision | type: string | description: Revision number, which increments by 1 each time the attribute value is updated.  | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the attribute value was created.  
        - name: _updatedDate | type: Date | description: Date and time the attribute value was last updated.  
        - name: attributeDefinitionId | type: string | description: GUID of the attribute definition this value belongs to.  | validation: format GUID
        - name: entityId | type: string | description: GUID of the entity this value belongs to. An entity is any resource your application owns (in the current Rentals integration, a Bookings resource); this API does not validate it. Use the same GUID passed to `BulkUpsertAttributeValues` and `ListEntityAttributes`.  | validation: format GUID
        - name: valueType | type: ValueType | description: Value type of this attribute. Matches the related attribute definition's value_type. Set on create and never changes.  
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the attribute value. [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md) must be configured in the app dashboard before they can be accessed with API calls.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Paging metadata.  
     - name: count | type: integer | description: Number of items returned in current page.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursor strings that point to the next page, previous page, or both.  
        - name: next | type: string | description: Cursor string pointing to the next page in the list of results.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor pointing to the previous page in the list of results.  | validation: maxLength 16000
     - name: hasNext | type: boolean | description: Whether there are more pages to retrieve following the current page.  + `true`: Another page of results can be retrieved. + `false`: This is the last page.  


```

### Examples

### List an entity's attribute values with their definitions
```javascript
import { attributeValue } from "@wix/bookings";

const entityId = "5a9b3e88-1f6c-4f3b-9c7e-08e2f3b5a1b2";

async function listEntityAttributes() {
  const response = await attributeValue.listEntityAttributes(entityId);
}

/* Promise resolves to:
 * {
 *   "entityAttributes": [
 *     {
 *       "attributeDefinition": {
 *         "_id": "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *         "name": "Capacity",
 *         "valueType": "NUMBER",
 *         "visibility": true
 *       },
 *       "attributeValue": {
 *         "_id": "b1e6f0a2-3c4d-4e5f-9a8b-1c2d3e4f5a6b",
 *         "attributeDefinitionId": "d7a341c4-196b-46e7-813c-2b0fc1847ec6",
 *         "entityId": "5a9b3e88-1f6c-4f3b-9c7e-08e2f3b5a1b2",
 *         "valueType": "NUMBER",
 *         "numberData": 4
 *       }
 *     }
 *   ]
 * }
 */

```

### listEntityAttributes (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { attributeValue } from '@wix/bookings';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { attributeValue },
  // Include the auth strategy and host as relevant
});


async function listEntityAttributes(entityId,options) {
  const response = await myWixClient.attributeValue.listEntityAttributes(entityId,options);
};
```

---