Sources
Overview
This resource represents Sources which usually represent Channels from which Bookings originate from.
Parameters
- OAuth Scopes:
- bookings_read
- bookings_write / bookings_write_owned
Name | Type | Read/Write | Description |
---|---|---|---|
account | Integer | Read | Account's ID related to the Source |
id | Integer | Read | Source's ID. |
name | String | Read | Source's name. |
position | Integer | Read | Source's position on the list. |
internal | Boolean | Read | Source's internal status. When true , it is restricted for internal-only use (should not be used by the Partners for anything else than read). Every attempt to associate any record with such a source will result in 422 error. |
created_at | Time | Read | Source's create time. |
updated_at | Time | Read | Source's update time. |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
account | Integer | Read | Account's ID related to the Source | |
id | Integer | Read | Source's ID. | |
name | String | Read/Write | Source's name. | Required, maximum length: 50, must not contain non-printing characters |
position | Integer | Read/Write | Source's position on the list. | |
internal | Boolean | Read | Source's internal status. When true , it is restricted for internal-only use (should not be used by the Partners for anything else than read). Every attempt to associate any record with such a source will result in 422 error. | |
created_at | Time | Read | Source's create time. | |
updated_at | Time | Read | Source's update time. |
List sources
List all sources for a given account.
GET /sources
- OAuth Scopes:
- bookings_read / bookings_write / bookings_write_owned
response.json
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"links": {
"account": 1,
"bookings": [
1,
3
]
},
"id": 1,
"name": "Airbnb",
"created_at": "2025-03-31T17:52:12.684Z",
"updated_at": "2025-04-07T17:52:12.684Z",
"position": 1,
"internal": false
}
]
}
Get a single source
Returns a single source identified by ID.
GET /sources/:source_id
- OAuth Scopes:
- bookings_read / bookings_write / bookings_write_owned
response.json
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"links": {
"account": 1,
"bookings": [
1,
3
]
},
"id": 1,
"name": "Airbnb",
"created_at": "2025-03-31T17:52:12.685Z",
"updated_at": "2025-04-07T17:52:12.685Z",
"position": 1,
"internal": false
}
]
}
Create a new source
Returns a newly created source.
POST /sources
- OAuth Scopes:
- bookings_write / bookings_write_owned
request.json
{
"sources": [
{
"name": "Airbnb",
"position": 1
}
]
}
response.json
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"links": {
"account": 1,
"bookings": [
1,
3
]
},
"id": 1,
"name": "Airbnb",
"created_at": "2025-03-31T17:52:12.686Z",
"updated_at": "2025-04-07T17:52:12.686Z",
"position": 1,
"internal": false
}
]
}
Update a source
Returns an updated source identified by ID.
PUT /sources/:source_id
- OAuth Scopes:
- bookings_write / bookings_write_owned
request.json
{
"sources": [
{
"name": "Airbnb",
"position": 1
}
]
}
response.json
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"links": {
"account": 1,
"bookings": [
1,
3
]
},
"id": 1,
"name": "Airbnb",
"created_at": "2025-03-31T17:52:12.688Z",
"updated_at": "2025-04-07T17:52:12.688Z",
"position": 1,
"internal": false
}
]
}