{"components":{"responses":{"unauthorized":{"description":"Unauthorized"},"unprocessable_entity":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Unprocessable Entity"}},"schemas":{"Address":{"description":"Same names and meanings as Google's geoocoding API.\nhttps://developers.google.com/maps/documentation/geocoding/requests-geocoding\n","properties":{"administrative_area_level_1":{"description":"Named `Estado`","example":"CDMX","type":"string"},"interior_number":{"description":"Name `Número interior`","example":"12, Mz 1 Lt 1","type":"string"},"locality":{"description":"Can be both `Municipio` or `Delegación`","example":"Benito Juaréz, Naucalpan","type":"string"},"postal_code":{"description":"5 digits","example":"22222","pattern":"\\d{5}","type":"string"},"route":{"description":"Named `Calle`","example":"Paseo de la Reforma","type":"string"},"street_number":{"description":"Named `Número exterior`","example":"285","type":"string"},"sublocality_level_1":{"description":"Named `Colonia`","example":"Some Colonia","type":"string"}},"title":"Address","type":"object"},"GroupLifeIssueRequest":{"properties":{"address":{"$ref":"#/components/schemas/address"},"beneficiaries":{"items":{"properties":{"date_of_birth":{"$ref":"#/components/schemas/dateOfBirth"},"first_last_name":{"$ref":"#/components/schemas/firstLastName"},"first_name":{"$ref":"#/components/schemas/firstName"},"percentage":{"description":"How much of the policy's sum insured will be given to this beneficiary. The sum of this percentage across all beneficiaries should be 100%","type":"integer"},"relationship":{"description":"The relationship between the customer and this beneficiary","enum":["grandparent","domestic_partner","sibling_in_law","spouse","ex-spouse","sibling","child","parent","parent_of_my_child","step_parent","grandchild","child_in_law","cousin","partner","nibling","parent_in_law","pibling","other"],"type":"string"},"second_last_name":{"$ref":"#/components/schemas/secondLastName"},"sex_at_birth":{"$ref":"#/components/schemas/sexAtBirth"}},"required":["first_name","first_last_name","date_of_birth","relationship","percentage","sex_at_birth"],"type":"object"},"type":"array"},"date_of_birth":{"$ref":"#/components/schemas/dateOfBirth"},"email":{"$ref":"#/components/schemas/email"},"first_last_name":{"$ref":"#/components/schemas/firstLastName"},"first_name":{"$ref":"#/components/schemas/firstName"},"marital_status":{"$ref":"#/components/schemas/maritalStatus"},"mobile":{"$ref":"#/components/schemas/mobile"},"monthly_income":{"$ref":"#/components/schemas/monthlyIncome"},"profession":{"$ref":"#/components/schemas/profession"},"rfc":{"$ref":"#/components/schemas/rfc"},"second_last_name":{"$ref":"#/components/schemas/secondLastName"},"sex_at_birth":{"$ref":"#/components/schemas/sexAtBirth"},"underwriting":{"description":"Any questions the customer has to answer so the policy's risk can be determined","properties":{"has_covid_symptoms":{"type":"boolean"}},"required":["has_covid_symptoms"],"type":"object"}},"required":["underwriting","date_of_birth","email","first_name","first_last_name","rfc","marital_status","monthly_income","profession","sex_at_birth","mobile","address","beneficiaries"],"title":"GroupLifeIssueRequest","type":"object"},"GroupLifeQuote":{"properties":{"coverages":{"$ref":"#/components/schemas/coverages"},"id":{"$ref":"#/components/schemas/quoteId"},"monthly_premium":{"$ref":"#/components/schemas/monthlyPremium"},"product":{"enum":["group_life"],"type":"string"},"term_years":{"$ref":"#/components/schemas/termYears"}},"title":"GroupLifeQuote"},"GroupLifeQuoteRequest":{"properties":{"age":{"description":"The customer's age","example":55,"type":"integer"}},"required":["age"],"title":"GroupLifeQuoteRequest","type":"object"},"LifeQuote":{"properties":{"annual_premium":{"$ref":"#/components/schemas/annualPremium"},"coverages":{"$ref":"#/components/schemas/coverages"},"id":{"$ref":"#/components/schemas/quoteId"},"link":{"description":"Link to buy the insurance with this specific quote and any data that\nwas sent already prefilled in the application\n","example":"/studio/prefill?token=asdjoj1209jdokasjd...","format":"uri","type":"string"},"monthly_premium":{"$ref":"#/components/schemas/monthlyPremium"},"plan_type":{"$ref":"#/components/schemas/planType"},"product":{"enum":["life"],"type":"string"},"term_years":{"$ref":"#/components/schemas/termYears"}},"title":"LifeQuote"},"LifeQuoteRequest":{"properties":{"address":{"$ref":"#/components/schemas/address"},"date_of_birth":{"$ref":"#/components/schemas/dateOfBirth"},"email":{"$ref":"#/components/schemas/email"},"first_last_name":{"$ref":"#/components/schemas/firstLastName"},"first_name":{"$ref":"#/components/schemas/firstName"},"height":{"description":"in cms","example":"170","type":"integer"},"marital_status":{"$ref":"#/components/schemas/maritalStatus"},"mobile":{"$ref":"#/components/schemas/mobile"},"monthly_income":{"$ref":"#/components/schemas/monthlyIncome"},"nationality":{"enum":["mexican","other"],"type":"string"},"plan_type":{"$ref":"#/components/schemas/planType"},"profession":{"$ref":"#/components/schemas/profession"},"rfc":{"$ref":"#/components/schemas/rfc"},"second_last_name":{"$ref":"#/components/schemas/secondLastName"},"sex_at_birth":{"$ref":"#/components/schemas/sexAtBirth"},"smoker":{"default":false,"description":"Affects the quotes that are returned","type":"boolean"},"weight":{"description":"in kgs","example":"80","type":"integer"}},"required":["date_of_birth","sex_at_birth"],"title":"LifeQuoteRequest","type":"object"},"Policy":{"properties":{"date_of_birth":{"$ref":"#/components/schemas/dateOfBirth"},"documents":{"items":{"properties":{"type":{"enum":["policy","policy_application"],"type":"string"},"url":{"example":"/api/v2/documents/135","type":"uri"}},"type":"object"},"type":"array"},"effective_date":{"description":"When the customer's coverage starts - i.e. they can request a claim if something happens","example":"2023-05-16","format":"date","type":"string"},"email":{"$ref":"#/components/schemas/email"},"expiration_date":{"description":"When the customer's coverage ends - i.e. they can no longer use the insurance","example":"2024-05-16","format":"date","type":"string"},"first_last_name":{"$ref":"#/components/schemas/firstLastName"},"first_name":{"$ref":"#/components/schemas/firstName"},"id":{"description":"Unique identifier that can be used to get a policy via `GET /api/v2/policies/{id}`","example":1,"type":"integer"},"master_policy_id":{"description":"The ID of the master policy in the insurance carrier's system. Customers will need this information to request a claim","example":"neobank_1","type":"string"},"policy_id":{"description":"This individual policy's ID in the insurance carrier's system. Customers will need this information to request a claim","example":"neobank_group_life_cert_000001","type":"string"},"premium":{"example":24.9,"type":"number"},"product":{"enum":["group_life"],"type":"string"},"rfc":{"$ref":"#/components/schemas/rfc"},"second_last_name":{"$ref":"#/components/schemas/secondLastName"},"status":{"enum":["pending","issued","in_force","cancelled","rescinded","expired","declined","voided"],"example":"issued","type":"string"}},"title":"Policy","type":"object"},"Quotes":{"properties":{"quotes":{"items":{"oneOf":[{"$ref":"#/components/schemas/LifeQuote"},{"$ref":"#/components/schemas/GroupLifeQuote"}]},"type":"array"}},"title":"Quotes","type":"object"},"Underwriting":{"properties":{"underwriting":{"properties":{"result":{"enum":["pass","fail"],"example":"fail","type":"string"},"rules":{"items":{"properties":{"description":{"example":"The user has COVID symptoms","type":"string"},"name":{"example":"Covid","type":"string"},"result":{"enum":["pass","fail"],"example":"fail","type":"string"}},"type":"object"},"type":"array"}}}},"type":"object"},"ValidationError":{"properties":{"errors":{"items":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"example":{"date_of_birth":["can't be blank"],"marital_status":["is invalid; accepted values: married, divorced, single, civil_union, widowed"],"nationality":["is invalid; accepted values: mexican, other"],"sex_at_birth":["can't be blank"]},"type":"object"},"type":"array"}},"type":"object"},"address":{"description":"Same names and meanings as Google's geoocoding API.\nhttps://developers.google.com/maps/documentation/geocoding/requests-geocoding\n","properties":{"administrative_area_level_1":{"description":"Named `Estado`","example":"CDMX","type":"string"},"interior_number":{"description":"Name `Número interior`","example":"12, Mz 1 Lt 1","type":"string"},"locality":{"description":"Can be both `Municipio` or `Delegación`","example":"Benito Juaréz, Naucalpan","type":"string"},"postal_code":{"description":"5 digits","example":"22222","pattern":"\\d{5}","type":"string"},"route":{"description":"Named `Calle`","example":"Paseo de la Reforma","type":"string"},"street_number":{"description":"Named `Número exterior`","example":"285","type":"string"},"sublocality_level_1":{"description":"Named `Colonia`","example":"Some Colonia","type":"string"}},"title":"Address","type":"object"},"annualPremium":{"description":"How much the customer will pay for this insurance, in case they choose to pay it on an annual basis","example":650.11,"type":"number"},"coverages":{"additionalProperties":{"type":"integer"},"description":"A map containing the coverages inclued in this quote. The key is the coverage's name, and the value is the sum insured selected","example":{"life":250000},"type":"object"},"dateOfBirth":{"description":"ISO8601 date format","example":"2000-01-01","format":"date","type":"string"},"email":{"format":"email","type":"string"},"firstLastName":{"description":"Usually the paternal name","example":"Doe","type":"string"},"firstName":{"description":"Given name","example":"Juan, Julia","type":"string"},"maritalStatus":{"enum":["married","divorced","single","civil_union","widowed"],"type":"string"},"mobile":{"description":"E.164 mexican formatted number, has a plus sign and 13 digits","example":"+5212222222222","pattern":"^\\+\\d{13}$","type":"string"},"monthlyIncome":{"description":"It can be used to filter quotes that are suitable for this income and to determine risk","example":3000,"type":"integer"},"monthlyPremium":{"description":"How much the customer will pay for this inurance, in case they pay on a monthly basis","example":50.15,"type":"number"},"planType":{"description":"Type of insurance.\n\n* `return_of_premium`: A plan that returns a percentage of the paid premium at the end of the insurance term\n* `term`: A plan for an insurance on a fixed term\n","enum":["return_of_premium","term"],"type":"string"},"profession":{"example":"Ejecutivo de ventas","type":"string"},"quoteId":{"description":"Unique ID that represents a single quote (coverages, prices and insured data). Can be used to issue a policy","format":"uuid","type":"string"},"rfc":{"description":"Mexican tax id for individuals, has 4 letters followed by 6 digits and another 3 chars","example":"SIMA971112UVA","pattern":"^\\D{4}\\d{6}\\S{3}$","type":"string"},"secondLastName":{"description":"Usually the maternal name","example":"Dae","type":"string"},"sexAtBirth":{"description":"It can be used to filter quotes","enum":["male","female"],"type":"string"},"termYears":{"description":"The quantity of years this insurance will be valid for","example":1,"type":"integer"}},"securitySchemes":{"apiKey":{"in":"header","name":"X-Api-Key","type":"apiKey"}}},"info":{"title":"Super Seguros","version":"2.0"},"openapi":"3.0.0","paths":{"/api/v2/documents/{id}":{"get":{"callbacks":{},"operationId":"BobbyWeb.Api.V2.DocumentController.show","parameters":[{"description":"","example":1,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"Success"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"summary":"Renders a PDF document by ID","tags":[]}},"/api/v2/policies/{id}":{"get":{"callbacks":{},"operationId":"BobbyWeb.Api.V2.PolicyController.show","parameters":[{"description":"","example":1,"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Policy"}},"type":"object"}}},"description":"Success"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"summary":"Get policy by its ID","tags":[]}},"/api/v2/{product}/quotes":{"post":{"callbacks":{},"operationId":"BobbyWeb.Api.V2.QuoteController.index","parameters":[{"description":"","example":"life","in":"path","name":"product","required":true,"schema":{"enum":["life","group_life"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LifeQuoteRequest"},{"$ref":"#/components/schemas/GroupLifeQuoteRequest"}]}}},"description":"Request Body","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Quotes"}},"type":"object"}}},"description":"Success"},"401":{"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Unprocessable Entity"}},"summary":"Get a list of quotes for a customer","tags":[]}},"/api/v2/{quote_id}/issue":{"post":{"callbacks":{},"operationId":"BobbyWeb.Api.V2.IssueController.create","parameters":[{"description":"","in":"path","name":"quote_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupLifeIssueRequest"}}},"description":"Request Body","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Policy"}},"type":"object"}}},"description":"Success"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"422":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/Underwriting"}]}}},"description":"Unprocessable entity (validation errors and/or underwriting)"}},"summary":"Issue a policy for a given quote","tags":[]}}},"security":[{"apiKey":[]}],"servers":[{"url":"https://sandbox.super.mx","variables":{}},{"description":"Production","url":"https://app.super.mx","variables":{}}],"tags":[]}