Query FDP modules
Behavior
This API endpoint receives a GraphQL query against one or many FDP modules and it returns the requested data, possibly paginated with cursor pagination. Refer to the Single Fan View API for more information about FDP modules and GraphQL schemas.
GraphQL
The Single Fan View API is built using GraphQL, a powerful query language for APIs, as well as a runtime for executing those queries. GraphQL offers several key advantages that are especially beneficial for this API:
- Flexible querying: Clients can use any standard GraphQL client to query data, without needing custom request logic.
- Precise data fetching: Clients specify exactly which fields they need, and the server responds with only that data, reducing payload size and eliminating over-fetching.
- Client-driven structure: The shape of the response mirrors the structure of the query, giving clients full control over how the data is retrieved and structured.
More information about GraphQL can be found here. More information about the query-able GraphQL schema can be found here .
Authentication
To access the Single Fan View API, clients must authenticate using an API key. Please contact our development team to request an API key with the appropriate permissions to fetch data from FDP. The API key must be included in every request using the X-API-KEY HTTP header.
Pagination
The Single Fan View API uses cursor-based pagination to efficiently navigate through large datasets. A cursor is a string that uniquely identifies the next page of results for a given query.
The number of results returned per page is controlled via the size query parameter. Each response includes a set of results and a cursor pointing to the next page. To retrieve the subsequent page, include the returned cursor as a query parameter in the next request. If the returned cursor is null, it indicates there are no further results available for the current query.
A cursor is tightly bound to the specific GraphQL query and any associated sorting parameters. If the query or sort parameters are modified, including changing the sort fields or their order, the previously returned cursor becomes invalid. In cases where a mismatched cursor is provided, the cursor will be silently ignored, and the server will return the first page of results, along with a new cursor. This approach ensures consistent and predictable pagination while allowing clients to customize how data is fetched and ordered.
The following example demonstrates how to use cursors to iterate through pages of results:
{
tickets(scvUserId: "001beda9967ce420104b2c499265d8ba", size: 3) {
items {
scvUserTicketId
scvUserId
productId
createdAt
updatedAt
}
next
}
}
{
"data": {
"tickets": {
"items": [
{
"scvUserTicketId": "f7090666b9921ccff45144f3f0dad591",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "4",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
},
{
"scvUserTicketId": "d283e3646e1f256f24fd01a107ae315f",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "1",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
},
{
"scvUserTicketId": "c3fa65b8200c682af7b48d0003033872",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "3",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
}
],
"next": "eyJjaWQiOiJJTkNST1dEIiwic3VpZCI6IjAwMWJlZGE5OTY3Y2U0MjAxMDRiMmM0OTkyNjVkOGJhIiwic2giOiIzNThmODFjNWUwMWQ0ZTU0YjQ2NjI0ZDEyODhiZTMzYSIsInN2IjpbIjIwMjUtMDMtMTdUMTI6NTI6NDEuNTg1NzQ3WiIsImMzZmE2NWI4MjAwYzY4MmFmN2I0OGQwMDAzMDMzODcyIl19"
}
}
}
{
tickets(scvUserId: "001beda9967ce420104b2c499265d8ba", size: 3, cursor:"eyJjaWQiOiJJTkNST1dEIiwic3VpZCI6IjAwMWJlZGE5OTY3Y2U0MjAxMDRiMmM0OTkyNjVkOGJhIiwic2giOiIzNThmODFjNWUwMWQ0ZTU0YjQ2NjI0ZDEyODhiZTMzYSIsInN2IjpbIjIwMjUtMDMtMTdUMTI6NTI6NDEuNTg1NzQ3WiIsImMzZmE2NWI4MjAwYzY4MmFmN2I0OGQwMDAzMDMzODcyIl19") {
items {
scvUserTicketId
scvUserId
productId
createdAt
updatedAt
}
next
}
}
{
"data": {
"tickets": {
"items": [
{
"scvUserTicketId": "bfe4202edf96bd0281ba303ae87a3a35",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "1",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
},
{
"scvUserTicketId": "bd419757eff8158851618afb8c02e0c1",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "4",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
},
{
"scvUserTicketId": "7a4ac51498ce15bc65dc9878297dfd04",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "4",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
}
],
"next": "eyJjaWQiOiJJTkNST1dEIiwic3VpZCI6IjAwMWJlZGE5OTY3Y2U0MjAxMDRiMmM0OTkyNjVkOGJhIiwic2giOiIzNThmODFjNWUwMWQ0ZTU0YjQ2NjI0ZDEyODhiZTMzYSIsInN2IjpbIjIwMjUtMDMtMTdUMTI6NTI6NDEuNTg1NzQ3WiIsIjdhNGFjNTE0OThjZTE1YmM2NWRjOTg3ODI5N2RmZDA0Il19"
}
}
}
Sorting
The Single Fan View API allows results to be sorted by any field defined in the schema. Multiple fields can be included in the sort list, and the order of fields determines their precedence, fields listed earlier take priority over those listed later. Each field in the sort list can optionally be prefixed with a sign to indicate the sort direction:
- A minus sign (-) indicates descending order.
- A plus sign (+) or no prefix indicates ascending order.
Given the following sort list:
["-firstName", "updatedAt"]
The results will be sorted as follows:
- First, by firstName in descending order.
- Then, for records with the same firstName, by updatedAt in ascending order.
The following example demonstrates how to use the sort parameter to order the results:
{
tickets(scvUserId: "001beda9967ce420104b2c499265d8ba", sort:["-productId", "updatedAt"]) {
items {
scvUserTicketId
scvUserId
productId
createdAt
updatedAt
}
next
}
}
Querying multiple modules
The API allows you to retrieve data from multiple FDP modules with a single HTTP request, as shown in the following example.
{
retails(
scvUserId: "63d911e78be3684af1e80bb73665378d"
size: 2
sort: ["updatedAt"]
) {
items {
scvUserRetailId
createdAt
updatedAt
}
next
}
tickets(
scvUserId: "001beda9967ce420104b2c499265d8ba"
size: 2
sort: ["-productId", "updatedAt"]
) {
items {
scvUserTicketId
scvUserId
productId
createdAt
updatedAt
}
next
}
}
{
"data": {
"retails": {
"items": [
{
"scvUserRetailId": "ce19ece4822dbe3fa023c241911f29f8",
"createdAt": "2025-03-17T12:52:38.216598Z",
"updatedAt": "2025-03-17T12:52:38.216598Z"
},
{
"scvUserRetailId": "a2aa326d9ace519b7c0ffdabf9b1c7f7",
"createdAt": "2025-03-17T12:52:38.216598Z",
"updatedAt": "2025-03-17T12:52:38.216598Z"
}
],
"next": "eyJjaWQiOiJJTkNST1dEIiwic3VpZCI6IjYzZDkxMWU3OGJlMzY4NGFmMWU4MGJiNzM2NjUzNzhkIiwic2giOiI3OWEzNjFlNGQzNGZmNTdjMzA3YTk0ODhlY2Y4NTc1ZiIsInN2IjpbIjIwMjUtMDMtMTdUMTI6NTI6MzguMjE2NTk4WiIsImEyYWEzMjZkOWFjZTUxOWI3YzBmZmRhYmY5YjFjN2Y3Il19"
},
"tickets": {
"items": [
{
"scvUserTicketId": "f7090666b9921ccff45144f3f0dad591",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "4",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
},
{
"scvUserTicketId": "bd419757eff8158851618afb8c02e0c1",
"scvUserId": "001beda9967ce420104b2c499265d8ba",
"productId": "4",
"createdAt": "2025-03-17T12:52:41.585747Z",
"updatedAt": "2025-03-17T12:52:41.585747Z"
}
],
"next": "eyJjaWQiOiJJTkNST1dEIiwic3VpZCI6IjAwMWJlZGE5OTY3Y2U0MjAxMDRiMmM0OTkyNjVkOGJhIiwic2giOiIwZmRjODNmNzU5NTIzNjc4NGIwYTMxNTg5Y2ZlNzFkOSIsInN2IjpbIjQiLCIyMDI1LTAzLTE3VDEyOjUyOjQxLjU4NTc0N1oiLCJiZDQxOTc1N2VmZjgxNTg4NTE2MThhZmI4YzAyZTBjMSJdfQ=="
}
}
}
As shown in the request and response above, fetching data from multiple modules involves executing separate queries simultaneously on the server. The results from each module are independently sorted and paginated, and the response includes a separate cursor for each queried module.