USEPA / e-manifest

API services documentation and reference material for the e-Manifest hazardous waste tracking system
https://www.epa.gov/e-manifest
Creative Commons Zero v1.0 Universal
26 stars 22 forks source link

EM-2935 Patch API for Update #1595

Closed e-manifest closed 7 months ago

e-manifest commented 8 months ago

As a user of the e-Manifest APIs, I would like to have a Patch API to only send or initiate updates on a limited number of fields for a manifest rather than the entire manifest.

For example, I want to update the generator ID, but none of the other generator information. or add just the printed name of the generator for a hybrid manifest, but not the rest of the manifest. Ideally it would be great to update just the management method code.

The patch update API would need to follow the same rules on what can be updated using the current put update API.

For example, if the generator and transporter 1 have signed, the patch can not change the Generator’s signature.

The Patch would also need to set the updated date and updated by information, like the current update API.

I realize this will be difficult for Waste lines and would like suggestions. Especially for manifests with more than 1 waste line

Acceptance Criteria
(x) patch-update endpoint added

(x) Service has parameters for manifestTrackingNumber and body

(x) In the body, user can specify the entity (i.e. generator, transporter, designatedFacility, wastes) and specific data elements to update on the manifest

(x) Provided data and manifest is validated to ensure validation rules are passed

(x) If validation catches an error, the errors are returned in the response along with{{reportId}} and {{date}}

(x) If all validation rules are passed, the specific provided data elements on the manifest are updated along with appropriate manifest-level elements (i.e. {{updatedDate}}, {{updatedBy}}, {{updatedByRole}}) and response returns