Drops Endpoints

Save drop item media from an upload batch

Changed on

Saves the drop's items from files uploaded with one upload_batch_id through POST /api/v2/drops/{slug}/items/media, naming them by filename instead of by media token. The request stays small for large drops: a 15,000-item save is about a tenth of the size of the same save by media token, and it is validated with one storage listing instead of one lookup per file. Each save replaces the drop's items, a manifest from POST /api/v2/drops/{slug}/items/manifest supplies token ids and metadata, and without one items are numbered 1 to n in the order of filenames.

Returns 400 when a filename is listed twice or was not uploaded in the batch, naming the files concerned. If a file was uploaded more than once in the batch, the most recent upload is saved. Not available on ERC-1155 self-mint drops.

post/api/v2/drops/{slug}/items/media/save-batch

Request

Path parameters

slugstring required

Collection slug

Request body

filenamesstring[] required

Filenames exactly as uploaded in the batch, one per item and each at most once, up to 15000. Without a manifest, items are numbered 1 to n in this order. Files in the batch that are not named here are not saved.

upload_batch_idstring uuid required

The upload_batch_id the files were uploaded with through POST /api/v2/drops/{slug}/items/media.

Example request

{
  "filenames": [
    "1.png",
    "2.png"
  ],
  "upload_batch_id": "5f0c2b1e-7a4d-4e8b-9c3f-2d6a1b0e9f47"
}

Response

Drop item media saved successfully

successboolean required

Whether the save succeeded

Changes