HousingAnywhere API

Download OpenAPI specification:Download

Introduction

The HousingAnywhere API allows you to easily publish your listings on the largest rental accommodation platform globally. The API strongly advances data interoperability between HousingAnywhere and its partners. As property managers you can use the API to connect your inventory to the HousingAnywhere platform, enabling you to reach a far bigger target audience. Bookings take place on the HousingAnywhere platform and the API will ensure that partner systems are updated in real-time whenever one of your properties gets booked on the HousingAnywhere platform.

Publish Quality Listings

The HousingAnywhere API offers a range of possibilities. The API supplies a managed solution for storing and accessing property data such as media and listing details on HousingAnywhere.

Integrate with Property Management Systems

Connected property managers can store and access information regarding the pricing and availability of all their rental units. This information is updated based on a predetermined frequency as updates are pulled by the HA platform.

Bookings made easy

Webhooks enable two-way integrations to ensure that information is kept synchronized between HousingAnywhere and systems that are already being used by property managers. By using these webhooks, bookings and cancellations can automatically be confirmed as they happen, and availability calendars are updated on the fly.

Getting Started guide

To get started, any user can request an API key. Every API request needs a private API key in query parameters as a part of authentication, which is unique to each client. Please contact our team to request your unique key. For more information, contact us at api@housinganywhere.com

Authentication

Authentication is done using a custom query parameter called 'api_key'.

ApiKeyAuth

Security Scheme Type API Key
Query parameter name: api_key

Pagination

We utilize cursor based pagination via the nextCursor parameter. It takes an existing object ID value (see below) and return objects.

Arguments

limit optional, defaults to 20

A limit on the number of objects to be returned.

nextCursor optional

A cursor for use in pagination, it is an object ID that defines your place in the list. For instance, if you make a request and receive 20 objects with a <value> for nextCursor, subsequent calls include nextCursor=<value> in order to fetch the next page of the list.

Technical Support

If you need additional technical support after going through our technical documentation, our team of international account managers will be eager to facilitate you.

Listings

Add Listing

Creates a listing on the HousingAnywhere platform. When creating a single listing, your request must include the fields marked as mandatory, other fields are optional but encouraged.

Authorizations:
Request Body schema: application/json
price
required
integer <int32>

Price of the appartment in lowest denomination in given currency. e.g: Cents if currency is Euro

pricingType
integer (PricingType)
Enum: "Flat = 1" "Monthly = 2"
monthlyPrices
object (MonthlyPrices)

Listing price is set on a monthly basis. They keys denote the months, 1 to 12, 1 represents January, 2 for February and son on. This field is required when pricingType is set to Monthly i.e 2. When choosing this type of pricing model, price for all twelve months are mandatory. Listing.price is a required field even when the pricing type is set to monthly, this is just for UI representation and won't be used.

currencyCode
required
string

Currency code of the currency used in ISO 4217 format.

address
required
object (Address)

The address of the listing by the house number, street, city, state, postal code and the country code.

type
required
integer (Type)
Enum: "House = 1" "Building = 2" "Apartment = 3"
kind
required
integer (Kind)
Enum: "EntirePlace = 1" "PrivateRoom = 2" "SharedRoom = 3"
description
required
string
deposit
integer <int32> (Deposit)
Deprecated

This field has been deprecated in favor of Costs endpoints.

Security Deposit of the appartment in lowest denomination in given currency. e.g: Cents if currency is Euro. If not provided, this field will be presented as not set in the UI.

estimatedBills
integer <int32>
Deprecated

This field has been deprecated in favor of Costs endpoint.

When any of facilities.additionalCosts is set to false (meaning that cost is not included in the rent), estimatedBill is expected to be higher than 0. This is because we want to make sure tenants have an estimation of the costs they may have if booking the accommodation. The number is purely informative and it does not affect the final price of the listing. The value is in lowest denomination in given currency. e.g: Cents if currency is Euro

minimumStayMonths
integer <int32>

Mention if there is a minimum limit on the period of stay, for eg, the tenant has to stay at least 2 months.

maximumStayMonths
MaximumStayMonths <int32>

Mention if there is a maximum limit on the period of stay, for eg, the tenant can not rent for a longer period than 12 months.

maxBookableDays
integer <int32>
Deprecated

This field denotes a time window in which the listing is bookable.

moveInWindow
integer <int32>

Setting this field to greater than 0 creates a time window in which in the listing is bookable. If the first day available is startDate then the listing is bookable between startDate and startDate + moveInWindow. Setting it to 0 denotes no limit.

currentOccupancy
integer <int32>

The number of people currently living in the house. This is only applicable to properties that are shared apartments or shared rooms.

rules
object (Rules)
minAge
integer <int32>

If there is a minimum age applicable to the tenant, i.e., they have to be at least 18 years old.

maxAge
integer <int32>

If there is a maximum age applicable to the tenant, i.e., they have to be no older than 35 years.

preferredGender
string (Gender)
Enum: "male" "female" "other"

This will be shown as No Preference in the UI when no value is set.

alias
string
externalReference
string
extraData
string

A JSON field with extra information important for the listing which doesn't fit in other fields. Make sure to escape the quotes!

facilities
object

Specify the facilities provided in the listing.

calendarOperations
Array of objects (CalendarOperation)
images
Array of objects (ImageRequest)
costs
Array of objects (Cost)

Responses

201

Add Listing Response

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

post/listings

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "price": 56700,
  • "pricingType": 2,
  • "monthlyPrices":
    {
    },
  • "currencyCode": "EUR",
  • "address":
    {
    },
  • "type": 1,
  • "kind": 1,
  • "description": "Centrally located apartment, very close to public transport and supermarkets. It comes with a fully equipped kitchen with all cooking, cleaning appliances. Registration is possible. There is a parking spot directly in front of the building.",
  • "deposit": 24000,
  • "estimatedBills": 15000,
  • "minimumStayMonths": 26,
  • "maximumStayMonths": 36,
  • "maxBookableDays": 30,
  • "moveInWindow": 30,
  • "currentOccupancy": 2,
  • "rules":
    {
    },
  • "minAge": 23,
  • "maxAge": 45,
  • "preferredGender": "male",
  • "alias": "the-left-room",
  • "externalReference": "any-identifier",
  • "extraData": "{\"onBoardingLink\":\"https://termsandconditions.com/uniqueId\"}",
  • "facilities":
    {
    },
  • "calendarOperations":
    [
    ],
  • "images":
    [],
  • "costs":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Get All Listings

Get all listings of the particular advertiser.

Authorizations:

Responses

200

GetListingsResponse

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

500

Something went wrong on server side

get/listings

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    [
    ],
  • "pagination":
    {
    }
}

Update Listing

Update details of specific listing.

Authorizations:
path Parameters
listing_id
required
integer <int64>

The ID of the listing to update

Request Body schema: application/json
price
integer <int32>

Price of the appartment in lowest denomination in given currency. e.g: Cents if currency is Euro

pricingType
integer (PricingType)
Enum: "Flat = 1" "Monthly = 2"
monthlyPrices
object (MonthlyPrices)

Listing price is set on a monthly basis. They keys denote the months, 1 to 12, 1 represents January, 2 for February and son on. This field is required when pricingType is set to Monthly i.e 2. When choosing this type of pricing model, price for all twelve months are mandatory. Listing.price is a required field even when the pricing type is set to monthly, this is just for UI representation and won't be used.

address
object (Address)

The address of the listing by the house number, street, city, state, postal code and the country code.

type
integer (Type)
Enum: "House = 1" "Building = 2" "Apartment = 3"
kind
integer (Kind)
Enum: "EntirePlace = 1" "PrivateRoom = 2" "SharedRoom = 3"
description
string
deposit
integer <int32> (Deposit)
Deprecated

This field has been deprecated in favor of Costs endpoints.

Security Deposit of the appartment in lowest denomination in given currency. e.g: Cents if currency is Euro. If not provided, this field will be presented as not set in the UI.

estimatedBills
integer <int32>
Deprecated

This field has been deprecated in favor of Costs endpoints.

When any of facilities.additionalCosts is set to false (meaning that cost is not included in the rent), estimatedBill is expected to be higher than 0. This is because we want to make sure tenants have an estimation of the costs they may have if booking the accommodation. The number is purely informative and it does not affect the final price of the listing. The value is in lowest denomination in given currency. e.g: Cents if currency is Euro

minimumStayMonths
integer <int32>

Mention if there is a minimum limit on the period of stay, for eg, the tenant has to stay at least 2 months.

maximumStayMonths
MaximumStayMonths <int32>

Mention if there is a maximum limit on the period of stay, for eg, the tenant can not rent for a longer period than 12 months.

maxBookableDays
integer <int32>
Deprecated

This field denotes a time window in which the listing is bookable.

moveInWindow
integer <int32>

Setting this field to greater than 0 creates a time window in which in the listing is bookable. If the first day available is startDate then the listing is bookable between startDate and startDate + moveInWindow. Setting it to 0 denotes no limit.

currentOccupancy
integer <int32>

The number of people currently living in the house. This is only applicable to properties that are shared apartments or shared rooms.

rules
object (Rules)
minAge
integer <int32>

If there is a minimum age applicable to the tenant, i.e., they have to be at least 18 years old.

maxAge
integer <int32>

If there is a maximum age applicable to the tenant, i.e., they have to be no older than 35 years.

preferredGender
string (Gender)
Enum: "male" "female" "other"

This will be shown as No Preference in the UI when no value is set.

alias
string
externalReference
string
extraData
string

A JSON field with extra information important for the listing which doesn't fit in other fields. Make sure to escape the quotes!

facilities
object (Facilities)

Responses

200

Update Listing Response

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

404

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

patch/listings/{listing_id}

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "price": 56700,
  • "pricingType": 2,
  • "monthlyPrices":
    {
    },
  • "address":
    {
    },
  • "type": 1,
  • "kind": 1,
  • "description": "string",
  • "deposit": 24000,
  • "estimatedBills": 15000,
  • "minimumStayMonths": 26,
  • "maximumStayMonths": 12,
  • "maxBookableDays": 30,
  • "moveInWindow": 30,
  • "currentOccupancy": 2,
  • "rules":
    {
    },
  • "minAge": 23,
  • "maxAge": 45,
  • "preferredGender": "male",
  • "alias": "the-left-room",
  • "externalReference": "any-identifier",
  • "extraData": "{\"onBoardingLink\":\"https://termsandconditions.com/uniqueId\"}",
  • "facilities":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Delete Listing

Delete an active listing.

Authorizations:
path Parameters
listing_id
required
string

The ID of the listing to delete

Responses

200

Delete Listing Response

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

404

The specified resource was not found

409

Conflict with the current state of the target resource.

500

Something went wrong on server side

delete/listings/{listing_id}

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Hide Listing

Hide an active listing from the HousingAnywhere platform without deleting it.

Authorizations:
path Parameters
listing_id
required
string

The ID of the listing to hide

Responses

200

Listing hidden successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

409

Conflict with the current state of the target resource.

422

Wrong payload

500

Something went wrong on server side

post/listings/{listing_id}/hide

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/hide

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/hide

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Show Listing

Show a hidden listing on the HousingAnywhere platform.

Authorizations:
path Parameters
listing_id
required
string

The ID of the listing to show

Responses

200

Listing shown successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

409

Conflict with the current state of the target resource.

422

Wrong payload

500

Something went wrong on server side

post/listings/{listing_id}/show

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/show

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/show

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Media

Get All Images

Get list of all the images of the specific listing.

Authorizations:

Responses

200

Success responses of all the images of the listing

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

get/listings/{listing_id}/images

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/images

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/images

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Add Images

Add images to the specific listing. Only 100 images at the time can be uploaded. To upload more than 100 images, multiple calls should be made.

Authorizations:
Request Body schema: application/json
images
required
Array of objects (ImageRequest)

Responses

200

Images submitted to upload.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

post/listings/{listing_id}/images/add

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/images/add

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/images/add

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Edit Images

Edit listing images rotation and ordering.

Authorizations:
Request Body schema: application/json
images
Array of objects (ImageUpdateRequest)
order
Array of strings

Responses

200

Images updated successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

patch/listings/{listing_id}/images/update

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/images/update

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/images/update

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "images":
    [
    ],
  • "order":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Delete Images

Delete listing images.

Authorizations:
Request Body schema: application/json
ids
Array of strings
all
bool

Responses

200

Images deleted successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

post/listings/{listing_id}/images/delete

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/images/delete

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/images/delete

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ids":
    [
    ],
  • "all": false
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    }
}

Calendar

Get Listing Calendar

Get list of all the calendar operations of the specific listing.

Authorizations:

Responses

200

Success responses of all the calendar operations of the listing

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

get/listings/{listing_id}/calendar-operations

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/calendar-operations

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/calendar-operations

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Edit Listing Calendar

Edit calendar operations of the specific listing.

Authorizations:
Request Body schema: application/json
calendarOperations
Array of objects (CalendarOperation)

Responses

200

Listing calendar operations updated successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

post/listings/{listing_id}/calendar-operations

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/calendar-operations

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/calendar-operations

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "calendarOperations":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    }
}

Costs

Get Listing Costs

Get a list of all the costs associated with the listing.

Authorizations:

Responses

200

Success responses for costs of the listing

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

get/listings/{listing_id}/costs

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/costs

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/costs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    {
    }
}

Edit Listing Costs

Edit costs associated with the listing.

Authorizations:
Request Body schema: application/json
costs
Array of objects (Cost)

Responses

200

Listing costs updated successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

post/listings/{listing_id}/costs

Production Server. Use it for real data

https://api.housinganywhere.com/v1/listings/{listing_id}/costs

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/listings/{listing_id}/costs

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "costs":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    }
}

Webhooks

Add Webhook

Webhooks notify your application any time an event (e.g. Booking) happens on your account.

Available webhooks

This endpoint can be used to register a webhook. Currently we provide only one type of webhook that is triggered when a booking is successfully paid for a listing. Once a webhook is successfully registered, we call the endpoint with the body constructed from the template registered (see Webhook templating section).

Webhook templating

We provide a templating engine that allows you to get the information you need about your bookings, templating capabilities are available through the two elements; url and body. Both can use the same set of variables to provide information about the booking that took place. For example, you can declare the following template in the body element when creating a webhook callback.

<booking start='{{$.BookingStartDate}}' end='{{$.BookingEndDate}}'>
<tenant>
<email>{{$.TenantEmail}}</email>
<name>{{$.TenantFirstName}} {{$.TenantLastName}}</name>
</tenant>
</booking>

Or you can use the url element like:

https://your-server.com/send/callback/here?bookingStart={{$.BookingStartDate}}&bookingEnd={{$.BookingEndDate}}&tenantEmail={{$.TenantEmail}}

Variables

The following variables are available for templating:

  • $.BookingStartDate (string)
  • $.BookingEndDate (string)
  • $.BookingPrice (int)
  • $.BookingDeposit (int)
  • $.BookingFee (int)
  • $.BookingTotal (int)
  • $.BookingCurrency (string)
  • $.BookingTenantsCount (int)
  • $.ListingAddress (string)
  • $.ListingStreet (string)
  • $.ListingHousenumber (string)
  • $.ListingNeighborhood (string)
  • $.ListingCity (string)
  • $.ListingZip (string)
  • $.TenantEmail (string)
  • $.TenantPhone (string)
  • $.TenantFirstName (string)
  • $.TenantLastName (string)
  • $.TenantGender (string)
  • $.ListingExternalReference (string)
Authorizations:
Request Body schema: application/json
url
required
string (WebhookURL)

The URL for the webhook callback, http and https are both allowed.

method
required
int32 (WebhooksMethods)
Enum: "GET = 1" "POST = 2"

The HTTP method to use: GET or POST.

contentType
required
int32 (WebhooksContentTypes)
Enum: "text/plain = 1" "application/x-www-form-urlencoded = 2" "application/json = 3"
type
required
int32 (WebhookType)
Value: "AFTER_BOOKING_PAID = 0"

The webhook you want to add a callback for.

body
string (WebhookBody)

The body of the webhook callback, used only if method is POST.

reportEmail
required
string (WebhookReportEmail)

This email address will receive a notification if a problem occurs in the webhook callback.

auth
object (WebhooksAuth)

Credentials for HTTP Basic Authentication if enabled on the callback URL.

Responses

200

Webhook added successfully.

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

post/webhooks

Production Server. Use it for real data

https://api.housinganywhere.com/v1/webhooks

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/webhooks

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "method": 2,
  • "contentType": 3,
  • "type": 0,
  • "body": "{ \"tenant_email\": \"`{{$.TenantEmail}}`\", \"booking_price\": \"`{{$.BookingPrice}}`\", \"booking_start_date\": \"`{{$.BookingStartDate}}`\", \"booking_end_date\": \"`{{$.BookingEndDate}}`\" }",
  • "reportEmail": "support@your-server.com",
  • "auth":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    [
    ]
}

Get all webhooks

Get a list of all configuered webhooks

Authorizations:

Responses

200

List webhooks

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

get/webhooks

Production Server. Use it for real data

https://api.housinganywhere.com/v1/webhooks

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/webhooks

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    },
  • "data":
    [
    ]
}

Update Webhook

Update details of a specific webhook.

Authorizations:
path Parameters
webhook_id
required
string

The ID of the webhook to update

Request Body schema: application/json
url
string (WebhookURL)

The URL for the webhook callback, http and https are both allowed.

method
int32 (WebhooksMethods)
Enum: "GET = 1" "POST = 2"

The HTTP method to use: GET or POST.

contentType
int32 (WebhooksContentTypes)
Enum: "text/plain = 1" "application/x-www-form-urlencoded = 2" "application/json = 3"
type
int32 (WebhookType)
Value: "AFTER_BOOKING_PAID = 0"

The webhook you want to add a callback for.

body
string (WebhookBody)

The body of the webhook callback, used only if method is POST.

reportEmail
string (WebhookReportEmail)

This email address will receive a notification if a problem occurs in the webhook callback.

auth
object (WebhooksAuth)

Credentials for HTTP Basic Authentication if enabled on the callback URL.

Responses

200

Patched successfully

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

patch/webhooks/{webhook_id}

Production Server. Use it for real data

https://api.housinganywhere.com/v1/webhooks/{webhook_id}

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/webhooks/{webhook_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "method": 2,
  • "contentType": 3,
  • "type": 0,
  • "body": "{ \"tenant_email\": \"`{{$.TenantEmail}}`\", \"booking_price\": \"`{{$.BookingPrice}}`\", \"booking_start_date\": \"`{{$.BookingStartDate}}`\", \"booking_end_date\": \"`{{$.BookingEndDate}}`\" }",
  • "reportEmail": "support@your-server.com",
  • "auth":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    }
}

Delete Webhook

Delete the spcified webhook

Authorizations:
path Parameters
webhook_id
required
string

The ID of the webhook to delete

Request Body schema: application/json

Responses

200

Deleted successfully

400

Bad request or Malformed JSON

401

Authorization error. API key is missing or invalid.

403

Insufficient Permission

422

Wrong payload

500

Something went wrong on server side

delete/webhooks/{webhook_id}

Production Server. Use it for real data

https://api.housinganywhere.com/v1/webhooks/{webhook_id}

Test server. Use it for test data

https://api.s.stage.housinganywhere.com/api/v1/webhooks/{webhook_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{ }

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "meta":
    {
    }
}