- ID
- eb56449d-80cb-4cd4-85d7-5ec5b22074a3
Sure Project: E and S Fees
+ [[https://www.notion.so/sure/As-a-California-quoter-or-policyholder-I-observe-updated-E-S-fees-effective-1-1-23-b6897222b0644eb3890b1997f1cdcb62][Notion doc]]
Calvin noted that we already use /api/v2/quotes/<quote_id>/plans/ to retreive a list of plans that can be used to finalize a quote.
Tommie also offered some advice in this thread: https://iamsure.slack.com/archives/C03A6FF8N4F/p1670350866810449
He suggested having constants defined for each plan ID that the frontend can use to find the currnet active plan based on year.
But what if the endpoint [[https://api.testporchcare.com/api/v2/schema/redoc#tag/quotes/operation/quotes_plans_list][here]] could be adapted to reference past active plans, and to always return the current active plan for the current date?
So instead of:
#+begin_src json
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"activated": "2019-08-24T14:15:22Z",
"carrier": {
"code": "string",
"name": "string"
},
"name": "string",
"regions": [
"string"
],
"status": "string",
"title": "string",
"updated_at": "2019-08-24T14:15:22Z",
"vertical_code": "string"
}
]
#+end_src
We could amended the output of that call to include two new fields:
#+begin_src json
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"activated": "2019-08-24T14:15:22Z",
"carrier": {
"code": "string",
"name": "string"
},
"name": "string",
"regions": [
"string"
],
"status": "draft|published|archived",
"title": "string",
"updated_at": "2019-08-24T14:15:22Z",
"vertical_code": "string"
# The following are new:
"replaced_by_plan_id": "string",
"replacement_effective_date": "datestamp"
}
]
#+end_src