Close a delivery

POST /api/v1/deliveries/{id}/close

Says nothing more is coming. delivery.judged goes out once all its received files are judged, at once if they already are; a delivery closed with no file sends none.

Scope · deliveries:write Takes an Idempotency-Key

Path parameters

id uuid required
The delivery, as POST /deliveries returned it.

What the response holds · 200

delivery delivery
The delivery, closed.

The fields of delivery

id uuid
The delivery’s id.
client string
The client, as you gave it.
campaign string
The campaign, as you gave it.
platforms array of string | null
The campaign’s platforms, in the order of GET /platforms, or null for a delivery started in ValidFile before its Campaign step: each of its files is judged on the whole catalogue.
campaignRef string | null
Your campaign reference, folded to lower case, or null.
closed boolean
True once the delivery is closed: by POST …/close, or by your client when it says on its drop link that its delivery is complete. A closed delivery still takes files.
createdAt date-time
When it was made.
keptUntil date-time
The day it will be erased if nothing happens to it before, by your plan’s retention. It moves later with each activity. Once erased, it answers 404. For a test delivery: 24 h after its making or its last file.
test boolean
True for a delivery made with a test key (vf_test_): its files cost nothing and are erased after 24 h, and ValidFile shows it nowhere. Authentication.

Errors

404not_foundA delivery or file unknown, deleted, or erased at the end of its retention; or an address the API does not have.
403scopeThe key does not have the scope the route asks for: a read-only key tried to write, or a key without drop-links:write tried to make or cut a drop link.
409idempotency_mismatchThe same Idempotency-Key with another body: take a new one.
409idempotency_in_progressThe first call is still running: try again in a moment, with the same key.

And those of any call, in Limits and errors.

Closed is not locked: a file added afterwards, by the API or in ValidFile, is taken, and delivery.judged goes out again once it is judged. Closing a delivery already closed changes nothing.

Your client also closes the delivery when it says, on its drop link, that it is complete: delivery.judged then goes out the same way. If it reopens it on its link, it stays closed here, and a file it drops afterwards sends the event again once judged.

curl -X POST https://validfile.ca/api/v1/deliveries/$DELIVERY/close \
  -H "Authorization: Bearer $VALIDFILE_KEY"
{
  "delivery": {
    "id": "0b6c2f4e-8d1a-4c7b-9f3e-5a2d1c8b7e60",
    "client": "Fromagerie Boivin",
    "campaign": "Noël 2026",
    "platforms": ["Meta", "Display"],
    "campaignRef": "bynder:4471",
    "closed": true,
    "createdAt": "2026-10-28T18:40:02.114Z",
    "keptUntil": "2027-10-28T18:42:10.531Z",
    "test": false
  }
}