Save drop item media from an upload batch
Changed onSaves 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.
Request
- Base URLhttps://api.opensea.io
- AuthAPI key in header x-api-key and OpenID Connect (https://auth.opensea.io/.well-known/openid-configuration, scopes: write:drops)
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Collection slug
Request body
Example request
{
"filenames": [
"1.png",
"2.png"
],
"upload_batch_id": "5f0c2b1e-7a4d-4e8b-9c3f-2d6a1b0e9f47"
}Response
Drop item media saved successfully
Changes
- info
endpoint added
- info