Skip to main content
GET
/
api
/
v1
/
listing
/
{id}
/
units
Get units for a listing
curl --request GET \
  --url https://api.example.com/api/v1/listing/{id}/units \
  --header 'x-calry-api-key: <api-key>'
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "providerUnitID": "unit-123",
    "name": "Ocean View Suite",
    "description": "Beautiful suite with ocean views",
    "inventoryCount": 2,
    "maxOccupancy": 4,
    "bedroomCount": 2,
    "bathroomCount": 2,
    "basePrice": 200,
    "currency": "USD",
    "isAutoGenerated": false,
    "status": "ACTIVE",
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-02T00:00:00.000Z",
    "amenities": [
      {
        "name": "Balcony",
        "description": "Private balcony",
        "type": "outdoor"
      },
      {
        "name": "Mini Bar",
        "description": "Stocked mini bar",
        "type": "amenity"
      }
    ],
    "pictures": [
      {
        "url": "https://example.com/photo1.jpg",
        "description": "Suite interior"
      },
      {
        "url": "https://example.com/photo2.jpg",
        "description": "Balcony view"
      }
    ]
  }
]

Authorizations

x-calry-api-key
string
header
required

Headers

x-calry-tenant-id
string

Optional tenant ID to specify which tenant to operate as. If not provided, the default tenant will be used.

Path Parameters

id
string
required

Unique identifier of the listing

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Units retrieved successfully

id
string
required

Unique identifier of the unit

Example:

"123e4567-e89b-12d3-a456-426614174000"

providerUnitID
string
required

Provider unit ID

Example:

"unit-123"

name
string
required

Name of the unit

Example:

"Ocean View Suite"

description
string
required

Description of the unit

Example:

"Beautiful suite with ocean views"

inventoryCount
number
required

Number of available units of this type

Example:

2

maxOccupancy
number
required

Maximum occupancy for this unit

Example:

4

bedroomCount
number
required

Number of bedrooms

Example:

2

bathroomCount
number
required

Number of bathrooms

Example:

2

basePrice
number
required

Base price for this unit

Example:

200

currency
string
required

Currency code

Example:

"USD"

isAutoGenerated
boolean
required

Whether this unit was auto-generated

Example:

false

status
enum<string>
required

Status of the unit

Available options:
ACTIVE,
INACTIVE
Example:

"ACTIVE"

createdAt
string<date-time>
required

Creation timestamp

Example:

"2025-01-01T00:00:00.000Z"

updatedAt
string<date-time>
required

Last update timestamp

Example:

"2025-01-02T00:00:00.000Z"

amenities
object[]

Unit-specific amenities (null for auto-generated single-unit properties)

Example:
[
{
"name": "Balcony",
"description": "Private balcony",
"type": "outdoor"
},
{
"name": "Mini Bar",
"description": "Stocked mini bar",
"type": "amenity"
}
]
pictures
object[]

Unit-specific pictures (null for auto-generated single-unit properties)

Example:
[
{
"url": "https://example.com/photo1.jpg",
"description": "Suite interior"
},
{
"url": "https://example.com/photo2.jpg",
"description": "Balcony view"
}
]