# Get deleted units (read only)

`GET /rooms-api/properties/{property-id}/deleted-units`

> This is a subset of the full specification, limited to the `GET /rooms-api/properties/{property-id}/deleted-units` operation.
>
> You can find the full specification here: /_bundle/connectivity/docs/openapispecs/rooms-api/rooms-api-specification.json

```yaml
openapi: 3.0.1
info:
  title: Rooms API
  description: This is a subset of the full specification, limited to the `GET /rooms-api/properties/{property-id}/deleted-units` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Connectivity Team
    url: https://connect.booking.com
    email: connectivity@booking.com
  version: '1.2'
servers:
  - url: https://supply-xml.booking.com/
    description: Test using live endpoint
tags:
  - name: rooms-api
    description: Create, update, retrieve and delete property units
x-tagGroups:
  - name: API Endpoints
    tags:
      - rooms-api
paths:
  /rooms-api/properties/{property-id}/deleted-units:
    get:
      tags:
        - rooms-api
      summary: Get deleted units (read only)
      description: Get all deleted units for a property (read only)
      operationId: getDeletedUnits
      parameters:
        - name: property-id
          in: path
          required: true
          schema:
            type: integer
            format: int32
        - name: debug_info
          in: query
          description: Enable debug to return <code>$.unit_name_fallback</code> field in response
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseListUnit'
components:
  schemas:
    Configuration:
      required:
        - rooms
        - unit_type_id
      type: object
      properties:
        unit_type_id:
          type: integer
          description: |
            <ul>
            <li>Must exist and be active in meta (see <code>$.unit_type[*].id</code> and <code>$.unit_type[*].is_active</code>) for unit creation/update</li>
            <li>Must be valid for property's category in meta (see <code>$.unit_type[*].valid_property_categories</code>)</li>
            </ul>
          format: int32
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/Room'
    Size:
      required:
        - unit
        - value
      type: object
      properties:
        value:
          type: number
          description: Must be a value between 1 and 9999.99
          format: double
        unit:
          type: string
          description: SQM (square meters) or SQFT (square feet)
          enum:
            - SQM
            - SQFT
    ApiError:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        details:
          type: object
    ExtraBedsConfiguration:
      required:
        - cribs
        - extra_beds
        - is_crib_and_extra_bed_allowed
      type: object
      properties:
        extra_beds:
          maximum: 100
          minimum: 0
          type: integer
          description: Number of extra beds you can provide
          format: int32
        cribs:
          maximum: 100
          minimum: 0
          type: integer
          description: Number of cribs you can provide
          format: int32
        is_crib_and_extra_bed_allowed:
          type: boolean
          description: Both extra beds and cribs can be provided (<code>true</code>) or only one of the options (<code>false</code>)?
      description: Extra bed & crib options
    Occupancy:
      required:
        - max_adults
        - max_children
        - max_guests
      type: object
      properties:
        max_guests:
          maximum: 50
          minimum: 1
          type: integer
          description: Maximum number of guests
          format: int32
        max_adults:
          maximum: 50
          minimum: 1
          type: integer
          description: Maximum number of adults
          format: int32
        max_children:
          maximum: 49
          minimum: 0
          type: integer
          description: Maximum number of children (0-17 years old)
          format: int32
      deprecated: true
    OccupancyDetails:
      required:
        - max_adults
        - max_children
        - max_guests
        - max_infants
        - max_infants_on_top
      type: object
      properties:
        max_guests:
          maximum: 50
          minimum: 1
          type: integer
          description: Maximum number of guests
          format: int32
        max_adults:
          maximum: 50
          minimum: 1
          type: integer
          description: Maximum number of adults
          format: int32
        max_children:
          maximum: 49
          minimum: 0
          type: integer
          description: Maximum number of children (3-17 years old)
          format: int32
        max_infants:
          maximum: 49
          minimum: 0
          type: integer
          description: Maximum number of infants (0-2 years old)
          format: int32
        max_infants_on_top:
          maximum: 49
          minimum: 0
          type: integer
          description: Maximum number of infants (0-2 years old) on top of maximum number of guests
          format: int32
    ResponseMeta:
      type: object
      properties:
        ruid:
          type: string
    Unit:
      type: object
      properties:
        unit_id:
          type: integer
          format: int64
        configuration:
          $ref: '#/components/schemas/Configuration'
        unit_name_id:
          type: integer
          description: |
            <ul>
            <li>The list of available unit names can be found in meta (see <code>$.unit_names</code>)</li>
            </ul>
          format: int32
        number_of_units:
          type: integer
          description: Number of units must be between 0 and 32000
          format: int32
        smoking_policy:
          type: string
          description: Room smoking policy
          enum:
            - SMOKING
            - NONSMOKING
            - SMOKING_AND_NONSMOKING
        size:
          $ref: '#/components/schemas/Size'
        partner_reference_name:
          type: string
          description: Internal room name, visible only in API and Extranet
        floor_numbers_located_on:
          type: array
          description: One or more floors where the unit is located; 0 is a ground floor
          items:
            type: integer
            description: One or more floors where the unit is located; 0 is a ground floor
            format: int32
        occupancy:
          $ref: '#/components/schemas/Occupancy'
        occupancy_details:
          $ref: '#/components/schemas/OccupancyDetails'
        extra_beds_configuration:
          $ref: '#/components/schemas/ExtraBedsConfiguration'
        max_children_that_pay_children_rate:
          maximum: 49
          minimum: 0
          type: integer
          description: This field will be deprecated on 29 June 2026 and sunset on 7 July 2026. For more details, see [Deprecating legacy max payable child field.](/connectivity/docs/deprecation-policy/deprecation-and-sunsetting#deprecating-legacy-max-payable-child-field). Maximum number of children eligible for the children rate (the rest are charged as adults), must be less than or equal to number of children.
          format: int32
          deprecated: true
        unit_name_fallback:
          type: string
          description: Contains unit name (<code>EN_GB</code> locale) for any unit name ID, including those missing in meta (for debug purposes only; read only)
      description: Unit schema; use meta endpoint for fetching relevant meta data
    ApiResponseListUnit:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Unit'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
```
