operation post api v1 assignments change dates.md

Change bound coverage dates

POST /api/v1/assignments/change_dates

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.

Servers

Parameters

Body: application/json (object)

Responses

200

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.

Body: application/json (object)

A positive integer representing the premium owed per $100 earned. The net_rate is stored in cents (e.g., 48 represents $0.48).

400

Invalid input, no dates provided, voided/cancelled/unbound record, expired coverage, a backward or past effective_date, or a shortened end_date.

404

Job not found, or no bound coverage found for the job.