{"openapi":"3.0.3","info":{"version":"1.0.0","title":"Rates API","description":"Rates API is a free OpenAPI service to retrieve the latest lending rates offered by New Zealand financial institutions — updated hourly."},"servers":[{"url":"https://ratesapi.nz","description":"Production"}],"paths":{"/api/v1/mortgage-rates/":{"get":{"operationId":"listMortgageRates","tags":["Mortgage Rates"],"summary":"List mortgage rates","description":"Retrieve all mortgage rates for all institutions","parameters":[{"name":"termInMonths","in":"query","required":false,"schema":{"pattern":"^\\d+$","description":"Mortgage term in months","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"MortgageRates","type":"string"},"data":{"title":"MortgageRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:anz"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:anz:standard"],"type":"string"},"name":{"examples":["Standard"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","term","termInMonths"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"term":{"default":"Variable floating","examples":["6 months","3 years"],"type":"string","enum":["Variable floating","6 months","18 months","1 year","2 years","3 years","4 years","5 years"]},"termInMonths":{"nullable":true,"anyOf":[{"examples":[6,36],"type":"number"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/mortgage-rates/time-series":{"get":{"operationId":"getMortgageRatesTimeSeries","tags":["Mortgage Rates"],"summary":"Get mortgage rates time series","parameters":[{"name":"date","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date in YYYY-MM-DD format for historical data","example":"2025-03-01","type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date in YYYY-MM-DD format for time series range","example":"2025-01-01","type":"string"}},{"name":"endDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date in YYYY-MM-DD format for time series range","example":"2025-03-01","type":"string"}},{"name":"institutionId","in":"query","required":false,"schema":{"description":"Optional institution ID to filter time series data","examples":["institution:anz"],"type":"string"}},{"name":"termInMonths","in":"query","required":false,"schema":{"pattern":"^\\d+$","description":"Mortgage term in months","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","timeSeries","availableDates","termsOfUse","timestamp"],"properties":{"type":{"const":"MortgageRatesTimeSeries","type":"string"},"timeSeries":{"type":"object","patternProperties":{"^(.*)$":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated"],"properties":{"type":{"const":"MortgageRates","type":"string"},"data":{"title":"MortgageRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:anz"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:anz:standard"],"type":"string"},"name":{"examples":["Standard"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","term","termInMonths"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"term":{"default":"Variable floating","examples":["6 months","3 years"],"type":"string","enum":["Variable floating","6 months","18 months","1 year","2 years","3 years","4 years","5 years"]},"termInMonths":{"nullable":true,"anyOf":[{"examples":[6,36],"type":"number"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"}}}}},"availableDates":{"type":"array","items":{"type":"string"}},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/mortgage-rates/{institutionId}":{"get":{"operationId":"getMortgageRatesByInstitution","tags":["Mortgage Rates"],"summary":"Get mortgage rates by institution","parameters":[{"name":"institutionId","in":"path","required":true,"schema":{"examples":["institution:anz","institution:asb","institution:bnz","institution:kiwibank","institution:westpac"],"type":"string"}},{"name":"termInMonths","in":"query","required":false,"schema":{"pattern":"^\\d+$","description":"Mortgage term in months","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"MortgageRates","type":"string"},"data":{"title":"MortgageRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:anz"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:anz:standard"],"type":"string"},"name":{"examples":["Standard"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","term","termInMonths"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"term":{"default":"Variable floating","examples":["6 months","3 years"],"type":"string","enum":["Variable floating","6 months","18 months","1 year","2 years","3 years","4 years","5 years"]},"termInMonths":{"nullable":true,"anyOf":[{"examples":[6,36],"type":"number"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/personal-loan-rates/":{"get":{"operationId":"listPersonalLoanRates","tags":["Personal Loan Rates"],"summary":"List personal loan rates","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"PersonalLoanRates","type":"string"},"data":{"title":"PersonalLoanRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:asb"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:asb:personal-loan"],"type":"string"},"name":{"examples":["Personal Loan"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","plan","condition"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"plan":{"nullable":true,"anyOf":[{"examples":["Secured"],"type":"string"},{"type":"null"}]},"condition":{"nullable":true,"anyOf":[{"examples":["$3,000 to $50,000"],"type":"string"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/personal-loan-rates/time-series":{"get":{"operationId":"getPersonalLoanRatesTimeSeries","tags":["Personal Loan Rates"],"summary":"Get personal loan rates time series","parameters":[{"name":"date","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date in YYYY-MM-DD format for historical data","example":"2025-03-01","type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date in YYYY-MM-DD format for time series range","example":"2025-01-01","type":"string"}},{"name":"endDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date in YYYY-MM-DD format for time series range","example":"2025-03-01","type":"string"}},{"name":"institutionId","in":"query","required":false,"schema":{"description":"Optional institution ID to filter time series data","examples":["institution:anz"],"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","timeSeries","availableDates","termsOfUse","timestamp"],"properties":{"type":{"const":"PersonalLoanRatesTimeSeries","type":"string"},"timeSeries":{"type":"object","patternProperties":{"^(.*)$":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated"],"properties":{"type":{"const":"PersonalLoanRates","type":"string"},"data":{"title":"PersonalLoanRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:asb"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:asb:personal-loan"],"type":"string"},"name":{"examples":["Personal Loan"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","plan","condition"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"plan":{"nullable":true,"anyOf":[{"examples":["Secured"],"type":"string"},{"type":"null"}]},"condition":{"nullable":true,"anyOf":[{"examples":["$3,000 to $50,000"],"type":"string"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"}}}}},"availableDates":{"type":"array","items":{"type":"string"}},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/personal-loan-rates/{institutionId}":{"get":{"operationId":"getPersonalLoanRatesByInstitution","tags":["Personal Loan Rates"],"summary":"Get personal loan rates by institution","parameters":[{"name":"institutionId","in":"path","required":true,"schema":{"examples":["institution:anz","institution:asb","institution:bnz","institution:kiwibank","institution:westpac"],"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"PersonalLoanRates","type":"string"},"data":{"title":"PersonalLoanRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:asb"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:asb:personal-loan"],"type":"string"},"name":{"examples":["Personal Loan"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","plan","condition"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"plan":{"nullable":true,"anyOf":[{"examples":["Secured"],"type":"string"},{"type":"null"}]},"condition":{"nullable":true,"anyOf":[{"examples":["$3,000 to $50,000"],"type":"string"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/car-loan-rates/":{"get":{"operationId":"listCarLoanRates","tags":["Car Loan Rates"],"summary":"List car loan rates","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"CarLoanRates","type":"string"},"data":{"title":"CarLoanRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:asb"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:asb:car-loan"],"type":"string"},"name":{"examples":["Car Loan"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","plan","condition"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"plan":{"nullable":true,"anyOf":[{"examples":["Secured"],"type":"string"},{"type":"null"}]},"condition":{"nullable":true,"anyOf":[{"examples":["$3,000 to $50,000"],"type":"string"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/car-loan-rates/time-series":{"get":{"operationId":"getCarLoanRatesTimeSeries","tags":["Car Loan Rates"],"summary":"Get car loan rates time series","parameters":[{"name":"date","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date in YYYY-MM-DD format for historical data","example":"2025-03-01","type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date in YYYY-MM-DD format for time series range","example":"2025-01-01","type":"string"}},{"name":"endDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date in YYYY-MM-DD format for time series range","example":"2025-03-01","type":"string"}},{"name":"institutionId","in":"query","required":false,"schema":{"description":"Optional institution ID to filter time series data","examples":["institution:anz"],"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","timeSeries","availableDates","termsOfUse","timestamp"],"properties":{"type":{"const":"CarLoanRatesTimeSeries","type":"string"},"timeSeries":{"type":"object","patternProperties":{"^(.*)$":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated"],"properties":{"type":{"const":"CarLoanRates","type":"string"},"data":{"title":"CarLoanRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:asb"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:asb:car-loan"],"type":"string"},"name":{"examples":["Car Loan"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","plan","condition"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"plan":{"nullable":true,"anyOf":[{"examples":["Secured"],"type":"string"},{"type":"null"}]},"condition":{"nullable":true,"anyOf":[{"examples":["$3,000 to $50,000"],"type":"string"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"}}}}},"availableDates":{"type":"array","items":{"type":"string"}},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/car-loan-rates/{institutionId}":{"get":{"operationId":"getCarLoanRatesByInstitution","tags":["Car Loan Rates"],"summary":"Get car loan rates by institution","parameters":[{"name":"institutionId","in":"path","required":true,"schema":{"examples":["institution:anz","institution:asb","institution:bnz","institution:kiwibank","institution:westpac"],"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"CarLoanRates","type":"string"},"data":{"title":"CarLoanRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","products"],"properties":{"id":{"pattern":"^institution:","examples":["institution:asb"],"type":"string"},"name":{"examples":["ANZ","Kiwibank","Westpac"],"type":"string"},"products":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","rates"],"properties":{"id":{"pattern":"^product:","examples":["product:asb:car-loan"],"type":"string"},"name":{"examples":["Car Loan"],"type":"string"},"rates":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","rate","plan","condition"],"properties":{"id":{"pattern":"^rate:","examples":["rate:anz:standard:18-months"],"type":"string"},"rate":{"examples":[4.29],"type":"number"},"plan":{"nullable":true,"anyOf":[{"examples":["Secured"],"type":"string"},{"type":"null"}]},"condition":{"nullable":true,"anyOf":[{"examples":["$3,000 to $50,000"],"type":"string"},{"type":"null"}]}}}}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/credit-card-rates/":{"get":{"operationId":"listCreditCardRates","tags":["Credit Card Rates"],"summary":"List credit card rates","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"CreditCardRates","type":"string"},"data":{"title":"CreditCardRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","plans"],"properties":{"id":{"pattern":"^issuer:","examples":["issuer:anz"],"type":"string"},"name":{"examples":["Amex","Gem"],"type":"string"},"plans":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","interestFreePeriodInMonths","primaryFeeNZD","balanceTransferRate","balanceTransferPeriod","cashAdvanceRate","purchaseRate"],"properties":{"id":{"pattern":"^plan:","examples":["plan:amex:airpoint-card"],"type":"string"},"name":{"examples":["Airpoint Card"],"type":"string"},"interestFreePeriodInMonths":{"nullable":true,"anyOf":[{"examples":[55,90],"type":"number"},{"type":"null"}]},"primaryFeeNZD":{"nullable":true,"anyOf":[{"examples":[0,149],"type":"number"},{"type":"null"}]},"balanceTransferRate":{"nullable":true,"anyOf":[{"examples":[0,5.95],"type":"number"},{"type":"null"}]},"balanceTransferPeriod":{"nullable":true,"anyOf":[{"examples":["6 months"],"type":"string"},{"type":"null"}]},"cashAdvanceRate":{"nullable":true,"anyOf":[{"examples":[0,21.95],"type":"number"},{"type":"null"}]},"purchaseRate":{"nullable":true,"anyOf":[{"examples":[0,21.95],"type":"number"},{"type":"null"}]}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/credit-card-rates/time-series":{"get":{"operationId":"getCreditCardRatesTimeSeries","tags":["Credit Card Rates"],"summary":"Get credit card rates time series","parameters":[{"name":"date","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date in YYYY-MM-DD format for historical data","example":"2025-03-01","type":"string"}},{"name":"startDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start date in YYYY-MM-DD format for time series range","example":"2025-01-01","type":"string"}},{"name":"endDate","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date in YYYY-MM-DD format for time series range","example":"2025-03-01","type":"string"}},{"name":"issuerId","in":"query","required":false,"schema":{"description":"Optional issuer ID to filter time series data","examples":["issuer:anz"],"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","timeSeries","availableDates","termsOfUse","timestamp"],"properties":{"type":{"const":"CreditCardRatesTimeSeries","type":"string"},"timeSeries":{"type":"object","patternProperties":{"^(.*)$":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated"],"properties":{"type":{"const":"CreditCardRates","type":"string"},"data":{"title":"CreditCardRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","plans"],"properties":{"id":{"pattern":"^issuer:","examples":["issuer:anz"],"type":"string"},"name":{"examples":["Amex","Gem"],"type":"string"},"plans":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","interestFreePeriodInMonths","primaryFeeNZD","balanceTransferRate","balanceTransferPeriod","cashAdvanceRate","purchaseRate"],"properties":{"id":{"pattern":"^plan:","examples":["plan:amex:airpoint-card"],"type":"string"},"name":{"examples":["Airpoint Card"],"type":"string"},"interestFreePeriodInMonths":{"nullable":true,"anyOf":[{"examples":[55,90],"type":"number"},{"type":"null"}]},"primaryFeeNZD":{"nullable":true,"anyOf":[{"examples":[0,149],"type":"number"},{"type":"null"}]},"balanceTransferRate":{"nullable":true,"anyOf":[{"examples":[0,5.95],"type":"number"},{"type":"null"}]},"balanceTransferPeriod":{"nullable":true,"anyOf":[{"examples":["6 months"],"type":"string"},{"type":"null"}]},"cashAdvanceRate":{"nullable":true,"anyOf":[{"examples":[0,21.95],"type":"number"},{"type":"null"}]},"purchaseRate":{"nullable":true,"anyOf":[{"examples":[0,21.95],"type":"number"},{"type":"null"}]}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"}}}}},"availableDates":{"type":"array","items":{"type":"string"}},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/credit-card-rates/{issuerId}":{"get":{"operationId":"getCreditCardRatesByIssuer","tags":["Credit Card Rates"],"summary":"Get credit card rates by issuer","parameters":[{"name":"issuerId","in":"path","required":true,"schema":{"examples":["issuer:anz","issuer:amex","issuer:gem"],"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["type","data","lastUpdated","termsOfUse","timestamp"],"properties":{"type":{"const":"CreditCardRates","type":"string"},"data":{"title":"CreditCardRates","type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","plans"],"properties":{"id":{"pattern":"^issuer:","examples":["issuer:anz"],"type":"string"},"name":{"examples":["Amex","Gem"],"type":"string"},"plans":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["id","name","interestFreePeriodInMonths","primaryFeeNZD","balanceTransferRate","balanceTransferPeriod","cashAdvanceRate","purchaseRate"],"properties":{"id":{"pattern":"^plan:","examples":["plan:amex:airpoint-card"],"type":"string"},"name":{"examples":["Airpoint Card"],"type":"string"},"interestFreePeriodInMonths":{"nullable":true,"anyOf":[{"examples":[55,90],"type":"number"},{"type":"null"}]},"primaryFeeNZD":{"nullable":true,"anyOf":[{"examples":[0,149],"type":"number"},{"type":"null"}]},"balanceTransferRate":{"nullable":true,"anyOf":[{"examples":[0,5.95],"type":"number"},{"type":"null"}]},"balanceTransferPeriod":{"nullable":true,"anyOf":[{"examples":["6 months"],"type":"string"},{"type":"null"}]},"cashAdvanceRate":{"nullable":true,"anyOf":[{"examples":[0,21.95],"type":"number"},{"type":"null"}]},"purchaseRate":{"nullable":true,"anyOf":[{"examples":[0,21.95],"type":"number"},{"type":"null"}]}}}}}}},"lastUpdated":{"example":"2021-08-01T00:00:00.000Z","type":"string"},"termsOfUse":{"type":"string"},"timestamp":{"description":"Current server timestamp","example":"2025-03-04T02:30:00.000Z","type":"string"}}}}}},"404":{"description":"Response for status 404","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["code","message"],"properties":{"code":{"examples":[400,404,500],"type":"number"},"message":{"examples":["Internal Server Error"],"type":"string"}}}}}}}}},"/api/v1/health":{"get":{"operationId":"getHealth","tags":["Health"],"summary":"Get API data freshness","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["status","dataSets","timestamp"],"properties":{"status":{"const":"ok","type":"string"},"dataSets":{"type":"array","items":{"additionalProperties":false,"type":"object","required":["dataType","lastUpdated"],"properties":{"dataType":{"type":"string"},"lastUpdated":{"type":"string"}}}},"timestamp":{"type":"string"}}}}}},"500":{"description":"Response for status 500","content":{"application/json":{"schema":{"additionalProperties":false,"type":"object","required":["status","message","timestamp"],"properties":{"status":{"const":"error","type":"string"},"message":{"type":"string"},"timestamp":{"type":"string"}}}}}}}}}},"components":{"schemas":{}}}