Skip to main content

Re-optimise a queued assignment now (ReoptimiseAssignment)

POST 

/assignments/:assignmentId/reoptimisations

Re-runs the candidate search (AssignmentCost = legs + crossRegionPenalty + scorecardPenalty + bookPressurePenalty, ties to the witness node) over the current read models, skipping excluded nodes and any candidate whose eta is after deliverByLatest. Allowed only while QUEUED. If the best node changes the assignment moves (FulfillmentReassigned is published) and releaseAt follows the new candidate (VirtualQueue); if no candidate is left the assignment becomes UNSOURCEABLE at once (FulfillmentUnsourceable, gap G26). A repeat on unchanged read models changes nothing. A retry with the same Idempotency-Key replays the stored response for 24 hours when it is final (a 200, malformed-request or assignment-locked); a refusal that state can still change is not stored and the retry runs again. The same key with another request is 409 idempotency-key-reused.

Request​

Responses​

The assignment after re-optimisation (unchanged if the best candidate is the current one). A replay of the first answer carries Idempotency-Replayed: true (a stored 2xx is replayed; a 5xx and a refusal that releases the key are never stored).

Response Headers
    Idempotency-Replayed

    Present, with the value true, only when the response is a replay of the first answer.