Skip to content

Generate Wink Studio report for travel agent

POST
/api/managing-entity/{managingEntityIdentifier}/studio/report/csv
curl --request POST \
--url https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/studio/report/csv \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data '{ "reportName": "", "reportDataType": "PROPERTY", "fieldNames": "", "state": "" }'

Generates a CSV report filtered to show only bookings associated with the specified managing entity (travel agent). The report excludes failed bookings.

managingEntityIdentifier
required
string
""

Unique identifier for the travel agent managing entity

Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69
Wink-Version
string
default: 2.0.0
Allowed values: 2.0
Media type application/json
object
reportName
required

Name of the report for the generated CSV file

string
"" >= 1 characters
Example
booking-summary
reportDataType
required

Type of data source to query from: PROPERTY (hotel inventory), USER (guest profiles), BOOKING (reservations), ACCOUNT (managing entity data)

string
""
Allowed values: PROPERTY USER BOOKING ACCOUNT
Example
BOOKING
fieldNames
required

List of field definitions specifying which data fields to include and their display titles

Array<object>
"" >= 1 items
object
title
required

Display name for the report column

string
"" >= 1 characters
Example
Property Name
valuePath
required

JSON path to the field in the data object (dot-notation)

string
"" >= 1 characters
Example
hotel.name
state
required

Query state with sorting, filtering, and pagination criteria to retrieve the report data

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>
""
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
filter

Descriptors used for filtering result set

object
logic

Whether to filter inclusively or exclusively

string
""
Allowed values: and or
Example
and
filters

Descriptors used for filtering the result set

Array<object>
""
object
field
required

Field name to filter on

string
"" >= 1 characters
Example
hotel.name
operator
required

Filter operator to use on field

string
""
Allowed values: neq eq contains doesnotcontain isnull isnotnull isempty isnotempty startswith endswith gte lte gt lt in nin
Example
startsWith
value

Value to filter dataset against

""
Example
Happy Res
ignoreCase

Make filter comparison case insensitive. Default: Case sensitive

boolean
Example
true
group

Descriptors to group result sets by.

Array<object>
""
object
field

Field to group data set on

string
""
Example
createdDate
dir

Group sort direction

string
""
Allowed values: asc desc
Example
asc
aggregates

Primitive aggregate data points

Array<object>
""
object
field

Field to run aggregate function on

string
""
Example
hotel.bookings
aggregate

Aggregate function

string
""
Allowed values: count sum average min max
Example
count

CSV report generated successfully and returned as a file download

Invalid report query (missing required fields or invalid data type)

object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}

Unauthorized

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

User does not have BOOKING:READ permission for the specified managing entity

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Internal Server Error

object
Example generated
{}

Service Unavailable

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties