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 typeapplication/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
platform

Filter by target social platform

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

Filter by post scheduled date range

object
endDate
required

Retrieve data range ending with and including this end date

string format: date
""
Example
2020-12-31
startDate
required

Retrieve data range starting with and including this start date

string format: date
""
Example
2020-12-24
Example
{
"endDate": "2020-12-31",
"startDate": "2020-12-24"
}
skip

Number of records to be skipped by the pager.

integer format: int32
0
Example
0
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
take

Number of records to take.

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

Full-text search keyword

string
""
Example
luxury accommodation
Example
{
"platform": "WINK_LINKS",
"scheduledDate": {
"endDate": "2020-12-31",
"startDate": "2020-12-24"
},
"skip": 0,
"sort": [
{
"dir": "asc",
"field": "hotel.name"
}
],
"status": "APPROVED",
"take": 10,
"term": "luxury accommodation"
}
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": {
"platform": "WINK_LINKS",
"scheduledDate": {
"endDate": "2020-12-31",
"startDate": "2020-12-24"
},
"skip": 0,
"sort": [
{
"dir": "asc",
"field": "hotel.name"
}
],
"status": "APPROVED",
"take": 10,
"term": "luxury accommodation"
},
"mode": "ALL",
"postIdentifiers": [
"c8f2a5e7-1d9b-4e3c-9a2f-5e7b8d3c1f4a"
],
"status": "APPROVED"
}

Updated post IDs and the new status that was applied

Media typeapplication/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
count
required

Total number of posts updated in the database

integer format: int64
""
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
key
additional properties
""
Example
{
"count": 2,
"ids": [
"c8f2a5e7-1d9b-4e3c-9a2f-5e7b8d3c1f4a",
"d7e1b4f6-2c8a-4d2b-8f3e-6d9c7b2a0e5f"
],
"status": "APPROVED"
}

Bad Request — missing or invalid request parameter or body

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

Unauthorized — authentication is required or the session has expired

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

Forbidden — authenticated but lacking the required permission or scope

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

Not Found — the requested resource does not exist

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

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

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

Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version

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

Unsupported Media Type — use application/json

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

Internal Server Error — an unexpected failure occurred on the server

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

Service Unavailable — a downstream dependency is unreachable

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