Improve extended data documentation.

This commit is contained in:
Hannu Lyytikainen 2018-04-19 15:28:21 +03:00
parent ca4f9700c0
commit 1bf2e6bfff

View file

@ -25,13 +25,13 @@ presented to the customer after a booking has been confirmed.
Extended data works out of the box without any prior configuration to the marketplace. Public and
protected data can be added to listings just by passing it in the create/update request to the API.
However, optionally a _data schema_ can be defined for an extended data key. The data schema allows
that extended data field to be used as a search parameter in some API endpoints, like in the
listings query endpoint.
that extended data attribute to be used as a search parameter in some API endpoints, like in the
listings query endpoint. Contact Sharetribe team if you need to add a schema to your extended data.
## Extended data in Flex template app
The Flex web template uses extended data by default with listing and user resources. In case of the
listings, category and amenities fields are stored in the `publicData` field. For the
users, phone number is stored in the `protectedData` field. As for indexed data, the template app
listings, category and amenities information is stored in the `publicData` attribute. For the
users, phone number is stored in the `protectedData` attribute. As for indexed data, the template app
relies on data schemas for categories and amenities to be configured for the marketplace in the API
as those values are used as filters in the listing search.