This resource represents Sources which usually represent Channels from which Bookings originate from.
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 all sources for a given account.
GET /sources
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"id": 1,
"internal": false,
"name": "Airbnb",
"position": 1,
"created_at": "2023-12-11T08:26:24Z",
"updated_at": "2023-12-11T08:26:24Z",
"links": {
"account": 1,
"bookings": [
1,
3
]
}
}
]
}
Returns a single source identified by ID.
GET /sources/:source_id
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"id": 1,
"internal": false,
"name": "Airbnb",
"position": 1,
"created_at": "2023-12-11T08:26:24Z",
"updated_at": "2023-12-11T08:26:24Z",
"links": {
"account": 1,
"bookings": [
1,
3
]
}
}
]
}
Returns a newly created source.
POST /sources
{
"sources": [
{
"name": "Airbnb",
"position": 1
}
]
}
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"id": 1,
"internal": false,
"name": "Airbnb",
"position": 1,
"created_at": "2023-12-11T08:26:24Z",
"updated_at": "2023-12-11T08:26:24Z",
"links": {
"account": 1,
"bookings": [
1,
3
]
}
}
]
}
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"id": 1,
"internal": false,
"name": "Airbnb",
"position": 1,
"created_at": "2023-12-11T08:26:24Z",
"updated_at": "2023-12-11T08:26:24Z",
"links": {
"account": 1,
"bookings": [
1,
3
]
}
}
]
}
Returns an updated source identified by ID.
PUT /sources/:source_id
{
"sources": [
{
"name": "Airbnb",
"position": 1
}
]
}
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"id": 1,
"internal": false,
"name": "Airbnb",
"position": 1,
"created_at": "2023-12-11T08:26:24Z",
"updated_at": "2023-12-11T08:26:24Z",
"links": {
"account": 1,
"bookings": [
1,
3
]
}
}
]
}
{
"links": {
"sources.account": "https://www.bookingsync.com/api/v3/accounts/{sources.account}",
"sources.bookings": "https://www.bookingsync.com/api/v3/bookings/{sources.bookings}"
},
"sources": [
{
"id": 1,
"internal": false,
"name": "Airbnb",
"position": 1,
"created_at": "2023-12-11T08:26:24Z",
"updated_at": "2023-12-11T08:26:24Z",
"links": {
"account": 1,
"bookings": [
1,
3
]
}
}
]
}