# Areas An Area represents a specific space within a Venue that customers can choose to book. ## Object Definition | Key | Type | Status | Description | | --- | --- | --- | --- | | id | String | **Mandatory** | Unique identifier for the Area. | | name | String | **Mandatory** | Name of the Area. Allows translations. | | externalId | String | **Mandatory** | Identifier for the Area in the Partner system. | | description | String | **Optional** | Description of the Area. Allows translations. | | rwgDefault | Boolean | **Optional** | Indicates if this area is the default for Reserve with Google bookings. Applicable only for venues with the RwG channel active. | | byDefault | Boolean | **Optional** | Specifies if this area should be used as the default when no specific area is selected. | | translations[locale] | String | **Optional** | Locale code for translation in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. | | translations[data][field] | String | **Optional** | Field to be translated (e.g., "name" or "description"). | | translations[data][content] | String | **Optional** | Translation content for the field. | ## Get Available Areas This endpoint retrieves a list of available Areas for a specific Venue. #### Endpoint `GET https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas` #### URL Parameters | Parameter | Status | Description | | --- | --- | --- | | venueId | **Mandatory** | The ID of the Venue for which to retrieve available areas. Accepts either Mozrest or Partner ID. | #### Example Request ```shell curl GET "https://api-sandbox.mozrest.com/v1/rms/{venueId}/areas" \ -H "Authorization: Bearer {{api_key}}" \ -H "x-locale: en" \ ``` #### Example Response ```json { "total": 2, "data": [ { "id": "624fbc403cfd9a529ea17f36", "venue": { "id": "624fba8a5fb36da5ae6e73bf", "name": "TapasTapas" }, "name": "Dinning room", "description": "Main dinning room in the restaurant", "externalId": "0001", "rwgDefault": true, "byDefault": false, "translations": [ { "id": "624fbc414a3b895d7d00efb3", "parentId": "624fbc403cfd9a529ea17f36", "locale": "es", "field": "name", "content": "Salón pricipal", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" }, { "id": "624fbc41924ab9a37e938247", "parentId": "624fbc403cfd9a529ea17f36", "locale": "en", "field": "description", "content": "Main dinning room in the restaurant", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" }, { "id": "624fbc41c910729de305be29", "parentId": "624fbc403cfd9a529ea17f36", "locale": "es", "field": "description", "content": "Salón principal del restaurante", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" }, { "id": "624fbc41fa21017434e24af7", "parentId": "624fbc403cfd9a529ea17f36", "locale": "en", "field": "name", "content": "Dinning room", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" } ], "createdAt": "2022-04-08T04:38:24+00:00", "updatedAt": "2022-04-08T04:38:24+00:00" }, { ... } ] } ``` ## Get a Specific Area This endpoint retrieves details of a specific Area within a Venue by its ID. #### Endpoint `GET https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas/{areaId}` #### URL Parameters | Parameter | Status | Description | | --- | --- | --- | | venueId | **Mandatory** | The ID of the Venue to which the Area belongs. Accepts either Mozrest or Partner ID. | | areaId | **Mandatory** | The ID of the Area to retrieve. Accepts either Mozrest or Partner ID. | #### Example Request ```shell curl GET "https://api-sandbox.mozrest.com/v1/rms/{venueId}/areas/{area_id}" \ -H "Authorization: Bearer {{api_key}}" \ -H "x-locale: en" \ ``` #### Example Response ```json { "id": "624fbc403cfd9a529ea17f36", "venue": { "id": "624fba8a5fb36da5ae6e73bf", "name": "TapasTapas" }, "name": "Dinning room", "description": "Main dinning room in the restaurant", "externalId": "0001", "rwgDefault": true, "byDefault": false, "translations": [ { "id": "624fbc414a3b895d7d00efb3", "parentId": "624fbc403cfd9a529ea17f36", "locale": "es", "field": "name", "content": "Salón pricipal", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" }, { "id": "624fbc41924ab9a37e938247", "parentId": "624fbc403cfd9a529ea17f36", "locale": "en", "field": "description", "content": "Main dinning room in the restaurant", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" }, { "id": "624fbc41c910729de305be29", "parentId": "624fbc403cfd9a529ea17f36", "locale": "es", "field": "description", "content": "Salón principal del restaurante", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" }, { "id": "624fbc41fa21017434e24af7", "parentId": "624fbc403cfd9a529ea17f36", "locale": "en", "field": "name", "content": "Dinning room", "createdAt": "2022-04-08T04:38:25+00:00", "updatedAt": "2022-04-08T04:38:25+00:00" } ], "createdAt": "2022-04-08T04:38:24+00:00", "updatedAt": "2022-04-08T04:38:24+00:00" } ``` ## Create Area This endpoint allows for the creation of a new Area within a Venue. #### Endpoint `POST https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas` #### URL Parameters | Parameter | Status | Description | | --- | --- | --- | | venueId | **Mandatory** | The ID of the Venue in which the Area will be created. Accepts either Mozrest or Partner ID. | #### Body Parameters | Parameter | Status | Description | | --- | --- | --- | | name | **Mandatory** | Name of the Area. Allows translation. | | externalId | **Mandatory** | Identifier for the Area in the Partner system. | | description | **Optional** | Description of the Area. Allows translation. | | rwgDefault | **Optional** | Specifies if this Area is the default for Reserve with Google bookings, applicable to venues with RwG channel active. | | byDefault | **Optional** | Specifies if this Area should be the default when no specific area is selected. | | translations[locale] | **Optional** | Locale code for translation in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. | | translations[data][field] | **Optional** | Field to translate (e.g., "name" or "description"). | | translations[data][content] | **Optional** | Translation content for the specified field. | #### Example Request ```shell curl POST "https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas" \ -H "Authorization: Bearer {{api_key}}" \ --data-raw '{ "name": "Terrace", "externalId": "0002", "description": "Terrace with view to the Rhein river", "rwgDefault": "true", "byDefault": false, "translations": [ { "locale": "en", "data": [ { "field": "name", "content": "Terrace" }, { "field": "description", "content": "Terrace with view to the Rhein river" } ] }, { "locale": "es", "data": [ { "field": "name", "content": "Terraza" }, { "field": "description", "content": "Terraza con vistas al rio Rhein" } ] } ] }' ``` #### Example Response ```json { "id": "624fbc8e4ac61a6a88bf1e75", "venue": { "id": "624fba8a5fb36da5ae6e73bf", "name": "TapasTapas" }, "name": "Terrace", "description": "Terrace with view to the Rhein river", "externalId": "0002", "rwgDefault": true, "byDefault": false, "translations": [ { "locale": "en", "data": [ { "field": "name", "content": "Terrace" }, { "field": "description", "content": "Terrace with view to the Rhein river" } ] }, { "locale": "es", "data": [ { "field": "name", "content": "Terraza" }, { "field": "description", "content": "Terraza con vistas al rio Rhein" } ] } ], "createdAt": "2022-04-08T04:39:42+00:00", "updatedAt": "2022-04-08T04:39:42+00:00" } ``` ## Update Area This endpoint allows for updating the details of an existing Area within a Venue. #### Endpoint `PUT https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas/{areaId}` #### URL Parameters | Parameter | Status | Description | | --- | --- | --- | | venueId | **Mandatory** | The ID of the Venue to which the Area belongs. Accepts either Mozrest or Partner ID. | | areaId | **Mandatory** | The ID of the Area to update. Accepts either Mozrest or Partner ID. | #### Body Parameters | Parameter | Status | Description | | --- | --- | --- | | name | **Mandatory** | Name of the Area. Allows translation. | | description | **Optional** | Description of the Area. Allows translation. | | rwgDefault | **Optional** | Specifies if this Area is the default for Reserve with Google bookings, applicable to venues with RwG channel active. | | byDefault | **Optional** | Specifies if this Area should be the default when no specific area is selected. | | translations[locale] | **Optional** | Locale code for translation in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. | | translations[data][field] | **Optional** | Field to translate (e.g., "name" or "description"). | | translations[data][content] | **Optional** | Translation content for the specified field. | #### Example Request ```shell curl PUT "https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas/{area_id}" \ -H "Authorization: Bearer {{api_key}}" \ --data-raw '{ "name": "Terrace", "description": "Terrace with view to the Rhein river", "rwgDefault": "true", "translations": [ { "locale": "en", "data": [ { "field": "name", "content": "Terrace" }, { "field": "description", "content": "Terrace with view to the Rhein river" } ] }, { "locale": "es", "data": [ { "field": "name", "content": "Terraza" }, { "field": "description", "content": "Terraza con vistas al rio Rhein" } ] } ] }' ``` #### Example Response ```json { "id": "624fbc8e4ac61a6a88bf1e75", "venue": { "id": "624fba8a5fb36da5ae6e73bf", "name": "TapasTapas" }, "name": "Terrace", "description": "Terrace with view to the Rhein river", "externalId": "0002", "rwgDefault": true, "byDefault": false, "translations": [ { "id": "624fbc8e3a167594c79ab7be", "parentId": "624fbc8e4ac61a6a88bf1e75", "locale": "es", "field": "description", "content": "Terraza con vistas al rio Rhein", "createdAt": "2022-04-08T04:39:42+00:00", "updatedAt": "2022-04-08T04:39:42+00:00" }, { "id": "624fbc8e821586ddaf9e8ae5", "parentId": "624fbc8e4ac61a6a88bf1e75", "locale": "en", "field": "description", "content": "Terrace with view to the Rhein river", "createdAt": "2022-04-08T04:39:42+00:00", "updatedAt": "2022-04-08T04:39:42+00:00" }, { "id": "624fbc8ee610240b8ef7cee3", "parentId": "624fbc8e4ac61a6a88bf1e75", "locale": "es", "field": "name", "content": "Terraza", "createdAt": "2022-04-08T04:39:42+00:00", "updatedAt": "2022-04-08T04:39:42+00:00" }, { "id": "624fbc8ee85a913105a161eb", "parentId": "624fbc8e4ac61a6a88bf1e75", "locale": "en", "field": "name", "content": "Terrace", "createdAt": "2022-04-08T04:39:42+00:00", "updatedAt": "2022-04-08T04:39:42+00:00" } ], "createdAt": "2022-04-08T04:39:42+00:00", "updatedAt": "2022-04-08T04:39:42+00:00" } ``` ## Delete Area This endpoint allows for the deletion of an Area from a Venue. #### Endpoint `DELETE https://api-sandbox.mozrest.com/v1/rms/venues/{venueId}/areas/{areaId}` #### URL Parameters | Parameter | Status | Description | | --- | --- | --- | | venueId | **Mandatory** | The ID of the Venue from which the Area will be deleted. Accepts either Mozrest or Partner ID. | | areaId | **Mandatory** | The ID of the Area to delete. Accepts either Mozrest or Partner ID. | #### Example Request ```shell curl DELETE "https://api-sandbox.mozrest.com/v1/rms/venues/64edee6271544998a8e272f8/areas/60e5a3cab8e5c33agh870101" \ -H "Authorization: Bearer {{api_key}}" \ ``` #### Example Response ```shell { removed: true } ```