Update status
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/managed-social/post/status';const options = { method: 'PATCH', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"filter":"","mode":"ALL","postIdentifiers":[""],"status":"DRAFT"}'};
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/studio/managed-social/post/status \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "filter": "", "mode": "ALL", "postIdentifiers": [ "" ], "status": "DRAFT" }'Bulk-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
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.
object
Descriptors used for sorting result set
Example
ascData set field to sort on
Example
hotel.nameFilter 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-31Mode of operation (e.g. bulk update)
New status to apply to selected posts (APPROVED, DRAFT, PUBLISHED, CANCELLED, etc)
Responses
Section titled “ Responses ”OK
object
The status that was applied to these posts
Total number of posts updated in the database
Example
{ "ids": [ "" ], "status": "DRAFT", "count": ""}Bad Request
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized
object
object
Forbidden
object
object
Internal Server Error
object
Example generated
{}