Skip to main content
PUT
/
api
/
v1
/
promotions
/
{id}
/
integration-account
/
assign
Assign all integration account listings to promotion
curl --request PUT \
  --url https://api.example.com/api/v1/promotions/{id}/integration-account/assign \
  --header 'Content-Type: application/json' \
  --header 'x-calry-api-key: <api-key>' \
  --data '
{
  "integrationAccountIDs": [
    "123e4567-e89b-12d3-a456-426614174000",
    "223e4567-e89b-12d3-a456-426614174000"
  ]
}
'
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Beach House",
    "integrationAccountID": "123e4567-e89b-12d3-a456-426614174000",
    "externalID": "ext-123",
    "status": "ACTIVE",
    "description": "Beautiful beach house with ocean views",
    "thumbnailURL": "https://example.com/images/thumbnail.jpg",
    "pictures": [
      "https://example.com/images/pic1.jpg",
      "https://example.com/images/pic2.jpg"
    ],
    "latitude": 34.0522,
    "longitude": -118.2437,
    "bedroomCount": 3,
    "bathroomCount": 2
  }
]

Authorizations

x-calry-api-key
string
header
required

Headers

x-calry-tenant-id
string

Optional tenant ID to specify which tenant to operate as. Controls access to promotions and their associated listings. If not provided, the default tenant will be used.

Path Parameters

id
string
required

ID of the promotion to assign listings to

Example:

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

Body

application/json
integrationAccountIDs
string[]
required

Array of integration account IDs whose listings should be assigned to the promotion

Example:
[
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174000"
]

Response

Integration account listings assigned to promotion successfully

id
string
required

Unique identifier for the listing

Example:

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

name
string
required

Name of the listing

Example:

"Beach House"

integrationAccountID
string
required

ID of the integration account this listing belongs to

Example:

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

externalID
string

External ID for the listing

Example:

"ext-123"

status
enum<string>

Status of the listing

Available options:
ACTIVE,
INACTIVE
Example:

"ACTIVE"

description
string

Description of the listing

Example:

"Beautiful beach house with ocean views"

thumbnailURL
string

URL for the listing thumbnail

Example:

"https://example.com/images/thumbnail.jpg"

pictures
string[]

Pictures of the listing

Example:
[
"https://example.com/images/pic1.jpg",
"https://example.com/images/pic2.jpg"
]
latitude
number

Latitude coordinate of the listing

Example:

34.0522

longitude
number

Longitude coordinate of the listing

Example:

-118.2437

bedroomCount
number

Number of bedrooms in the listing

Example:

3

bathroomCount
number

Number of bathrooms in the listing

Example:

2