Update status
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/social/post/status';const options = { method: 'PATCH', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: 'null'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/social/post/status \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data nullBulk-updates the status (e.g. scheduled, paused, cancelled) of one or more posts for the account.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Update posts for this managing entity ID
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Status update criteria and new status
Request to change the status of one or more managed social posts, identified either by specific post IDs or by a search filter.
object
Search filter criteria to identify posts to update (mutually exclusive with postIdentifiers)
object
Number of records to be skipped by the pager.
Example
0Number of records to take.
Example
10Descriptors used for sorting result set.
Descriptor that defines the sort direction and field for ordering a result set.
object
Descriptors used for sorting result set
Example
ascData set field to sort on
Example
hotel.nameExample
{ "dir": "asc", "field": "hotel.name"}Filter by post status (APPROVED, DRAFT, PUBLISHED, CANCELLED, etc)
Example
APPROVEDFilter by target social platform
Example
WINK_LINKSFull-text search keyword
Example
luxury accommodationFilter by post scheduled date range
object
Retrieve data range starting with and including this start date
Example
2020-12-24Retrieve data range ending with and including this end date
Example
2020-12-31Example
{ "startDate": "2020-12-24", "endDate": "2020-12-31"}Example
{ "skip": 0, "take": 10, "sort": [ { "dir": "asc", "field": "hotel.name" } ], "status": "APPROVED", "platform": "WINK_LINKS", "term": "luxury accommodation", "scheduledDate": { "startDate": "2020-12-24", "endDate": "2020-12-31" }}Mode of operation (e.g. bulk update)
Example
ALLNew status to apply to selected posts (APPROVED, DRAFT, PUBLISHED, CANCELLED, etc)
Example
APPROVEDExample
{ "filter": { "skip": 0, "take": 10, "sort": [ { "dir": "asc", "field": "hotel.name" } ], "status": "APPROVED", "platform": "WINK_LINKS", "term": "luxury accommodation", "scheduledDate": { "startDate": "2020-12-24", "endDate": "2020-12-31" } }, "mode": "ALL", "postIdentifiers": [ "c8f2a5e7-1d9b-4e3c-9a2f-5e7b8d3c1f4a" ], "status": "APPROVED"}Responses
Section titled “ Responses ”Updated post IDs and the new status that was applied
Response confirming the result of a bulk managed social post status update, including the affected post IDs, the applied status, and the total count updated.
object
The status that was applied to these posts
Total number of posts updated in the database
Example
{ "ids": [ "c8f2a5e7-1d9b-4e3c-9a2f-5e7b8d3c1f4a", "d7e1b4f6-2c8a-4d2b-8f3e-6d9c7b2a0e5f" ], "status": "APPROVED", "count": 2}Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable