Admin API / Types
CreateCollectionInput
InputA new collection.
input CreateCollectionInputInput fields
| Field | Type | Description |
|---|---|---|
defaultSort | CollectionItemSortInput | The default listing order. Listing collections only. Default CREATED_AT descending. |
displayName | NonEmptyString! | Trimmed. The call refuses a name that another collection of the item type has, ignoring letter case. A deleted manual listing collection can keep its name taken. Two concurrent creates are not checked against each other. |
featured | Boolean | True: the storefront home page shows a feed of the items. Default false. |
idempotencyKey | String! | A client-generated key, 1 to 200 characters after trim. A repeat with the same key and input within 24 hours returns the first result and creates no second collection. The same key with another input returns IdempotencyConflictError. |
itemType | CollectionItemType! | Whether the collection holds listings or livestreams. |
listingsFilter | Boolean | True: the storefront listings page offers the collection as a filter. Listing collections only. Default true. |
pinned | Boolean | True: the storefront home page shows the collection at the top. Listing collections only. Default false. |
rules | CollectionRulesInput | Makes an automated listing collection: the listings that match the rules. Omit for a manual collection. Not with sellerPolicy, and not on a livestream collection: either gives VALIDATION_ERROR. |
sellerPolicy | CollectionSellerPolicy | Who can add items and remove them. Manual collections only. Default SELLERS_OWN_ITEMS. |
thumbnailFileUrl | URL | The public URL of a PUBLIC District files image: File.url with access: PUBLIC in District API. Any last path segment is accepted. The collection stores its own copy of the 4096-pixel rendition on the marketplace image host, so a later change to the file in District files does not change the thumbnail. Not with thumbnailId: VALIDATION_ERROR. When District files does not answer the check or the copy fails, the mutation fails with error code MEDIA_FILE_CHECK_FAILED and writes nothing; send the same request again. |
thumbnailId | ID | An image that the caller owns. Omitted, with no thumbnailFileUrl: no thumbnail. |
visibility | CollectionVisibility | Whether the storefront shows the collection. Default PUBLIC. |