Admin API / Types
DuplicateProductPayload
UnionThe result of duplicateProduct. IdempotencyConflictError: the key was used before with another input. ProductNotDuplicableError: the listing cannot be copied; reason gives the cause. ProductNotFoundError: no listing with this ID that the caller reads belongs to the caller or to a seller in Viewer.access.actingFor, or a repeat finds that a copy of the first call is deleted. ProductValidationError: the listing breaks a listing rule now, for example a price above a non-null Marketplace.listingRules.maximumPrice. Each issue field is the path that the value has in a CreateProductInput, with the copied variants in display order. A video that has not finished processing gives MEDIA_NOT_FOUND at its media index. A CALCULATED shipping setting with no saved parcel and ship-from gives PARCEL_REQUIRED at shipping.custom.origin and shipping.custom.parcel; updateProduct with shipping adds them. SaleModeNotAllowedError: the store does not allow the format of the listing, or members cannot sell. UnauthorizedError: the caller cannot create listings; requiredRole is the lowest role that can, or null when no role helps. An error member creates nothing.
union DuplicateProductPayload = DuplicateProductSuccess | IdempotencyConflictError | ProductNotDuplicableError | ProductNotFoundError | ProductValidationError | SaleModeNotAllowedError | UnauthorizedErrorMembers
DuplicateProductSuccessIdempotencyConflictErrorProductNotDuplicableErrorProductNotFoundErrorProductValidationErrorSaleModeNotAllowedErrorUnauthorizedError