Admin API / Types

CreateProductInput

Input

The listing to create.

input CreateProductInput

Input fields

FieldTypeDescription
collectionIds[ID!]Manual collections to add the listing to. Each ID at most once; a second use fails with VALIDATION_ERROR. An unknown, deleted, automated or livestream collection gives COLLECTION_NOT_FOUND. An owner-only collection gives UnauthorizedError with requiredRole: ADMIN to a caller below the ADMIN role.
descriptionStringThe long-form description. Omitted: empty.
idempotencyKeyString!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 listing. The same key with another input returns IdempotencyConflictError.
media[ProductMediaInput!]The photos and videos of the listing, in display order. The first is the primary item. At most 30 (MEDIA_LIMIT_EXCEEDED). Videos have no separate limit. Each item at most once; a second use fails with VALIDATION_ERROR. Omitted or null: no photos or videos. A Product.media ID of another listing gives MEDIA_NOT_FOUND: a new listing holds no item yet.
saleModeCreateProductSaleModeInput!The sale format and its settings.
sellerIdIDThe listing seller: the caller, or a seller in Viewer.access.actingFor. Defaults to the caller. Another seller gives UnauthorizedError with requiredRole: null.
shippingProductShippingInputRequired when a variant ships (SHIPPING_REQUIRED), except on a giveaway: an omitted giveaway shipping ships free to US, CA and ROW, or to US only when Marketplace.listingRules.shipsToUnitedStatesOnly is true. When no variant ships, the listing ships free and a sent shipping is ignored.
taxonomyCategoryIdIDA leaf category (TaxonomyCategory.isLeaf) from Marketplace.taxonomyCategories. A category that is not in that list gives TAXONOMY_CATEGORY_NOT_FOUND: an unknown category, or a category outside the allow-list of the marketplace. A category with children gives TAXONOMY_CATEGORY_NOT_LEAF. Omitted or null: no category. updateProduct does not change the category.
titleNonEmptyString!The customer-facing title, trimmed.
variants[ProductVariantInput!]!1 to 999 variants, in display order. An auction or a giveaway has 1 (VARIANT_COUNT_INVALID).
visibilityProductVisibilityDefaults to PUBLIC: buyers can see and buy the listing at once. HIDDEN creates it hidden from the storefront.