{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/awardsecrets-com/json-schema/awardsecrets-com-points-request-schema.json",
  "title": "PointsRequest",
  "description": "One request counts as one query on the member's allowance (an answer that asks a clarifying question is not counted).",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/awardsecrets-com-openapi.yml#/components/schemas/PointsRequest",
  "type": "object",
  "required": [
    "operation"
  ],
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "best_path",
        "chart",
        "programme",
        "transfers",
        "answer",
        "sweet_spots"
      ],
      "description": "best_path: what a flight costs, by programme. chart: one programme's chart price. programme: what a programme can book. transfers: where a card currency can transfer. answer: how to book a flight with the points you have (1.7.0). sweet_spots: our curated routes with every programme's published price (2.2.0; aliases sweetspots, sweet, deals, routes)."
    },
    "carrier": {
      "type": "string",
      "pattern": "^[A-Z0-9]{2}$",
      "description": "best_path: the airline that OPERATES the flight. Programmes price by operating airline."
    },
    "origin": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "destination": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "cabin": {
      "type": "string",
      "enum": [
        "economy",
        "premium_economy",
        "business",
        "first"
      ],
      "default": "business",
      "description": "premium_economy is accepted by answer only: not priced (answer_status cabin_not_priced); the options are economy, offered as an alternative."
    },
    "via": {
      "type": "array",
      "maxItems": 3,
      "items": {
        "type": "string",
        "pattern": "^[A-Z]{3}$"
      },
      "description": "Connecting airports. Needed for correct prices on connections: some programmes price each flight, others the total distance."
    },
    "currencies_held": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional. Card currencies (e.g. AMEX_MR, CHASE_UR) or programmes held directly (e.g. AVIOS). Omit to price every programme that can book the flight. answer accepts it as an alias of points_held."
    },
    "programme": {
      "type": "string",
      "description": "chart: the programme code (e.g. AVIOS)."
    },
    "programme_code": {
      "type": "string",
      "description": "programme: the programme code."
    },
    "from_currency": {
      "type": "string",
      "description": "transfers: the card currency (e.g. AMEX_MR)."
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "Optional departure date (YYYY-MM-DD). Seasonal charts (ANA's own flights) use it to pick the season. answer: also accepted."
    },
    "question": {
      "type": "string",
      "maxLength": 800,
      "description": "answer: the traveller's question in words. Send this OR fields (airline, origin, destination...), not both."
    },
    "previous_fields": {
      "type": "object",
      "description": "answer, with question: the fields object from an earlier answer, for follow-ups such as 'what about with Chase?'."
    },
    "airline": {
      "type": "string",
      "pattern": "^[A-Za-z0-9]{2}$",
      "description": "answer: the airline to FLY (2-letter code). Optional with fields when origin and destination are given: left out, the airlines that fly the route are answered. Or send airlines instead. sweet_spots: only routes on this airline (optional)."
    },
    "airlines": {
      "type": "array",
      "maxItems": 3,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{2}$"
      },
      "description": "answer: up to 3 airlines to answer for, instead of airline."
    },
    "points_held": {
      "type": "array",
      "maxItems": 12,
      "items": {
        "type": "string"
      },
      "description": "answer: card currencies (AMEX_MR, CHASE_UR, CITI_TY, CAPITAL_ONE, BILT, MAX_MILES, ROVE_MILES, HSBC_SG, HSBC_MY, HSBC_VN, BCA_REWARD, BCA_WORLD, BCA_AMEX, BCA_UNIONPAY, CITI_SG_TY, CITI_SG_MILES, DBS, UOB_UNI, AMEX_SG, SC_VI, SC_360, OCBC_90N, OCBC_VOYAGE, OCBC_DOLLARS, SBI_MILES, HSBC_IN, HSBC_IN_PLAT, AXIS_BURGUNDY, AXIS_MAGNUS_BURGUNDY, AXIS_MAGNUS, AXIS_SELECT, AXIS_OTHER, AXIS_OLYMPUS, AXIS_ATLAS, AXIS_HORIZON, AXIS_IOCL, HDFC_INFINIA, HDFC_DINERS_BLACK, HDFC_REGALIA_GOLD, HDFC_BIZ_BLACK, HDFC_REGALIA, AMEX_IN, ICICI_EMERALDE, ICICI, AMEX_CA, AMEX_UK, RBC_AVION, HSBC_HK_EVERYMILE, HSBC_HK_PREMIER, HSBC_HK, AMEX_AU, ANZ_REWARDS, NAB_REWARDS, WESTPAC_ALTITUDE, AMPLIFY, MAYBANK_PREMIER, MAYBANK_SIGNATURE, MAYBANK, MAYBANK_AMEX_PLATINUM, MAYBANK_AMEX_PLAT_CHARGE, MAYBANK_AMEX, CIMB, KTC, RHB, SC_MY, SC_MY_WORLDMILES, SC_TW, UOB_MY_METAL, UOB_MY_ZENITH, UOB_MY_PRIVILEGE, UOB_MY_VI, UOB_MY, UOB_TH_RESERVE, UOB_TH_INFINITE, UOB_TH_ZENITH, UOB_TH_PRVI, UOB_TH, UOB_ID_ZENITH, UOB_ID_PRVI, UOB_ID, UOB_VN, VIB_TRAVEL_ELITE, PANIN, PANIN_GOLD, PERMATA_BLACK, PERMATA, AMEX_HK, CITI_HK, CITI_HK_REWARDS, SC_HK, DBS_HK_BLACK, DBS_HK_BLACK_AMEX, DBS_HK, DBS_HK_COMPASS, WELLS_FARGO, MARRIOTT, HILTON, IHG, ESFERA, LIVELO, PAYREWARDS_AU, PAYREWARDS_US, ACCOR, HYATT, WYNDHAM, AMEX_DE, AMEX_NL) or programme codes. Unknown codes are a 400. Omit to assume the main card points. sweet_spots: optional; each programme then lists the codes that reach it (reached_with)."
    },
    "passengers": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9,
      "default": 1,
      "description": "answer: travellers (prices are per person)."
    },
    "destination_region": {
      "type": "string",
      "description": "sweet_spots: a region of the destination: EUROPE, ASIA (North, South-East and South Asia), NORTH_ASIA, SOUTH_EAST_ASIA, SOUTH_ASIA, MIDDLE_EAST, OCEANIA, SOUTH_AMERICA, CENTRAL_AMERICA, LATIN_AMERICA (South and Central America), AFRICA, NORTH_AMERICA, MALDIVES."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50,
      "description": "sweet_spots: how many routes to return."
    }
  }
}