{"openapi":"3.0.0","paths":{"/api/v1/staff/claims/{id}/approve":{"post":{"operationId":"ApprovalController_approve","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"A UUID you generate once per attempt. Repeating it returns the first answer.","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","description":"The advance version you read, from the `ETag`.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The approved advance, with its new version in `ETag`.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"`ALREADY_APPROVED`, `VERSION_CONFLICT`, or `INVALID_STATE` (the claim is not ready for review, or a check is pending).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"`INPUTS_MISSING` (policy, valuation, or inputs), or a malformed `Idempotency-Key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"428":{"description":"The If-Match header is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Approve the priced claim: freeze the advance, send the offer. No body.","tags":["staff"]}},"/api/v1/staff/claims/{id}/reject":{"post":{"operationId":"ApprovalController_reject","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"]}}}},"responses":{"200":{"description":"The claim is rejected and a neutral notice is recorded.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"rejected"},"reason":{"type":"string"},"rejectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","reason","rejectedAt"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The claim is not in a status that can be rejected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The reason is missing, empty, or too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Reject a claim that is under review, held, or declined by the rules","tags":["staff"]}},"/api/v1/staff/pricing/preview":{"post":{"operationId":"PricingController_preview","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claimId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"type":"string"},"inputs":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"],"additionalProperties":false}},"required":["claimId","inputs"]}}}},"responses":{"200":{"description":"The calculation.","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The claim is not ready for review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A value is out of range, or the valuation cannot be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Calculate the chain for a choice and inputs without saving anything","tags":["staff"]}},"/api/v1/staff/claims/{id}/valuation":{"put":{"operationId":"PricingController_saveValuation","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID.","schema":{"type":"string"}},{"name":"If-Match","in":"header","description":"The version of the advance you read, as the `ETag` of the detail or of the last write.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"type":"string"}}}}}},"responses":{"200":{"description":"The advance, with its version in the `ETag` header.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The version is stale, the advance is approved, or the claim is not ready for review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Both or neither of `valuationId` and `manualValue` was sent, the comparable is not this claim's, there is no declared value to use, or the manual value is malformed, out of range, or leaves no advance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"428":{"description":"The If-Match header is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Choose the commercial value: a comparable, the declared value of the policy, or an amount entered by hand","tags":["staff"]}},"/api/v1/staff/claims/{id}/pricing":{"put":{"operationId":"PricingController_savePricing","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID.","schema":{"type":"string"}},{"name":"If-Match","in":"header","description":"The version of the advance you read, as the `ETag` of the detail or of the last write.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"],"additionalProperties":false}}}},"responses":{"200":{"description":"The advance, with its version in the `ETag` header.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The version is stale, the advance is approved, or the claim is not ready for review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A value is out of range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"428":{"description":"The If-Match header is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Save the adjustment rate, the advance percent, and the expected days","tags":["staff"]}},"/api/v1/staff/settings":{"get":{"operationId":"SettingsController_read","parameters":[],"responses":{"200":{"description":"Every saved setting after the change.","content":{"application/json":{"schema":{"type":"object","properties":{"general":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"required":["monthlyRate","expectedDays","adjustmentRate","maxVehicleAge","minSpread","maxAccidentYears","openWhatsappWebOnSend"],"additionalProperties":false},"insurers":{"type":"array","items":{"type":"object","properties":{"insurerId":{"type":"string","enum":["qualitas","gnp","axa","hdi","chubb","mapfre","zurich","banorte","inbursa","atlas","afirme","ana","allianz","bbva","general-de-seguros","latino","aba","el-potosi"]},"override":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}},"required":["insurerId","override"]}}},"required":["general","insurers"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Read the general settings and the insurers that change any","tags":["staff"]}},"/api/v1/staff/settings/history":{"get":{"operationId":"SettingsController_history","parameters":[{"name":"limit","required":false,"in":"query","description":"1 to 50, default 10.","schema":{}},{"name":"scope","required":false,"in":"query","description":"`general` or an insurer id. Every scope when absent.","schema":{}}],"responses":{"200":{"description":"The changes.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scope":{"type":"string"},"values":{"anyOf":[{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","scope","values","actor","createdAt"]}}},"required":["items"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The scope or the limit is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"The recorded saves and clears of the settings, newest first","tags":["staff"]}},"/api/v1/staff/settings/general":{"put":{"operationId":"SettingsController_saveGeneral","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"required":["monthlyRate","expectedDays","adjustmentRate","maxVehicleAge","minSpread","maxAccidentYears","openWhatsappWebOnSend"],"additionalProperties":false}}}},"responses":{"200":{"description":"Every saved setting after the change.","content":{"application/json":{"schema":{"type":"object","properties":{"general":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"required":["monthlyRate","expectedDays","adjustmentRate","maxVehicleAge","minSpread","maxAccidentYears","openWhatsappWebOnSend"],"additionalProperties":false},"insurers":{"type":"array","items":{"type":"object","properties":{"insurerId":{"type":"string","enum":["qualitas","gnp","axa","hdi","chubb","mapfre","zurich","banorte","inbursa","atlas","afirme","ana","allianz","bbva","general-de-seguros","latino","aba","el-potosi"]},"override":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}},"required":["insurerId","override"]}}},"required":["general","insurers"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A value is malformed or out of range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Save the general settings","tags":["staff"]},"delete":{"operationId":"SettingsController_clearGeneral","parameters":[],"responses":{"200":{"description":"Every saved setting after the change.","content":{"application/json":{"schema":{"type":"object","properties":{"general":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"required":["monthlyRate","expectedDays","adjustmentRate","maxVehicleAge","minSpread","maxAccidentYears","openWhatsappWebOnSend"],"additionalProperties":false},"insurers":{"type":"array","items":{"type":"object","properties":{"insurerId":{"type":"string","enum":["qualitas","gnp","axa","hdi","chubb","mapfre","zurich","banorte","inbursa","atlas","afirme","ana","allianz","bbva","general-de-seguros","latino","aba","el-potosi"]},"override":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}},"required":["insurerId","override"]}}},"required":["general","insurers"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Reset the general settings to the environment defaults","tags":["staff"]}},"/api/v1/staff/settings/insurers/{insurerId}":{"put":{"operationId":"SettingsController_saveOverride","parameters":[{"name":"insurerId","required":true,"in":"path","description":"An insurer id from the catalogue, such as `qualitas`.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}}}},"responses":{"200":{"description":"Every saved setting after the change.","content":{"application/json":{"schema":{"type":"object","properties":{"general":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"required":["monthlyRate","expectedDays","adjustmentRate","maxVehicleAge","minSpread","maxAccidentYears","openWhatsappWebOnSend"],"additionalProperties":false},"insurers":{"type":"array","items":{"type":"object","properties":{"insurerId":{"type":"string","enum":["qualitas","gnp","axa","hdi","chubb","mapfre","zurich","banorte","inbursa","atlas","afirme","ana","allianz","bbva","general-de-seguros","latino","aba","el-potosi"]},"override":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}},"required":["insurerId","override"]}}},"required":["general","insurers"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The insurer is not in the catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A value is malformed or out of range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Replace an insurer's override; an empty body removes it","tags":["staff"]},"delete":{"operationId":"SettingsController_clearOverride","parameters":[{"name":"insurerId","required":true,"in":"path","description":"An insurer id from the catalogue, such as `qualitas`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Every saved setting after the change.","content":{"application/json":{"schema":{"type":"object","properties":{"general":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openWhatsappWebOnSend":{"type":"boolean"}},"required":["monthlyRate","expectedDays","adjustmentRate","maxVehicleAge","minSpread","maxAccidentYears","openWhatsappWebOnSend"],"additionalProperties":false},"insurers":{"type":"array","items":{"type":"object","properties":{"insurerId":{"type":"string","enum":["qualitas","gnp","axa","hdi","chubb","mapfre","zurich","banorte","inbursa","atlas","afirme","ana","allianz","bbva","general-de-seguros","latino","aba","el-potosi"]},"override":{"type":"object","properties":{"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"maxVehicleAge":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}},"required":["insurerId","override"]}}},"required":["general","insurers"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"The insurer is not in the catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Remove an insurer's override","tags":["staff"]}},"/api/v1/offers/{publicId}":{"get":{"operationId":"OffersController_ver","parameters":[{"name":"publicId","required":true,"in":"path","description":"The claim's public identifier, from the link in the message. Never the folio.","schema":{"type":"string"}}],"responses":{"200":{"description":"The offer and where it stands.","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"amountCentavos":{"type":"integer","minimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"firstName":{"type":"string","minLength":1},"vehicle":{"type":"string","minLength":1},"insurer":{"type":"string","minLength":1},"lossType":{"type":"string","enum":["robo_total","danos"]}},"required":["state","amountCentavos","validUntil","expectedDays","firstName","vehicle","insurer","lossType"],"additionalProperties":false}}}},"404":{"description":"No such offer. An unknown identifier, a malformed one, and an offer that was never sent all answer the same."}},"summary":"See the pre-offer","tags":["offers"]}},"/api/v1/offers/{publicId}/accept":{"post":{"operationId":"OffersController_aceptar","parameters":[{"name":"publicId","required":true,"in":"path","description":"The claim's public identifier, from the link in the message. Never the folio.","schema":{"type":"string"}}],"responses":{"200":{"description":"Accepted. Carries the folio and the contact details the claimant gave.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"accepted"},"folio":{"type":"string","pattern":"^CGR-\\d{2}-\\d{4,}$"},"phone":{"type":"string","pattern":"^\\d{10}$"},"email":{"type":"string","minLength":3}},"required":["state","folio","phone","email"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["declined","expired","open"]}},"required":["state"],"additionalProperties":false}]}}}},"404":{"description":"No such offer. An unknown identifier, a malformed one, and an offer that was never sent all answer the same."},"409":{"description":"The offer was declined (the body names the decision) or has expired."}},"summary":"Accept the pre-offer. The first answer wins; the same answer again is a success.","tags":["offers"]}},"/api/v1/offers/{publicId}/decline":{"post":{"operationId":"OffersController_rechazar","parameters":[{"name":"publicId","required":true,"in":"path","description":"The claim's public identifier, from the link in the message. Never the folio.","schema":{"type":"string"}}],"responses":{"200":{"description":"Declined.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","const":"accepted"},"folio":{"type":"string","pattern":"^CGR-\\d{2}-\\d{4,}$"},"phone":{"type":"string","pattern":"^\\d{10}$"},"email":{"type":"string","minLength":3}},"required":["state","folio","phone","email"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["declined","expired","open"]}},"required":["state"],"additionalProperties":false}]}}}},"404":{"description":"No such offer. An unknown identifier, a malformed one, and an offer that was never sent all answer the same."},"409":{"description":"The offer was accepted (the body names the decision) or has expired."}},"summary":"Decline the pre-offer. The first answer wins; the same answer again is a success.","tags":["offers"]}},"/api/v1/intake/claims":{"post":{"operationId":"ClaimsController_submit","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["claim","policy"],"properties":{"claim":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string"},"accidentState":{"type":"string","enum":["AGU","BCN","BCS","CAM","CHP","CHH","CMX","COA","COL","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]},"accidentMunicipality":{"type":"string"},"plateState":{"type":"string","enum":["AGU","BCN","BCS","CAM","CHP","CHH","CMX","COA","COL","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]},"insurerReportConfirmed":{"type":"boolean","const":true},"policeReportConfirmed":{"type":"boolean"},"fullName":{"type":"string"},"curp":{"type":"string"},"rfcHomoclave":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"privacyConsent":{"type":"boolean","const":true},"policy":{"type":"object","properties":{"insurer":{"type":"string","minLength":1},"policyNumber":{"type":"string","minLength":1},"make":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"year":{"type":"integer","minimum":1950,"maximum":2027},"version":{"type":"string","minLength":1},"vin":{"type":"string"},"plate":{"type":"string","minLength":1},"declaredValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"deductibleRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["insurer","policyNumber","make","model","year","vin","declaredValue"]}},"required":["lossType","accidentDate","accidentState","plateState","insurerReportConfirmed","fullName","curp","email","phone","privacyConsent"],"description":"The claim, sent as a JSON string."},"policy":{"type":"string","format":"binary","description":"The policy, a PDF or a JPEG of at most 10 MB. The type is read from the content."}}}}}},"responses":{"201":{"description":"The claim was stored.","content":{"application/json":{"schema":{"type":"object","properties":{"publicId":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$"},"folio":{"type":"string","pattern":"^CGR-\\d{2}-\\d{4,}$"},"status":{"type":"string","const":"submitted"}},"required":["publicId","folio","status"]}}}},"400":{"description":"The claim part is not valid JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"The policy file is over 10 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A field failed its rule, or the file is missing or not a PDF or JPEG.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Submit a claim with its policy file","tags":["intake"]}},"/api/v1/webhooks/verifications":{"post":{"operationId":"VerificationWebhookController_receive","parameters":[{"name":"X-Albbus-Event-Id","in":"header","description":"The id of the notice. The same in every retry.","schema":{"type":"string"}},{"name":"X-Albbus-Timestamp","in":"header","description":"Seconds since 1970. Notices more than five minutes off are not applied.","schema":{"type":"string"}},{"name":"X-Albbus-Signature","in":"header","description":"`sha256=` and the hex HMAC-SHA256 of \"<timestamp>.<raw body>\".","schema":{"type":"string"}}],"responses":{"200":{"description":"The notice was received. It may have been applied, a repeat, or one that was not authentic or not about anything we know of."}},"summary":"Receive a signed notice from the verification service. Always answers 200.","tags":["webhooks"]}},"/api/v1/staff/claims":{"get":{"operationId":"StaffClaimsController_list","parameters":[{"name":"direction","required":false,"in":"query","description":"Default `desc`.","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Default `received`.","schema":{"enum":["received","folio","client"],"type":"string"}},{"name":"followUp","required":false,"in":"query","description":"Repeat the key for several.","schema":{"type":"array","items":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]}}},{"name":"folio","required":false,"in":"query","description":"One folio, exactly.","schema":{}},{"name":"q","required":false,"in":"query","description":"Text in the claimant's name, the folio, or the VIN, ignoring case. Up to 100 characters.","schema":{}},{"name":"bucket","required":false,"in":"query","description":"Claims with a result in this bucket. Combine with `check`.","schema":{"enum":["decline","cannot_deliver","anomaly","note"],"type":"string"}},{"name":"check","required":false,"in":"query","description":"Claims with a result for this check. Combine with `bucket`.","schema":{"enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"],"type":"string"}},{"name":"outcome","required":false,"in":"query","description":"What verification decided. `pending` includes claims that have not started.","schema":{"enum":["pending","decline","cannot_deliver","anomaly","note","clean"],"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"],"type":"string"}},{"name":"offset","required":false,"in":"query","description":"How many claims to skip. Default 0.","schema":{}},{"name":"limit","required":false,"in":"query","description":"1 to 500, default 25.","schema":{}}],"responses":{"200":{"description":"A page of claims.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"fullName":{"type":"string"},"curpMasked":{"type":"string"},"hasPolicy":{"type":"boolean"},"insurer":{"type":["string","null"]},"vehicle":{"type":["string","null"]},"advanceAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]},"hasPendingChecks":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","folio","status","followUp","lossType","accidentDate","fullName","curpMasked","hasPolicy","insurer","vehicle","advanceAmount","outcome","decision","hasPendingChecks","createdAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"outcome":{"type":"object","propertyNames":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["pending","decline","cannot_deliver","anomaly","note","clean"]},"followUp":{"type":"object","propertyNames":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["to-review","waiting-client","sent","rejected"]}},"required":["outcome","followUp"]}},"required":["items","total","limit","offset","counts"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A query value is out of range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"List claims with filters, a search, and an order, and count them by outcome and follow-up","tags":["staff"]}},"/api/v1/staff/claims/{id}":{"get":{"operationId":"StaffClaimsController_detail","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID. Not the public identifier and not the folio.","schema":{"type":"string"}}],"responses":{"200":{"description":"The claim.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"loss":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"accidentState":{"type":"string"},"accidentMunicipality":{"type":["string","null"]},"plateState":{"type":"string"},"policeReportConfirmed":{"type":"boolean"},"insurerReportConfirmed":{"type":"boolean"}},"required":["lossType","accidentDate","accidentState","accidentMunicipality","plateState","policeReportConfirmed","insurerReportConfirmed"]},"claimant":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"curpMasked":{"type":"string"},"rfcMasked":{"type":["string","null"]}},"required":["fullName","email","phone","curpMasked","rfcMasked"]},"consent":{"type":"object","properties":{"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"noticeVersion":{"type":"string"}},"required":["receivedAt","noticeVersion"]},"policy":{"anyOf":[{"type":"object","properties":{"insurer":{"type":"string"},"policyNumber":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"version":{"type":["string","null"]},"vinMasked":{"type":"string"},"plate":{"type":["string","null"]},"declaredValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["insurer","policyNumber","make","model","year","version","vinMasked","plate","declaredValue","deductibleRate","validFrom","validTo"]},{"type":"null"}]},"policyFile":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","jpeg"]},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","bytes"]},"verification":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]},"advance":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"defaults":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},"bounds":{"type":"object","properties":{"adjustmentMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMin":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"daysMin":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"daysMax":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentMax","monthlyMax","advanceMin","advanceMax","daysMin","daysMax"]},"deductibleRateDefault":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"limits":{"type":"object","properties":{"oldestModelYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["oldestModelYear","minSpread","maxAccidentYears"]}},"required":["defaults","bounds","deductibleRateDefault","limits"]},{"type":"null"}]},"offer":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"decision":{"anyOf":[{"type":"string","enum":["accepted","declined"]},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["state","sentAt","validUntil","decision","decidedAt"]},{"type":"null"}]},"offerPreview":{"type":"object","properties":{"link":{"type":"string","format":"uri"},"validityDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"openWhatsappWeb":{"type":"boolean"}},"required":["link","validityDays","validUntil","openWhatsappWeb"]},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer_sent","rejected","phone_requested"]},"channel":{"type":"string","enum":["whatsapp_mock","mock"]},"recipient":{"type":"string"},"body":{"type":"string"},"link":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","channel","recipient","body","link","createdAt"]}},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"rejectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reason","rejectedAt"]},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","body","actor","createdAt"]}},"rules":{"type":"array","items":{"type":"object","properties":{"clave":{"type":"string","enum":["antiguedad","spread","fecha"]},"nombre":{"type":"string"},"cumple":{"type":"boolean"},"detalle":{"type":"string"}},"required":["clave","nombre","cumple","detalle"]}},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]}},"required":["id","folio","status","followUp","createdAt","loss","claimant","consent","policy","policyFile","verification","advance","pricing","offer","offerPreview","notifications","rejection","notes","rules","decision"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim. A malformed id answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Open one claim, with the sensitive identifiers masked","tags":["staff"]}},"/api/v1/staff/claims/{id}/notes":{"post":{"operationId":"StaffClaimsController_addNote","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID. Not the public identifier and not the folio.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":1000}},"required":["body"]}}}},"responses":{"200":{"description":"The claim with its notes.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"loss":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"accidentState":{"type":"string"},"accidentMunicipality":{"type":["string","null"]},"plateState":{"type":"string"},"policeReportConfirmed":{"type":"boolean"},"insurerReportConfirmed":{"type":"boolean"}},"required":["lossType","accidentDate","accidentState","accidentMunicipality","plateState","policeReportConfirmed","insurerReportConfirmed"]},"claimant":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"curpMasked":{"type":"string"},"rfcMasked":{"type":["string","null"]}},"required":["fullName","email","phone","curpMasked","rfcMasked"]},"consent":{"type":"object","properties":{"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"noticeVersion":{"type":"string"}},"required":["receivedAt","noticeVersion"]},"policy":{"anyOf":[{"type":"object","properties":{"insurer":{"type":"string"},"policyNumber":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"version":{"type":["string","null"]},"vinMasked":{"type":"string"},"plate":{"type":["string","null"]},"declaredValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["insurer","policyNumber","make","model","year","version","vinMasked","plate","declaredValue","deductibleRate","validFrom","validTo"]},{"type":"null"}]},"policyFile":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","jpeg"]},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","bytes"]},"verification":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]},"advance":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"defaults":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},"bounds":{"type":"object","properties":{"adjustmentMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMin":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"daysMin":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"daysMax":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentMax","monthlyMax","advanceMin","advanceMax","daysMin","daysMax"]},"deductibleRateDefault":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"limits":{"type":"object","properties":{"oldestModelYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["oldestModelYear","minSpread","maxAccidentYears"]}},"required":["defaults","bounds","deductibleRateDefault","limits"]},{"type":"null"}]},"offer":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"decision":{"anyOf":[{"type":"string","enum":["accepted","declined"]},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["state","sentAt","validUntil","decision","decidedAt"]},{"type":"null"}]},"offerPreview":{"type":"object","properties":{"link":{"type":"string","format":"uri"},"validityDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"openWhatsappWeb":{"type":"boolean"}},"required":["link","validityDays","validUntil","openWhatsappWeb"]},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer_sent","rejected","phone_requested"]},"channel":{"type":"string","enum":["whatsapp_mock","mock"]},"recipient":{"type":"string"},"body":{"type":"string"},"link":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","channel","recipient","body","link","createdAt"]}},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"rejectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reason","rejectedAt"]},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","body","actor","createdAt"]}},"rules":{"type":"array","items":{"type":"object","properties":{"clave":{"type":"string","enum":["antiguedad","spread","fecha"]},"nombre":{"type":"string"},"cumple":{"type":"boolean"},"detalle":{"type":"string"}},"required":["clave","nombre","cumple","detalle"]}},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]}},"required":["id","folio","status","followUp","createdAt","loss","claimant","consent","policy","policyFile","verification","advance","pricing","offer","offerPreview","notifications","rejection","notes","rules","decision"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim. A malformed id answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The note is empty or longer than 1,000 characters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Add a note to a claim's file","tags":["staff"]}},"/api/v1/staff/claims/{id}/phone-request":{"post":{"operationId":"StaffClaimsController_requestPhone","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID. Not the public identifier and not the folio.","schema":{"type":"string"}}],"responses":{"200":{"description":"The claim after the request.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"loss":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"accidentState":{"type":"string"},"accidentMunicipality":{"type":["string","null"]},"plateState":{"type":"string"},"policeReportConfirmed":{"type":"boolean"},"insurerReportConfirmed":{"type":"boolean"}},"required":["lossType","accidentDate","accidentState","accidentMunicipality","plateState","policeReportConfirmed","insurerReportConfirmed"]},"claimant":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"curpMasked":{"type":"string"},"rfcMasked":{"type":["string","null"]}},"required":["fullName","email","phone","curpMasked","rfcMasked"]},"consent":{"type":"object","properties":{"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"noticeVersion":{"type":"string"}},"required":["receivedAt","noticeVersion"]},"policy":{"anyOf":[{"type":"object","properties":{"insurer":{"type":"string"},"policyNumber":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"version":{"type":["string","null"]},"vinMasked":{"type":"string"},"plate":{"type":["string","null"]},"declaredValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["insurer","policyNumber","make","model","year","version","vinMasked","plate","declaredValue","deductibleRate","validFrom","validTo"]},{"type":"null"}]},"policyFile":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","jpeg"]},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","bytes"]},"verification":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]},"advance":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"defaults":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},"bounds":{"type":"object","properties":{"adjustmentMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMin":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"daysMin":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"daysMax":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentMax","monthlyMax","advanceMin","advanceMax","daysMin","daysMax"]},"deductibleRateDefault":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"limits":{"type":"object","properties":{"oldestModelYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["oldestModelYear","minSpread","maxAccidentYears"]}},"required":["defaults","bounds","deductibleRateDefault","limits"]},{"type":"null"}]},"offer":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"decision":{"anyOf":[{"type":"string","enum":["accepted","declined"]},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["state","sentAt","validUntil","decision","decidedAt"]},{"type":"null"}]},"offerPreview":{"type":"object","properties":{"link":{"type":"string","format":"uri"},"validityDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"openWhatsappWeb":{"type":"boolean"}},"required":["link","validityDays","validUntil","openWhatsappWeb"]},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer_sent","rejected","phone_requested"]},"channel":{"type":"string","enum":["whatsapp_mock","mock"]},"recipient":{"type":"string"},"body":{"type":"string"},"link":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","channel","recipient","body","link","createdAt"]}},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"rejectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reason","rejectedAt"]},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","body","actor","createdAt"]}},"rules":{"type":"array","items":{"type":"object","properties":{"clave":{"type":"string","enum":["antiguedad","spread","fecha"]},"nombre":{"type":"string"},"cumple":{"type":"boolean"},"detalle":{"type":"string"}},"required":["clave","nombre","cumple","detalle"]}},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]}},"required":["id","folio","status","followUp","createdAt","loss","claimant","consent","policy","policyFile","verification","advance","pricing","offer","offerPreview","notifications","rejection","notes","rules","decision"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim. A malformed id answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The claim is not on hold.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Ask a claimant on hold for another phone. Records a mocked email.","tags":["staff"]}},"/api/v1/staff/claims/{id}/reveal":{"post":{"operationId":"StaffClaimsController_reveal","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID. Not the public identifier and not the folio.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"string","enum":["curp","rfc","vin"]}},"required":["field"]}}}},"responses":{"200":{"description":"The identifier in full.","content":{"application/json":{"schema":{"type":"object","properties":{"field":{"type":"string","enum":["curp","rfc","vin"]},"value":{"type":"string","minLength":1}},"required":["field","value"],"additionalProperties":false}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim, or the claim does not have that identifier. No audit event is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The field is not curp, rfc, or vin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Show a masked identifier in full. Writes an audit event.","tags":["staff"]}},"/api/v1/staff/claims/{id}/policy-file":{"get":{"operationId":"StaffClaimsController_policyFile","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID. Not the public identifier and not the folio.","schema":{"type":"string"}}],"responses":{"200":{"description":"The policy file, as an attachment.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim, or the claim has no stored file. The body names no path.","content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"image/jpeg":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Download the stored policy. Writes an audit event.","tags":["staff"]}},"/api/v1/staff/claims/{id}/verification/retry":{"post":{"operationId":"StaffVerificationController_retry","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID.","schema":{"type":"string"}}],"responses":{"200":{"description":"The verification as it stands after the retry.","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim. A malformed id answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The claim is not verifying, so it has no checks to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Re-run the pending checks of a claim that is verifying","tags":["staff"]}},"/api/v1/staff/claims/{id}/policy":{"post":{"operationId":"StaffVerificationController_enterPolicy","parameters":[{"name":"id","required":true,"in":"path","description":"The claim identifier, a UUID.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"insurer":{"type":"string","minLength":1},"policyNumber":{"type":"string","minLength":1},"make":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"year":{"type":"integer","minimum":1950,"maximum":2027},"version":{"type":"string","minLength":1},"vin":{"type":"string"},"plate":{"type":"string","minLength":1},"declaredValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"deductibleRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["insurer","policyNumber","make","model","year","vin","declaredValue"]}}}},"responses":{"201":{"description":"The claim with its new policy.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"loss":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"accidentState":{"type":"string"},"accidentMunicipality":{"type":["string","null"]},"plateState":{"type":"string"},"policeReportConfirmed":{"type":"boolean"},"insurerReportConfirmed":{"type":"boolean"}},"required":["lossType","accidentDate","accidentState","accidentMunicipality","plateState","policeReportConfirmed","insurerReportConfirmed"]},"claimant":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"curpMasked":{"type":"string"},"rfcMasked":{"type":["string","null"]}},"required":["fullName","email","phone","curpMasked","rfcMasked"]},"consent":{"type":"object","properties":{"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"noticeVersion":{"type":"string"}},"required":["receivedAt","noticeVersion"]},"policy":{"anyOf":[{"type":"object","properties":{"insurer":{"type":"string"},"policyNumber":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"version":{"type":["string","null"]},"vinMasked":{"type":"string"},"plate":{"type":["string","null"]},"declaredValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["insurer","policyNumber","make","model","year","version","vinMasked","plate","declaredValue","deductibleRate","validFrom","validTo"]},{"type":"null"}]},"policyFile":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","jpeg"]},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","bytes"]},"verification":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]},"advance":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"defaults":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},"bounds":{"type":"object","properties":{"adjustmentMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMin":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"daysMin":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"daysMax":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentMax","monthlyMax","advanceMin","advanceMax","daysMin","daysMax"]},"deductibleRateDefault":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"limits":{"type":"object","properties":{"oldestModelYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["oldestModelYear","minSpread","maxAccidentYears"]}},"required":["defaults","bounds","deductibleRateDefault","limits"]},{"type":"null"}]},"offer":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"decision":{"anyOf":[{"type":"string","enum":["accepted","declined"]},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["state","sentAt","validUntil","decision","decidedAt"]},{"type":"null"}]},"offerPreview":{"type":"object","properties":{"link":{"type":"string","format":"uri"},"validityDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"openWhatsappWeb":{"type":"boolean"}},"required":["link","validityDays","validUntil","openWhatsappWeb"]},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer_sent","rejected","phone_requested"]},"channel":{"type":"string","enum":["whatsapp_mock","mock"]},"recipient":{"type":"string"},"body":{"type":"string"},"link":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","channel","recipient","body","link","createdAt"]}},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"rejectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reason","rejectedAt"]},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","body","actor","createdAt"]}},"rules":{"type":"array","items":{"type":"object","properties":{"clave":{"type":"string","enum":["antiguedad","spread","fecha"]},"nombre":{"type":"string"},"cumple":{"type":"boolean"},"detalle":{"type":"string"}},"required":["clave","nombre","cumple","detalle"]}},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]}},"required":["id","folio","status","followUp","createdAt","loss","claimant","consent","policy","policyFile","verification","advance","pricing","offer","offerPreview","notifications","rejection","notes","rules","decision"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"No such claim. A malformed id answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"The claim already has a policy (`POLICY_EXISTS`), or is not verifying (`INVALID_STATE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"A policy field is invalid. Every failing field is listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Enter the policy of a claim that has none","tags":["staff"]}},"/api/v1/privacy-notice":{"get":{"operationId":"PrivacyNoticeController_read","parameters":[],"responses":{"200":{"description":"The notice as it is stored.","content":{"application/json":{"schema":{"type":"object","properties":{"razonSocial":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"domicilio":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"correoPrivacidad":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"plazoConservacion":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"version":{"type":"string"},"body":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["razonSocial","domicilio","correoPrivacidad","plazoConservacion","version","body","updatedAt"]}}}},"404":{"description":"The notice is not stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Read the privacy notice","tags":["PrivacyNotice"]}},"/api/v1/staff/privacy-notice":{"put":{"operationId":"StaffPrivacyNoticeController_save","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"razonSocial":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"domicilio":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"correoPrivacidad":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"plazoConservacion":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"body":{"type":"string","minLength":1,"maxLength":60000}},"required":["razonSocial","domicilio","correoPrivacidad","plazoConservacion","body"]}}}},"responses":{"200":{"description":"The notice as it is stored.","content":{"application/json":{"schema":{"type":"object","properties":{"razonSocial":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"domicilio":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"correoPrivacidad":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"plazoConservacion":{"anyOf":[{"type":"string","minLength":1,"maxLength":300},{"type":"null"}]},"version":{"type":"string"},"body":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["razonSocial","domicilio","correoPrivacidad","plazoConservacion","version","body","updatedAt"]}}}},"401":{"description":"The staff passcode is missing or wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"The text is empty or too long, or an address is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"Too many failed passcode attempts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"staff":[]}],"summary":"Replace the privacy notice text and its values","tags":["staff"]}},"/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"The API and its database are reachable.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["healthy","unhealthy"]},"dependencies":{"type":"object","properties":{"database":{"type":"string","enum":["reachable","unreachable"]}},"required":["database"],"additionalProperties":false},"checkedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","dependencies","checkedAt"],"additionalProperties":false}}}},"503":{"description":"A dependency is unreachable.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["healthy","unhealthy"]},"dependencies":{"type":"object","properties":{"database":{"type":"string","enum":["reachable","unreachable"]}},"required":["database"],"additionalProperties":false},"checkedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["status","dependencies","checkedAt"],"additionalProperties":false}}}}},"tags":["health"]}}},"info":{"title":"cguro intake API","description":"Auto insurance claim management.","version":"0.1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"staff":{"type":"apiKey","in":"header","name":"X-Staff-Passcode","description":"The shared staff passcode. Demo protection, not production authentication."}},"schemas":{"ErrorBody":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHENTICATED","FORBIDDEN","NOT_FOUND","VERSION_CONFLICT","ALREADY_APPROVED","INVALID_STATE","POLICY_EXISTS","VALIDATION_ERROR","INPUTS_MISSING","PAYLOAD_TOO_LARGE","PRECONDITION_REQUIRED","TOO_MANY_REQUESTS","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1}},"required":["field","code","message"]}}},"required":["code","message"],"additionalProperties":false},"Inputs":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},"Calculation":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},"AdminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"AdvanceDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt"]},"OfferView":{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"amountCentavos":{"type":"integer","minimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"firstName":{"type":"string","minLength":1},"vehicle":{"type":"string","minLength":1},"insurer":{"type":"string","minLength":1},"lossType":{"type":"string","enum":["robo_total","danos"]}},"required":["state","amountCentavos","validUntil","expectedDays","firstName","vehicle","insurer","lossType"],"additionalProperties":false},"PolicyFields":{"type":"object","properties":{"insurer":{"type":"string","minLength":1},"policyNumber":{"type":"string","minLength":1},"make":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"year":{"type":"integer","minimum":1950,"maximum":2027},"version":{"type":"string","minLength":1},"vin":{"type":"string"},"plate":{"type":"string","minLength":1},"declaredValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"deductibleRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["insurer","policyNumber","make","model","year","vin","declaredValue"]},"CheckResult":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]}},"required":["description","value","matchQuality"]}}},"required":["check","status","bucket","detail","isMock"]},"ClaimSubmission":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string"},"accidentState":{"type":"string","enum":["AGU","BCN","BCS","CAM","CHP","CHH","CMX","COA","COL","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]},"accidentMunicipality":{"type":"string"},"plateState":{"type":"string","enum":["AGU","BCN","BCS","CAM","CHP","CHH","CMX","COA","COL","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]},"insurerReportConfirmed":{"type":"boolean","const":true},"policeReportConfirmed":{"type":"boolean"},"fullName":{"type":"string"},"curp":{"type":"string"},"rfcHomoclave":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"privacyConsent":{"type":"boolean","const":true},"policy":{"type":"object","properties":{"insurer":{"type":"string","minLength":1},"policyNumber":{"type":"string","minLength":1},"make":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"year":{"type":"integer","minimum":1950,"maximum":2027},"version":{"type":"string","minLength":1},"vin":{"type":"string"},"plate":{"type":"string","minLength":1},"declaredValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"deductibleRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"validFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["insurer","policyNumber","make","model","year","vin","declaredValue"]}},"required":["lossType","accidentDate","accidentState","plateState","insurerReportConfirmed","fullName","curp","email","phone","privacyConsent"]},"ClaimSubmitted":{"type":"object","properties":{"publicId":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$"},"folio":{"type":"string","pattern":"^CGR-\\d{2}-\\d{4,}$"},"status":{"type":"string","const":"submitted"}},"required":["publicId","folio","status"]},"StaffClaimList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"fullName":{"type":"string"},"curpMasked":{"type":"string"},"hasPolicy":{"type":"boolean"},"insurer":{"type":["string","null"]},"vehicle":{"type":["string","null"]},"advanceAmount":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]},"hasPendingChecks":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","folio","status","followUp","lossType","accidentDate","fullName","curpMasked","hasPolicy","insurer","vehicle","advanceAmount","outcome","decision","hasPendingChecks","createdAt"]}},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991},"counts":{"type":"object","properties":{"outcome":{"type":"object","propertyNames":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["pending","decline","cannot_deliver","anomaly","note","clean"]},"followUp":{"type":"object","propertyNames":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991},"required":["to-review","waiting-client","sent","rejected"]}},"required":["outcome","followUp"]}},"required":["items","total","limit","offset","counts"]},"StaffClaimDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folio":{"type":"string"},"status":{"type":"string","enum":["submitted","verifying","declined_by_rules","on_hold","ready_for_review","offer_sent","offer_accepted","offer_declined","offer_expired","rejected"]},"followUp":{"type":"string","enum":["to-review","waiting-client","sent","rejected"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"loss":{"type":"object","properties":{"lossType":{"type":"string","enum":["robo_total","danos"]},"accidentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"accidentState":{"type":"string"},"accidentMunicipality":{"type":["string","null"]},"plateState":{"type":"string"},"policeReportConfirmed":{"type":"boolean"},"insurerReportConfirmed":{"type":"boolean"}},"required":["lossType","accidentDate","accidentState","accidentMunicipality","plateState","policeReportConfirmed","insurerReportConfirmed"]},"claimant":{"type":"object","properties":{"fullName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"curpMasked":{"type":"string"},"rfcMasked":{"type":["string","null"]}},"required":["fullName","email","phone","curpMasked","rfcMasked"]},"consent":{"type":"object","properties":{"receivedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"noticeVersion":{"type":"string"}},"required":["receivedAt","noticeVersion"]},"policy":{"anyOf":[{"type":"object","properties":{"insurer":{"type":"string"},"policyNumber":{"type":"string"},"make":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"version":{"type":["string","null"]},"vinMasked":{"type":"string"},"plate":{"type":["string","null"]},"declaredValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"validFrom":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"validTo":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["insurer","policyNumber","make","model","year","version","vinMasked","plate","declaredValue","deductibleRate","validFrom","validTo"]},{"type":"null"}]},"policyFile":{"type":"object","properties":{"type":{"type":"string","enum":["pdf","jpeg"]},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","bytes"]},"verification":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]},"advance":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["DRAFT","APPROVED"]},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"inputs":{"anyOf":[{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},{"type":"null"}]},"calculation":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"commercialValue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"commercialValueSource":{"type":"string","enum":["BLUE_BOOK_EBC","DECLARED_POLICY_VALUE","STAFF_ENTERED_VALUE"]},"lossType":{"type":"string","enum":["robo_total","danos"]},"deductibleRate":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},{"type":"null"}]},"deductibleAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"startingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustmentAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"adjustedStartingPoint":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"advancePercent":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceAmount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"spread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"months":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"}},"required":["currency","commercialValue","commercialValueSource","lossType","deductibleRate","deductibleAmount","startingPoint","adjustmentAmount","adjustedStartingPoint","advancePercent","advanceAmount","spread","months","monthlyRate"]},{"type":"null"}]},"adminFee":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"source":{"type":"string","const":"CGURO_CONFIG"}},"required":["amount","source"]},"approvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"approvedBy":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"valuation":{"type":"object","properties":{"chosen":{"type":"boolean"},"valuationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"manualValue":{"anyOf":[{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},{"type":"null"}]}},"required":["chosen","valuationId"]}},"required":["id","status","version","inputs","calculation","adminFee","approvedAt","approvedBy","updatedAt","valuation"]},{"type":"null"}]},"pricing":{"anyOf":[{"type":"object","properties":{"defaults":{"type":"object","properties":{"adjustmentRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyRate":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"expectedDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentRate","monthlyRate","expectedDays"]},"bounds":{"type":"object","properties":{"adjustmentMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"monthlyMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMin":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"advanceMax":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"daysMin":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"daysMax":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["adjustmentMax","monthlyMax","advanceMin","advanceMax","daysMin","daysMax"]},"deductibleRateDefault":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$"},"limits":{"type":"object","properties":{"oldestModelYear":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"minSpread":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"maxAccidentYears":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["oldestModelYear","minSpread","maxAccidentYears"]}},"required":["defaults","bounds","deductibleRateDefault","limits"]},{"type":"null"}]},"offer":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["open","accepted","declined","expired"]},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"decision":{"anyOf":[{"type":"string","enum":["accepted","declined"]},{"type":"null"}]},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["state","sentAt","validUntil","decision","decidedAt"]},{"type":"null"}]},"offerPreview":{"type":"object","properties":{"link":{"type":"string","format":"uri"},"validityDays":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"openWhatsappWeb":{"type":"boolean"}},"required":["link","validityDays","validUntil","openWhatsappWeb"]},"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["offer_sent","rejected","phone_requested"]},"channel":{"type":"string","enum":["whatsapp_mock","mock"]},"recipient":{"type":"string"},"body":{"type":"string"},"link":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","kind","channel","recipient","body","link","createdAt"]}},"rejection":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string"},"rejectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["reason","rejectedAt"]},{"type":"null"}]},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"body":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","body","actor","createdAt"]}},"rules":{"type":"array","items":{"type":"object","properties":{"clave":{"type":"string","enum":["antiguedad","spread","fecha"]},"nombre":{"type":"string"},"cumple":{"type":"boolean"},"detalle":{"type":"string"}},"required":["clave","nombre","cumple","detalle"]}},"decision":{"type":"string","enum":["rejection","blocked-delivery","pending","anomaly","note","clear"]}},"required":["id","folio","status","followUp","createdAt","loss","claimant","consent","policy","policyFile","verification","advance","pricing","offer","offerPreview","notifications","rejection","notes","rules","decision"]},"RevealRequest":{"type":"object","properties":{"field":{"type":"string","enum":["curp","rfc","vin"]}},"required":["field"]},"RevealResponse":{"type":"object","properties":{"field":{"type":"string","enum":["curp","rfc","vin"]},"value":{"type":"string","minLength":1}},"required":["field","value"],"additionalProperties":false},"VerificationView":{"type":"object","properties":{"outcome":{"type":"string","enum":["pending","decline","cannot_deliver","anomaly","note","clean"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["check","bucket","reason"]},{"type":"object","properties":{"rule":{"type":"string","enum":["vehicle","loss","spread"]},"bucket":{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},"reason":{"type":"string"}},"required":["rule","bucket","reason"]}]}},"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","enum":["CURP","RFC","TEL","CORREO","LEGAL","EBC","AMIS","REPUVE","RAPI"]},"status":{"type":"string","enum":["pass","fail","pending","skipped","out_of_scope"]},"bucket":{"anyOf":[{"type":"string","enum":["decline","cannot_deliver","anomaly","note"]},{"type":"null"}]},"reason":{"type":["string","null"]},"problem":{"anyOf":[{"type":"string","enum":["source_error","policy_unreadable"]},{"type":"null"}]},"detail":{"type":"string"},"isMock":{"type":"boolean"},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["check","status","bucket","reason","problem","detail","isMock","requestedAt","resolvedAt","attempts"]}},"comparables":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"value":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$"},"matchQuality":{"type":"string","enum":["exact","close","loose"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["description","value","matchQuality","id"]}}},"required":["outcome","conditions","checks","comparables"]}}}}