# Retrieve current tracking session Retrieves the tracking session from the header or cookie sent by the client. The tracking session contains information about the user's session including a unique identifier, creation timestamp, and optional user ID for cross-session tracking. This endpoint allows clients to verify if they have an active valid session. Tries to retrieve the tracking session in this order: 1. Cookie with name 2. Header with name Args: request: The incoming HTTP request containing potential session data in cookies or headers Raises: HTTPException: If the session is invalid or not found (400 Bad Request). Returns: ResultResponse[TrackingSession]: The active tracking session. Endpoint: GET /playouts/{playout_id}/tracking/session Version: 2025-09-02 ## Path parameters: - `playout_id` (string, required) ## Header parameters: - `X-API-Key` (string, required) API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key. - `X-JAY-TRACKING` (string) Tracking session header for user tracking and analytics. This is set by the /playouts/{playout_id}/tracking/session endpoint. Example: "eyJzZXNzaW9uX2lkIjoiZXhhbXBsZS1zZXNzaW9uLWlkLTEyMzQiLCJzdGFydF90aW1lIjoiMjAyNS0wMS0wMVQxMjowMDowMC4wMDAwMDAiLCJzb3VyY2UiOiJqYXkuYXBpLnBsYXlvdXQuZXhhbXBsZSJ9" ## Response 200 fields (application/json): - `data` (object) The response data. Example: {"sessionId":"550e8400-e29b-41d4-a716-446655440000","startTime":"2023-01-15T14:30:24.123456","source":"jay.api.playout.1.0.0","userId":"user-123456","providerName":"netflix"} - `data.sessionId` (string, required) Unique identifier for the tracking session Example: "550e8400-e29b-41d4-a716-446655440000" - `data.startTime` (string, required) ISO 8601 formatted timestamp of when the session started Example: "2023-01-15T14:30:24.123456" - `data.source` (string, required) Identifier of the system or API version that created this session Example: "jay.api.playout.1.0.0" - `data.userId` (string) Optional identifier to track users across multiple sessions Example: "user-123456" - `data.providerName` (string) Name of the content provider, automatically extracted from the playout path Example: "netflix" - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details. ## Response 400 fields (application/json): - `data` (object) The response data. Example: {"sessionId":"550e8400-e29b-41d4-a716-446655440000","startTime":"2023-01-15T14:30:24.123456","source":"jay.api.playout.1.0.0","userId":"user-123456","providerName":"netflix"} - `data.sessionId` (string, required) Unique identifier for the tracking session Example: "550e8400-e29b-41d4-a716-446655440000" - `data.startTime` (string, required) ISO 8601 formatted timestamp of when the session started Example: "2023-01-15T14:30:24.123456" - `data.source` (string, required) Identifier of the system or API version that created this session Example: "jay.api.playout.1.0.0" - `data.userId` (string) Optional identifier to track users across multiple sessions Example: "user-123456" - `data.providerName` (string) Name of the content provider, automatically extracted from the playout path Example: "netflix" - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details. ## Response 422 fields (application/json): - `data` (object) The response data. Example: {"sessionId":"550e8400-e29b-41d4-a716-446655440000","startTime":"2023-01-15T14:30:24.123456","source":"jay.api.playout.1.0.0","userId":"user-123456","providerName":"netflix"} - `data.sessionId` (string, required) Unique identifier for the tracking session Example: "550e8400-e29b-41d4-a716-446655440000" - `data.startTime` (string, required) ISO 8601 formatted timestamp of when the session started Example: "2023-01-15T14:30:24.123456" - `data.source` (string, required) Identifier of the system or API version that created this session Example: "jay.api.playout.1.0.0" - `data.userId` (string) Optional identifier to track users across multiple sessions Example: "user-123456" - `data.providerName` (string) Name of the content provider, automatically extracted from the playout path Example: "netflix" - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details.