Weave Weave API

Background


Weave is an API aggregator for the travel tech industry. Weave enables applications to integrate with a number of different service providers using a single API.

When the underlying service provider APIs change, the integrations built using Weave will be updated with minimal to no development effort by application developers.

Weave will continue to support previous versions of its own API endpoints for a predetermined period of time to enable developers sufficient time to plan and execute updates to their product roadmaps

Get started


Organization account

In the user profile, create a new organization for your company. You will be able to invite colleagues to join this organizational account.

After the organization has been created, select it in the dropdown list and click on the "Visit organization dashboard link".

Create organization form

API key

In the organizational dashboard, create the Weave API key for the organization. This key must be included in the header for each request

A new key can be generated at any time but do note that only one key can be in operation at any time. Regenerating a new key will immediately invalidate any other existing key

Generate API keys

Integrations

Select the integrations required for your connections

Activate required integrations

API Design


Domain

Requests are made to the Weave API domain eg https://use1.weaveapi.com

Requests can only be made using SSL enabled connections

API Versions

Requests will specify the Weave API version being used. If the version is omitted (or is invalid), Weave will default to the latest API version.

Deprecation schedule: Weave will support 2 previous versions for a period of 6 months before deprecation

Endpoints

Each API will have an end point eg /listings. End points may require additional query parameters (for GET requests) or body parameters (for POST requests).

Headers

Additional parameters for the request, for example authentication tokens and request destinations

Example


curl -X GET \ 
      https://use1.weaveapi.com/api/v1/reservations/1234 \             // Weave API endpoint
      -H 'X-WEAVE-APIKEY: myweaveapikey' \                             // Weave API access token
      -H 'X-WEAVE-PROXY-DESTINATION: hostaway' \                       // Proxied PMS/OTA
      -H 'X-WEAVE-PROXY-ACCESS-TOKEN: Hostaway access token' \         // Proxied PMS/OTA access token
      -H 'Cache-control: no-cache' \                                   // Additional header commands    

Context


Available integrations

Type Name
OTA Connect Airbnb
PMS Guesty for Hosts
PMS Hostaway
PMS Hospitable
PMS Hostfully
PMS Lodgify
PMS Lodgix
PMS Smoobu
PMS Uplisting

Origin

Origin for all requests will be: https://use1.weaveapi.com

API Version

Current API version is “v1”

Request paths should be prefixed with the API version ie “/api/v1/endpoint/path”

Headers

The following headers need to be included with each request

X-WEAVE-APIKEY Unique API key assigned to each Weave customer

X-WEAVE-PROXY-DESTINATION PMS / OTA target for the request. Current options are:

  • connect_airbnb
  • guesty_for_hosts
  • hostaway
  • hospitable
  • hostfully
  • lodgify
  • lodgix
  • smoobu
  • uplisting

X-WEAVE-PROXY-PARTNER-KEY API key issued to customer by the PMS / OTA target

X-WEAVE-CLIENT-ID Id of the end user on the target PMS / OTA system

X-WEAVE-PROXY-ACCESS-TOKEN (optional) Access token granted by target PMS / OTA system

Overiding proxy origin

The URL origin for each proxy destination is hard-coded into Weave. To override the hard-coded origin, provide the origin search parameter eg

https://use1.weaveapi.com/api/vi/listings?origin="https%3A%2F%2Fexample.com"

Returned data

Data is always returned in the format


{
  data: [ array of normalized data ],
  raw:  [ raw data as returned by the proxy ],
  status:  [ true / false indication of success of request ] 
}

Note: If the proxy target does not support the endpoint, the response will be returned with the data and raw fields as empty arrays

Webhooks

Weave is registered to receive all webhooks from every integrated PMS / OTA partner. In order to start receiving webhooks from your selected integrations, make sure to add your Webhook URL to each Organization that you want to receive webhooks. All webhooks from all PMS / OTA will be sent to your registered URL.

Weave does not retry proxied webhooks. If an outgoing proxied webhook fails, Weave will return an error to the sender, and rely on the retry logic of the PMS / OTA's webhook system.

Currently supports: Connect Airbnb


BODY
{
  action: 'action.string', // the ENUM corresponding to the webhook event type
  customerId: 'abc123',    // the Weave Organization ID (UUID) for which this action occurred, if applicable
  listingId: 'abc123',     // the ID of the listing entity in the PMS/OTA, if applicable
  reservationId: 'abc123', // the ID of the reservation entity in the PMS/OTA, if applicable
  reviewId: 'abc123'       // the ID of the review entity in the PMS/OTA, if applicable
}

Supported action string values:

  • listing.created
  • listing.changed
  • listing.deleted
  • listing.deactivated
  • listing.reactivated
  • reservation.created
  • reservation.changed
  • channel.activated
  • review.created
  • review.submitted
  • review.published
  • review.expired
  • review.changed
  • review.response_submitted

Errors

Errors are returned with the appropriate error code and message


{
  status: false,
  proxy_message: "......"   // error message returned from target
}

Endpoints


Authentication

Context

This endpoint is used to obtain authentication tokens from the target PMS / OTA. The authentication token is then used in future requests (ie passed in the header as X-WEAVE-PROXY-ACCESS-TOKEN)

N.B. for Airbnb Connect, this endpoint has different behaviour, and must be manually actioned by a user of an Airbnb account in order to connect that account, no key is returned by the API.

Path

/accessTokens

Request type
POST
Headers
Content-type: application/json
Search parameters
None
Body

client_id: PMS user client id

client_secret: PMS user client secret

Results

{
  status: true/false,
  data: [
    {
      access_token: 'xs34...' // access token to be used in future requests in the X-WEAVE-PROXY-ACCESS-TOKEN header field
      expiry: 1749275583083   // expiry time of the access_token presented as the number of milliseconds since the beginning of the UNIX epoch
    }
  ],
  raw: ...
}
(Airbnb) Body

client_id: Your name, for the customer object created in Connect

client_secret: Your email

(Airbnb) Results

{
  status: true/false,
  data: [
    {
      access_token: 'https://connect.hospitable.com/connect/authenticate/123abc...' // you MUST follow this URL and authenticate your airbnb account in order to finish setting up the connection with Connect
      expiry: '2024-01-01T00:01:02Z'                                                // expiry time of the access_token URL in ISO-8601 format
    }
  ],
  raw: ...   
}
Supported destinations
  • Connect Airbnb
  • Hostaway
  • Hospitable

Listing

Context

Request listings from PMS / OTA

Path
/listings
Request type
GET
Headers
Content-type: application/json
Search parameters

listingId: PMS / OTA id of the listing

Results

{
  status: true/false,
  data: [
    {
      // listing object
    }
  ],
  raw: {
    // raw response from PMS / OTA
  } 
}   
Example

https://use1.weaveapi.com/api/v1/listings?listingId=1234

Supported destinations
  • Connect Airbnb
  • Guesty for Hosts
  • Hostaway
  • Hospitable
  • Lodgify
  • Lodgix
  • Smoobu
  • Uplisting

Calendar

Context

Request daily calendar from PMS / OTA

Path

/calendar

Request type
GET
Headers
Content-type: application/json
Search parameters

listingId: (required) PMS id of the listing

startDate: return listings beginning from this date (yyyy-mm-dd)

endDate: return listings up to this date (yyyy-mm-dd)

Results

{
  status: true/false,
  data: [
    {
      // array of calendar objects
    }
  ],
  raw: {
    // raw response from PMS
  } 
}   
Example

https://use1.weaveapi.com/api/v1/calendar?listingId=1234&startDate=2023-07-01&endDate=2023-07-31

Supported destinations
  • Connect Airbnb
  • Guesty for Hosts
  • Hostaway
  • Hospitable
  • Hostfully
  • Lodgify
  • Lodgix
  • Uplisting

Reservations

Context

Request reservations from PMS / OTA

Path

/reservations

Request type
GET
Headers
Content-type: application/json
Search parameters

listingId: PMS id of listing for which the reservations are being requested

reservationId: PMS id of reservation being requested (NOTE: not all PMS will respect the reservationId filter so you should expect the response to contain an array of reservations)

startDate: return listings beginning from this date (yyyy-mm-dd)

endDate: return listings up to this date (yyyy-mm-dd)

Results

{
  status: true/false,
  data: [
    {
      // reservation object
    }
  ],
  raw: {
    // raw response from PMS
  } 
}   
Example

https://use1.weaveapi.com/api/v1/reservations?reservationId=1234&listingId=9876&startDate=2023–07-01&endDate=2023-07-31

Supported destinations
  • Connect Airbnb
  • Guesty for Hosts
  • Hostaway
  • Hospitable
  • Hostfully
  • Lodgify
  • Lodgix
  • Smoobu
  • Uplisting
Context

Create reservations in PMS

Path

/reservations

Request type
POST
Headers
Content-type: application/json
Search parameters

N/A

Body

ListingId: (required) PMS id of listing in which the reservation will be created

channelName: (required) Name of channel creating the reservation (eg airbnb)

arrivalDate: (required) Starting date of reservation

departureDate: (required) End date of reservation

guestName: (required) Full name of guest

guestAddress: Guest's street address

guestCity: Guest's city

guestCountry: Guest's country

guestZipCode: Guest's zip code

guestEmail: Guest's email address

guestPhone: Guest's phone number

numberOfGuests: Total number of guests

numberOfAdults: Total number of adults

numberOfChildren: Total number of children

numberOfInfants: Total number of infants

numberOfPets: Total number of pets

totalPrice: Total price charged for reservation

taxAmount: Tax charged on payment

currency: Currency

isPaid: Payment status of reservation

paymentMethod: Payment method

status: Reservation status

comment: Comment

Results

{
  status: true/false,
  data: [
    {
      // reservation object
    }
  ],
  raw: {
    // raw response from PMS
  } 
}   
Example

POST
https://use1.weaveapi.com/api/v1/reservations

BODY
{
    listingId: 9876,
    arrivalDate: 2023–07-01,
    departureDate: 2023-07-31,
    guestName: Jane Doe
}
Supported destinations
  • Hostaway
Context

Modify reservations in PMS

Path

/reservations

Request type
PATCH
Headers
Content-type: application/json
Search parameters

reservationId: (required) PMS id of reservation being modified

Body

ListingId: PMS id of listing in which the reservation exists

channelName: Name of channel modifying the reservation (eg airbnb)

arrivalDate: Starting date of reservation

departureDate: End date of reservation

guestName: Full name of guest

guestAddress: Guest's street address

guestCity: Guest's city

guestCountry: Guest's country

guestZipCode: Guest's zip code

guestEmail: Guest's email address

guestPhone: Guest's phone number

numberOfGuests: Total number of guests

numberOfAdults: Total number of adults

numberOfChildren: Total number of children

numberOfInfants: Total number of infants

numberOfPets: Total number of pets

totalPrice: Total price charged for reservation

taxAmount: Tax charged on payment

currency: Currency

isPaid: Payment status of reservation

paymentMethod: Payment method

status: Reservation status

comment: Comment

Results

{
  status: true/false,
  data: [
    {
      // reservation object
    }
  ],
  raw: {
    // raw response from PMS
  } 
}   
Example

PATCH
https://use1.weaveapi.com/api/v1/reservations?reservationId=1234

BODY
{
    listingId: 9876,
    arrivalDate: 2023–07-01,
    departureDate: 2023-07-31,
    guestName: Jane Doe
}
Supported destinations
  • Hostaway
Context

Cancel reservations in PMS

Path

/reservations

Request type
PUT
Headers
Content-type: application/json
Search parameters

reservationId: (required) PMS id of reservation being modified

Body

cancelledBy: (required) Initiator of cancellation (eg host or guest)

Example

PUT
https://use1.weaveapi.com/api/v1/reservations?reservationId=1234

BODY
{
    cancelledBy: guest
}
Supported destinations
  • Hostaway

Users

Context

Request user details from PMS

Path

/users

Request type
GET
Headers
Content-type: application/json
Search parameters
None
Results

{
  status: true/false,
  data: [
    {
      // user object
    }
  ],
  raw: {
    // raw response from PMS
  } 
}   
Example

https://use1.weaveapi.com/api/v1/users

Supported destinations
  • Hostaway
  • Hostfully
  • Lodgix

Reviews

Context

Request reviews of listings from PMS

Path

/reviews

Request type
GET
Headers
Content-type: application/json
Search parameters

reviewId: PMS id of review being queried

Results

{
  status: true/false,
  data: [
    {
      // reviews object
    }
  ],
  raw: {
    // raw response from PMS/OTA
  } 
}   
Example

https://use1.weaveapi.com/api/v1/reviews?reviewId=1234

Supported destinations
  • Connect Airbnb
  • Hostaway
  • Lodgix

Objects


Listing

Fields
Field Type Description
id string listing id
name string listing name
description string description of listing
thumbnailUrl string url of listing thumbnail
state string state where listing is located
city string city where listing is located
address string full address of listing
zipcode string zipcode where listing is located
country string country where listing is located
countryCode string country code of listing address
latitude string latitude of listing
longitude string longitude of listing
price string nightly price of stay
currency string currency of pricing
currencyCode string currencyCode of pricing
personCapacity integer Maximum number of people that can be accommodated
bedroomsNumber integer Number of bedrooms
bedsNumber string Number of beds
bathroomsNumber string Number of bathrooms
amenities array amenities available
website string URL for listing
images string url for images
propertyRooms array rooms available in listing

Calendar

Fields
Field Type Description
id string calendar id
listingId string listing id
date string calendar date
isAvailable boolean true / false if listing is available on the date
price string nightly stay price
currency string currency of pricing
minimumStay integer minimum number of nights stay that can be booked
maximumStay integer maximum number of nights stay that can be booked

Reservation

Fields
Field Type Description
id string reservation id
reservationId string Id of reservation
channelName string booking channel
reservationDate string Date reservation was booked
guestName string full name of guest
guestFirstName string first name of guest
guestLastName string last name of guest
guestCountry string country of guest address
guestZipCode string zipcode of guest address
guestCity string city of guest address
guestAddress string full address of guest
guestEmail string guest email address
phone string guest phone number
numberOfGuests integer number of guests in booking
arrivalDate string starting date of reservation
departureDate string ending date of reservation
nights integer number of nights in reservation
totalPrice string total price paid for booking
currency string currency of payment
isPaid boolean true/false whether reservation has been charged
status string status of reservation

User

Fields
Field Type Description
id string user id
email string email address of user
secondEmail string second email address of user
firstName string first name of user
lastName string last name of user
title string title of user
city string city of user address
country string country of user address
postalCode string postal code of user address
phone string user phone number
isAdmin Boolean true / false if user is an admin

Review

Fields
Field Type Description
id string user id
accountId string id of account
reservationId string id of reservation that was reviewed
rating string review rating
guestName string full name of guest leaving review
title string title of review
description string review text