Skip to content

Update status

PATCH
/api/managing-entity/{managingEntityIdentifier}/social/post/status
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 null

Bulk-updates the status (e.g. scheduled, paused, cancelled) of one or more posts for the account.

managingEntityIdentifier
required
string
""

Update posts for this managing entity ID

Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69
Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Status update criteria and new status

Media type application/json

Request to change the status of one or more managed social posts, identified either by specific post IDs or by a search filter.

object
filter

Search filter criteria to identify posts to update (mutually exclusive with postIdentifiers)

object
skip

Number of records to be skipped by the pager.

integer format: int32
0
Example
0
take

Number of records to take.

integer format: int32
default: 30 >= 1 <= 180
Example
10
sort

Descriptors used for sorting result set.

Array<object>
""

Descriptor that defines the sort direction and field for ordering a result set.

object
dir

Descriptors used for sorting result set

string
""
Allowed values: asc desc
Example
asc
field

Data set field to sort on

string
""
Example
hotel.name
Example
{
"dir": "asc",
"field": "hotel.name"
}
status

Filter by post status (APPROVED, DRAFT, PUBLISHED, CANCELLED, etc)

Array<string>
""
Allowed values: DRAFT PENDING_APPROVAL APPROVED REJECTED PAUSED PUBLISHED FAILED
Example
APPROVED
platform

Filter by target social platform

Array<string>
""
Allowed values: WINK_LINKS FACEBOOK INSTAGRAM
Example
WINK_LINKS
term

Full-text search keyword

string
""
Example
luxury accommodation
scheduledDate

Filter by post scheduled date range

object
startDate
required

Retrieve data range starting with and including this start date

string format: date
""
Example
2020-12-24
endDate
required

Retrieve data range ending with and including this end date

string format: date
""
Example
2020-12-31
Example
{
"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

Mode of operation (e.g. bulk update)

string
""
Allowed values: ALL PAGE
Example
ALL
postIdentifiers
Array<string>
status
required

New status to apply to selected posts (APPROVED, DRAFT, PUBLISHED, CANCELLED, etc)

string
""
Allowed values: DRAFT PENDING_APPROVAL APPROVED REJECTED PAUSED PUBLISHED FAILED
Example
APPROVED
Example
{
"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"
}

Updated post IDs and the new status that was applied

Media type application/json

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
ids
required
Array<string>
status
required

The status that was applied to these posts

string
""
Allowed values: DRAFT PENDING_APPROVAL APPROVED REJECTED PAUSED PUBLISHED FAILED
count
required

Total number of posts updated in the database

integer format: int64
""
key
additional properties
""
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

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unauthorized — authentication is required or the session has expired

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Forbidden — authenticated but lacking the required permission or scope

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Not Found — the requested resource does not exist

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Unsupported Media Type — use application/json

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Internal Server Error — an unexpected failure occurred on the server

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example

Service Unavailable — a downstream dependency is unreachable

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
key
additional properties
""
Example