{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ca325bef-0032-46d2-bce8-0f6eee29d843","name":"PFL Pro API Collection","description":"## Overview\n\nThis Postman collection provides comprehensive testing coverage for the Photo Finish™ LIVE PFL Pro API. The collection includes authentication setup, all available endpoints, example requests, and testing scenarios for developers integrating with the PFL Pro API.\n\n## Table of Contents\n\n1. [Prerequisites](#prerequisites)\n2. [Environment Setup](#environment-setup)\n3. [Authentication](#authentication)\n4. [Error Handling](#error-handling)\n5. [Best Practices](#best-practices)\n\n## Prerequisites\n\n### Account Setup & Subscription Process\n\n#### Step 1: Register Account\n\n1. Visit [https://photofinish.live](https://photofinish.live)\n2. Create a new account or log in with existing credentials\n3. Complete account verification if required\n\n#### Step 2: Subscribe to PFL Pro\n\n1. Navigate to **My Stable → Settings → API** at [https://photofinish.live/mystable/settings/api](https://photofinish.live/mystable/settings/api)\n2. Subscribe to the **PFL Pro** paid subscription through the web interface\n3. **Note**: PFL Pro subscription is **only available through the web application** - it cannot be done via API. Starting Season 32, PFL Pro will no longer be a free service and will require a 99 crown/month to continue the service. If you do not have enough funds in your account you will be unsubscribed automatically.\n\n#### Step 3: Generate API Credentials\n\n1. Once subscribed, you'll see options to generate API credentials on the API settings page\n2. **Generate API Key**: Creates the key for request routing\n3. **Generate Access Token**: Creates a secure access token for request authentication\n4. **Important**: You'll need both credentials - Both the API Key and the Access Token go in the header of all requests to authenticate the request.\n\n### Required Access & Permissions\n\n- **Active PFL Pro Subscription**: Required for all API access\n- **Whitelisted Account**: Production environments may require account whitelisting\n- **Valid User Account**: Registered account on [https://photofinish.live](https://photofinish.live)\n\n### Development Setup\n\n- **Postman**: Latest version recommended\n- **Test Data**: Valid horse IDs, race IDs, and stable IDs for testing\n\n## Environment Setup\n\n### Postman Environment Variables\n\nCreate a new environment in Postman with the following variables:\n\n``` json\n{\n  \"pfl_pro_api_base_url\": \"https://api.photofinish.live/pfl-pro\",\n  \"x-api-key\": \"YOUR_PFL_PRO_API_KEY\",\n  \"access-token\": \"YOUR_PFL_PRO_ACCESS_TOKEN\",\n  \"test_stable_id\": \"YOUR_STABLE_ID\",\n  \"test_horse_id\": \"YOUR_STABLES_HORSE_ID\",\n  \"test_race_id\": \"JOINABLE_RACE_ID\"\n}\n```\n\n### Variable Reference\n\n| Variable | Description | Where to Find It |\n| --- | --- | --- |\n| `pfl_pro_api_base_url` | Base URL for the PFL Pro API (includes `/pfl-pro` prefix) | `https://api.photofinish.live/pfl-pro` |\n| `x-api-key` | Your PFL Pro API key for request routing | Generate at [My Stable → Settings → API](https://photofinish.live/mystable/settings/api) → **Generate API Key** |\n| `access-token` | Your PFL Pro access token for authentication | Generate at [My Stable → Settings → API](https://photofinish.live/mystable/settings/api) → **Generate Access Token** |\n| `test_stable_id` | Your stable's unique PF2 ID (a UUID) | Found in your stable's profile page URL on [photofinish.live](https://photofinish.live), or in the `ownerID` field returned by the `/horse-api/horse/{horseId}` endpoint |\n| `test_horse_id` | A horse ID from your stable to use for testing | Call `GET /pfl-pro/horse-api/stable/{your_stable_id}` to get a list of your horse IDs |\n| `test_race_id` | A race ID that your test horse is eligible to join | Call `GET /pfl-pro/race-api/recommended/{your_horse_id}` to find joinable races for your horse |\n\n## Authentication\n\n### Authentication System Overview\n\nThe PFL Pro API uses a JWT token authentication system.\n\n### Authentication Headers for API Calls\n\nAll PFL Pro API requests require:\n\n``` http\nx-api-key: YOUR_API_KEY\nAuthorization: Bearer YOUR_ACCESS_TOKEN\nContent-Type: application/json\n```\n\n### Token Permissions\n\nYour access token includes permissions that control which API groups you can access. Permissions are configured when generating your access token at [My Stable → Settings → API](https://photofinish.live/mystable/settings/api).\n\n| API Group | Required Permission | Description |\n| --- | --- | --- |\n| `/pfl-pro/horse-api/*` | **Horse** | Query horses, get horse details, rename horses |\n| `/pfl-pro/race-api/*` | **Race** | Get recommended races, join/scratch races, query race schedule |\n| `/pfl-pro/marketplace-api/*` | **Marketplace** | Browse, list, purchase, and manage sale/rental listings |\n| `/pfl-pro/breeding-api/*` | **Breed** | Query stud listings, purchase breeding reports |\n| `/pfl-pro/user-api/*` | **Stable** | Get saved filters and user preferences |\n\n**Note:** If your token is missing a required permission, the API will return a `403 Forbidden` response with the message \"Token does not have required permissions\". To fix this, regenerate your access token with the needed permissions enabled.\n\n### Setting Up Authentication in Postman\n\n1. **Collection-Level Auth**:\n    - Go to your collection settings\n    - Select **Authorization** tab\n    - Choose **Bearer Token** type\n    - Set Authorization: `{{access-token}}` and x-api-key: `{{x-api-key}}` in your header requests\n\n## Error Handling\n\n### Common Error Codes\n\n| Status Code | Error Type | Description | Resolution |\n| --- | --- | --- | --- |\n| 400 | Bad Request | Missing or invalid parameters | Check request format and required fields |\n| 401 | Unauthorized | Invalid API credentials | Regenerate API key/access token |\n| 403 | Forbidden | Insufficient permissions | Verify PFL Pro subscription and token permissions (see Token Permissions above) |\n| 404 | Not Found | Resource doesn't exist | Check horse/race/stable/listing IDs |\n| 429 | Rate Limited | Too many requests | Implement request throttling |\n| 500 | Server Error | Internal server error | Contact support |\n\n## Best Practices\n\n### Request Guidelines\n\n1. Include `x-api-key` and `Authorization: Bearer` headers on all requests\n2. **Use environment variables** for sensitive data\n3. **Implement proper error handling** in your applications\n4. **Respect rate limits** and implement exponential backoff\n5. **Validate responses** before processing data\n\n### Security Best Practices\n\n1. **Store API keys and access tokens securely** - never commit to version control or share with others\n2. **Regenerate credentials regularly** for security\n3. **Use HTTPS only** for all API communications\n4. **Implement request logging** for debugging\n5. **Monitor API usage** to detect anomalies\n\n## Support and Resources\n\n- **Account Registration**: [https://photofinish.live](https://photofinish.live)\n- **API Settings & Subscription**: [https://photofinish.live/mystable/settings/api](https://photofinish.live/mystable/settings/api)\n- **API Documentation**: [https://developers.photofinish.live](https://developers.photofinish.live)\n- **Base URL**: `https://api.photofinish.live/pfl-pro/[race-api,horse-api,marketplace-api,breeding-api,user-api]`\n- **Rate Limits**: Contact support for current rate limit information\n- **Support**: Technical support available through official channels\n\n## Quick Start Checklist\n\n- Register account at [photofinish.live](https://photofinish.live)\n- Subscribe to PFL Pro at [API Settings](https://photofinish.live/mystable/settings/api)\n- Generate API Key via stable settings → api\n- Generate Access Token via stable settings → api\n- Set up Postman environment with `x-api-key`, `access-token` variables\n- Import collection with Bearer token authentication\n- Configure collection to use API Key header (`x-api-key`)\n- Test authentication with sample request\n- Begin API integration","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5623368","team":2800280,"collectionId":"ca325bef-0032-46d2-bce8-0f6eee29d843","publishedId":"2sAYJ7hzaw","public":true,"publicUrl":"https://developers.photofinish.live","privateUrl":"https://go.postman.co/documentation/5623368-ca325bef-0032-46d2-bce8-0f6eee29d843","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Complete API documentation for the Photo Finish™ LIVE PFL Pro API. Includes horse management, race registration, marketplace, breeding, and user endpoints."},{"name":"title","value":"PFL PRO - Comprehensive API Documentation for Photo Finish™ LIVE"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.11.8","publishDate":"2026-04-08T17:35:29.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"PFL PRO - Comprehensive API Documentation for Photo Finish™ LIVE","description":"Complete API documentation for the Photo Finish™ LIVE PFL Pro API. Includes horse management, race registration, marketplace, breeding, and user endpoints."},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"PFL PRO Production","id":"f61e6a8d-d093-46ff-b103-8dfc131f67c1","owner":"5623368","values":[{"enabled":true,"key":"pfl_pro_api_base_url","value":"https://api.photofinish.live/pfl-pro","type":"default"},{"enabled":true,"key":"x-api-key","value":"YOUR_API_KEY","type":"secret"},{"enabled":true,"key":"access-token","value":"YOUR_ACCESS_TOKEN","type":"secret"},{"enabled":true,"key":"test_horse_id","value":"YOUR_HORSE_ID","type":"default"},{"enabled":true,"key":"test_stable_id","value":"YOUR_STABLE_ID","type":"default"},{"enabled":true,"key":"test_race_id","value":"YOUR_RACE_ID","type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/3b0c6d8b2cdbdf3128c85b42d35860994a3f2c51262d1960341f3fc98a0983f2","favicon":"https://photofinish.live/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"PFL PRO Production","value":"5623368-f61e6a8d-d093-46ff-b103-8dfc131f67c1"}],"canonicalUrl":"https://developers.photofinish.live/view/metadata/2sAYJ7hzaw"}