Admin API / Types

UpdateCollectionInput

Input

Changes to one collection. An omitted field keeps its value. Null is valid only for thumbnailId. An input without a change, or null in another field, fails with VALIDATION_ERROR.

input UpdateCollectionInput

Input fields

FieldTypeDescription
collectionIdID!The collection to change.
defaultSortCollectionItemSortInputThe default listing order. Listing collections only.
displayNameNonEmptyStringTrimmed. Unique per item type, ignoring letter case; for a manual listing collection, its slug form must also differ from every tag slug of the marketplace. The slug does not change.
featuredBooleanTrue: the storefront home page shows a feed of the items.
listingsFilterBooleanTrue: the storefront listings page offers the collection as a filter. Listing collections only.
pinnedBooleanTrue: the storefront home page shows the collection at the top. Listing collections only.
rulesCollectionRulesInputReplaces every rule. Automated listing collections only. Not with sellerPolicy: VALIDATION_ERROR. A legacy tag rule, which Collection.rules.sourceCollections reads as the collections that hold its tags, is removed too: to keep its listings, send the IDs of those collections in sourceCollectionIds. A hidden holder adds none while it is hidden, and a deleted holder gives CollectionRulesInvalidError. The listings of a tag whose collection is deleted, or that no collection holds, are lost.
sellerPolicyCollectionSellerPolicyWho can add items and remove them. Manual collections only.
thumbnailFileUrlURLThe 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.
thumbnailIdIDNull removes the thumbnail. Otherwise an image that the caller owns, or the ID of the current thumbnail, which changes nothing.
visibilityCollectionVisibilityWhether the storefront shows the collection.