Guides
Cash or points?
Step 1: Get cash and points prices
Search with POST /v1/search. Each cash result carries the best points option we know for the same flights and its value in cents per point (cpp). Set search_type to both to add award results to the stream.
curl -N -X POST "https://api.pointifytravels.com/v1/search" \
-H "Authorization: Bearer $POINTIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"origin":"JFK","destination":"NRT","departure_date":"2027-01-23","trip_type":"one_way","cabin_class":"economy","search_type":"both"}'The fields that matter here, from one result event:
{
"price_cash": 1284.4,
"price_points": 85000,
"points_program_name": "ANA Mileage Club",
"cpp": 1.4
}Step 2: Rank the options
Send the cash price, the points prices and the traveler's bank balances to POST /v1/points/optimize. It ranks each option by effective cents per point, counts transfers from the banks they hold, and marks the best choice.
curl -X POST "https://api.pointifytravels.com/v1/points/optimize" \
-H "Authorization: Bearer $POINTIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cash_price":1284.4,"points_options":[{"program":"Aeroplan","points_required":75000}],"user_balances":[{"program":"amex_mr","balance":120000}]}'{
"options": [
{
"method": "points_direct",
"program_name": "Aeroplan",
"points_required": 75000,
"effective_cpp": 1.71,
"total_cost": 0,
"savings": 1284.4,
"recommendation": "best"
},
{
"method": "points_transfer",
"program_name": "Aeroplan",
"points_required": 75000,
"transfer_from": "amex_mr",
"transfer_ratio": 1,
"effective_cpp": 1.71,
"total_cost": 0,
"savings": 1284.4,
"recommendation": "best",
"has_enough_points": true
},
{
"method": "cash",
"total_cost": 1284.4,
"savings": 0,
"recommendation": "fair"
}
]
}Use program names as transfer partners list them, such as Aeroplan, and bank codes for balances, such as amex_mr.
Step 3: Factor in bonuses
GET /v1/points/transfer-bonuses lists bonuses running now or announced; started tells them apart. With a 1:1 transfer and a 30% bonus, 75,000 miles cost about 57,700 bank points.
curl "https://api.pointifytravels.com/v1/points/transfer-bonuses" \
-H "Authorization: Bearer $POINTIFY_API_KEY"What to show users
- The cash price next to each points option, with its cents per point.
- The recommended option (
recommendation: "best") and whether they have enough points (has_enough_points). - Which bank to transfer from, at what ratio, and any running bonus that lowers the cost.
With a test key, flight search returns sample data; the points endpoints return real data. See Test mode.