{"openapi":"3.1.0","info":{"title":"mylife.ie quote API","version":"1.0.0","description":"Indicative prices for life insurance and mortgage protection from the Irish insurers on the mylife.ie panel, for people living in Ireland. Use it when a person in Ireland asks what life cover or mortgage protection would cost, or which insurer is cheapest. Every quote returns a link the person uses to see the quote and apply on mylife.ie. Nothing is bought through the API.","contact":{"name":"mylife.ie","url":"https://www.mylife.ie/agents"}},"servers":[{"url":"https://www.mylife.ie/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional partner key for higher limits. No key is needed."}},"schemas":{"Life":{"type":"object","additionalProperties":false,"description":"One person to be covered. Send dob if known; send age only if the date of birth is not known.","required":["smoker"],"properties":{"dob":{"description":"Date of birth. Either an ISO date string YYYY-MM-DD, or an object with day, month and year numbers. Preferred over age.","oneOf":[{"type":"string","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","examples":["1990-01-31"]},{"type":"object","additionalProperties":false,"required":["day","month","year"],"properties":{"day":{"type":"integer","minimum":1,"maximum":31},"month":{"type":"integer","minimum":1,"maximum":12},"year":{"type":"integer","minimum":1900}}}]},"age":{"type":"integer","minimum":18,"maximum":74,"description":"Age in whole years, used only when dob is not sent. The price is then estimated (premiumBasis \"estimated_from_age\") and the person must give their exact date of birth before applying. Ages 18 to 74 can be quoted."},"smoker":{"description":"Whether the person has smoked or used nicotine products. true or false; \"yes\" and \"no\" are also accepted.","oneOf":[{"type":"boolean"},{"type":"string","enum":["yes","no","true","false"]}]}}},"QuoteRequest":{"type":"object","additionalProperties":false,"description":"A quote request. Unknown fields are refused with a 400. Health, occupation, name and contact details are never needed and never accepted.","required":["product","sumAssured","termYears","lives"],"properties":{"product":{"type":"string","enum":["mortgage_protection","life_term"],"description":"mortgage_protection: cover that falls over the term to match a repayment mortgage. life_term: level term life cover, a fixed amount for the whole term."},"cover":{"type":"string","enum":["single","joint","dual"],"description":"single: one person. joint: two people, pays once on the first death. dual: two people, each covered separately, can pay twice. Defaults to single when one life is sent; required when two are sent."},"sumAssured":{"description":"Amount of cover in euro. For mortgage protection, the amount owed on the mortgage. Currency symbols and commas are accepted. 10000 to 10000000.","oneOf":[{"type":"integer","minimum":10000,"maximum":10000000},{"type":"string","examples":["€250,000"]}]},"termYears":{"type":"integer","minimum":5,"maximum":40,"description":"Length of cover in whole years. For mortgage protection, the remaining mortgage term. 5 to 40. Age at the end of the term cannot be above 85."},"convertible":{"type":"boolean","default":false,"description":"Quote with the conversion option: the right to take new cover later without new health questions. Costs more. Insurers that do not price it are listed in notQuoted."},"indexation":{"type":"boolean","default":false,"description":"life_term only: cover and premium rise each year. Not accepted for mortgage_protection, which is always quoted without indexation."},"lives":{"type":"array","minItems":1,"maxItems":2,"items":{"$ref":"#/components/schemas/Life"},"description":"One person for single cover, two for joint or dual."}},"examples":[{"product":"mortgage_protection","cover":"single","sumAssured":250000,"termYears":25,"convertible":false,"lives":[{"dob":"1990-01-31","smoker":false}]}]},"QuoteRow":{"type":"object","properties":{"insurer":{"type":"string","enum":["Aviva","Irish Life","New Ireland","Royal London","Zurich Life"],"description":"The insurer."},"productName":{"type":"string","description":"Descriptive product name."},"monthlyPremium":{"type":"number","description":"What the person would pay each month, as shown on mylife.ie, including any Price Pledge match. EUR.","examples":[0]},"insurerPremium":{"type":"number","description":"The insurer's own monthly premium before any Price Pledge match. EUR.","examples":[0]},"convertible":{"type":"boolean","description":"True when this price includes the conversion option."}},"required":["insurer","productName","monthlyPremium","insurerPremium","convertible"]},"QuoteResponse":{"type":"object","description":"Indicative prices. Show the disclosures and give the person shortUrl.","properties":{"quoteId":{"type":"string","description":"Identifier for this quote. Use it with /quotes/{quoteId}/details."},"generatedAt":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time","description":"After this time, quote again."},"currency":{"type":"string","const":"EUR"},"premiumFrequency":{"type":"string","const":"monthly"},"premiumBasis":{"type":"string","enum":["date_of_birth","estimated_from_age"],"description":"estimated_from_age when any life was sent as an age. Ask for the exact date of birth before applying."},"request":{"type":"object","description":"The request as understood, after normalisation. Dates are ISO; dobSource says whether a date came from dob or age."},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/QuoteRow"},"description":"One row per insurer that priced the request, cheapest first."},"ranking":{"type":"string","const":"price_ascending"},"notQuoted":{"type":"array","description":"Panel insurers with no price, and why.","items":{"type":"object","properties":{"insurer":{"type":"string"},"reasonCode":{"type":"string","enum":["no_price_returned","ineligible","below_minimum","no_convertible_price","timeout","source_unavailable"]},"reason":{"type":"string"}}}},"shortUrl":{"type":"string","format":"uri","description":"Give this link to the person. It shows this quote on mylife.ie, where they can apply."},"applyUrl":{"type":"string","format":"uri","description":"One link for the person to apply on mylife.ie. No insurer is chosen in advance: the person chooses after a fresh quote there."},"provider":{"type":"object","description":"Who is quoting and how they are regulated."},"disclosures":{"type":"array","items":{"type":"string"},"description":"Show these to the person with the prices."},"nextStep":{"type":"string","description":"What to tell the person to do next."},"termsOfBusinessUrl":{"type":"string","format":"uri","description":"The mylife.ie Terms of Business the quote is given under. The person accepts them on mylife.ie before applying."}}},"Error":{"type":"object","description":"Every error has this shape.","required":["error","message","errors","suggestedRequest","retryable"],"properties":{"error":{"type":"string","description":"Machine code: validation_failed, not_quotable, rate_limited, access_blocked, invalid_api_key, door_disabled, feed_unavailable, not_found, method_not_allowed, invalid_json, invalid_body, body_too_large, internal_error."},"message":{"type":"string","description":"Plain English summary."},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The field, e.g. termYears or lives[0].dob."},"code":{"type":"string","description":"required, invalid_value, out_of_range, unknown_field, not_allowed, second_life_required, too_many_lives, age_ineligible, age_plus_term, term_not_offered."},"message":{"type":"string"},"allowed":{"type":"object","description":"What would be accepted: min and max, allowed values, or allowed fields."}}}},"suggestedRequest":{"type":["object","null"],"description":"A corrected request to try, when one can be made. Never invents a date of birth."},"retryable":{"type":"boolean","description":"True when the same request may succeed later. See the Retry-After header."}}}}},"security":[{},{"bearer":[]}],"paths":{"/quotes":{"post":{"operationId":"createQuote","summary":"Get prices (JSON body)","description":"Get monthly prices from every insurer on the panel for one request. Prices are indicative and subject to underwriting. Give the person shortUrl so they can see the quote and apply on mylife.ie.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"Prices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Bad or unknown fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Valid, but cannot be quoted online (age, term, or no insurer priced it).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prices or the service are unavailable. retryable is true; see Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"getQuote","summary":"Get prices (query parameters)","description":"Get monthly prices from every insurer on the panel for one request. Prices are indicative and subject to underwriting. Give the person shortUrl so they can see the quote and apply on mylife.ie. Same as POST, with flat parameters.","parameters":[{"name":"product","in":"query","required":true,"description":"mortgage_protection or life_term.","schema":{"type":"string"}},{"name":"cover","in":"query","required":false,"description":"single, joint or dual.","schema":{"type":"string"}},{"name":"sumAssured","in":"query","required":true,"description":"Euro, 10000 to 10000000.","schema":{"type":"string"}},{"name":"termYears","in":"query","required":true,"description":"Years, 5 to 40.","schema":{"type":"string"}},{"name":"convertible","in":"query","required":false,"description":"true or false.","schema":{"type":"string"}},{"name":"indexation","in":"query","required":false,"description":"life_term only. true or false.","schema":{"type":"string"}},{"name":"life1Dob","in":"query","required":false,"description":"Person 1 date of birth, YYYY-MM-DD.","schema":{"type":"string"}},{"name":"life1DobDay","in":"query","required":false,"description":"Person 1 day of birth (with month and year, instead of life1Dob).","schema":{"type":"string"}},{"name":"life1DobMonth","in":"query","required":false,"description":"Person 1 month of birth.","schema":{"type":"string"}},{"name":"life1DobYear","in":"query","required":false,"description":"Person 1 year of birth.","schema":{"type":"string"}},{"name":"life1Age","in":"query","required":false,"description":"Person 1 age, only if the date of birth is not known.","schema":{"type":"string"}},{"name":"life1Smoker","in":"query","required":true,"description":"Person 1: true or false.","schema":{"type":"string"}},{"name":"life2Dob","in":"query","required":false,"description":"Person 2 date of birth, YYYY-MM-DD.","schema":{"type":"string"}},{"name":"life2DobDay","in":"query","required":false,"description":"Person 2 day of birth (with month and year, instead of life2Dob).","schema":{"type":"string"}},{"name":"life2DobMonth","in":"query","required":false,"description":"Person 2 month of birth.","schema":{"type":"string"}},{"name":"life2DobYear","in":"query","required":false,"description":"Person 2 year of birth.","schema":{"type":"string"}},{"name":"life2Age","in":"query","required":false,"description":"Person 2 age, only if the date of birth is not known.","schema":{"type":"string"}},{"name":"life2Smoker","in":"query","required":false,"description":"Person 2: true or false.","schema":{"type":"string"}}],"responses":{"200":{"description":"Prices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Bad or unknown fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Valid, but cannot be quoted online (age, term, or no insurer priced it).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prices or the service are unavailable. retryable is true; see Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quotes/{quoteId}/details":{"get":{"operationId":"getQuoteDetails","summary":"Insurer details for a quote","description":"Get what we hold about each insurer on a quote: online underwriting, the conversion option, limits and documents.","parameters":[{"name":"quoteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"insurer","in":"query","required":false,"description":"One insurer only.","schema":{"type":"string","enum":["Aviva","Irish Life","New Ireland","Royal London","Zurich Life"]}}],"responses":{"200":{"description":"Details."},"404":{"description":"Unknown or expired quoteId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prices or the service are unavailable. retryable is true; see Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"operationId":"getProducts","summary":"Products, limits and panel","description":"List the products, the accepted limits, the insurer panel and the regulatory status. Call this first to check what can be quoted.","responses":{"200":{"description":"Catalogue."},"429":{"description":"Too many requests. Wait for Retry-After seconds.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Prices or the service are unavailable. retryable is true; see Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/guides":{"get":{"operationId":"listGuides","summary":"Guides","description":"Plain explanations of cover types: life cover or mortgage protection, joint or dual life, the conversion option.","responses":{"200":{"description":"Guide list."}}}},"/guides/{slug}":{"get":{"operationId":"getGuide","summary":"One guide","description":"Plain explanations of cover types: life cover or mortgage protection, joint or dual life, the conversion option.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","enum":["life-cover-vs-mortgage-protection","joint-vs-dual","convertible"]}}],"responses":{"200":{"description":"Guide."},"404":{"description":"Unknown guide.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"operationId":"getHealth","summary":"Service status","description":"Whether the quote service is up.","responses":{"200":{"description":"Status."}}}}}}