Changes the start (effective_date) and/or end date of bound
coverage for a job. This is the symmetric counterpart to
POST /api/v1/assignments/extend: extend moves the end date out, this
endpoint can also move the start date forward (shortening coverage from
the front) -- e.g. correcting a start date that slipped into the past --
and it works for both quote- and assignment-backed coverage.
Restrictions mirror what we already enforce: effective_date must be in
the future, strictly after the current start, and before the end date;
end_date follows the extend rules (on or after the current end, within
a year of the effective date, and coverage not already ended). At least
one of effective_date / end_date is required. Changing dates on a
bound quote via PUT /quotes is not supported; use this endpoint.
Certificate of Insurance (COI) regeneration: COI PDFs are regenerated
asynchronously to reflect the new dates. The response returns immediately
with certificate_refresh_pending: true; the certificate URLs in
the response are stale, and fresh URLs are published in the
assignment.dates_changed webhook (and available via the API) once
regeneration completes.
Body
-
New coverage start date (seconds since the Unix epoch). Must be in the future, after the current start, and before the end date. Moving it forward shortens coverage from the start.
-
New coverage end date (seconds since the Unix epoch). Must be on or after the current end date and within one year of the effective date.
-
The ID of the job associated with the coverage.
-
When true, email the contractor a coverage-dates-changed notice. COI regeneration and webhook publication happen regardless of this flag.
Default value is
true.
Responses
-
Coverage dates updated, or unchanged (no-op) when the submitted dates match the current values. COIs regenerate asynchronously, so the response includes
certificate_refresh_pending: true. -
Invalid input, no dates provided, voided/cancelled/unbound record, expired coverage, a backward or past effective_date, or a shortened end_date.
-
Job not found, or no bound coverage found for the job.
curl \
--request POST 'https://api.1099policy.com/api/v1/assignments/change_dates' \
--header "Content-Type: application/json" \
--data '"{\n \"effective_date\": 1784332800,\n \"job_id\": \"jb_jsb9KEcTpc\",\n \"send_email\": true\n}"'
{
"effective_date": 1784332800,
"job_id": "jb_jsb9KEcTpc",
"send_email": true
}
{
"bind": true,
"certificates": {
"gl_coi_pdf_url": "/bound-policies/prod/gl_coi_pl_wv23Q3lMc1_1691450123.pdf",
"wc_coi_pdf_url": "/bound-policies/prod/wc_coi_pl_wv23Q3lMc1_1691420903.pdf"
},
"contractor": "cn_Ehb3bYa",
"coverage_type": [
"general",
"workers-comp"
],
"created": 1646818364,
"effective_date": 1646818364,
"eligible": {
"message": "Contractor is pre-approved for insurance coverage.",
"result": true
},
"end_date": 1678334737,
"id": "an_5HviNgc2Br",
"job": "jb_jsb9KEcTpc",
"net_rate": 65,
"policy": "pl_WzFRszJhoY"
}
{
"contractor": "cn_Ehb3bYa",
"coverage_type": [
"general",
"workers-comp"
],
"created": 1646818364,
"effective_date": 1646818364,
"eligible": true,
"end_date": 1678334737,
"gl_net_rate": 20,
"id": "qt_5DciVga8Kt",
"job": "jb_jsb9KEcTpc",
"net_rate": 65,
"quote_json": {
"gl": {
"net_rate": 20,
"risk_purchasing_group_fee": null,
"stamping_fee": null
},
"wc": {
"net_rate": 45
}
},
"wc_net_rate": 45
}