Admin API / Types

ViewerAccess

Object

What the caller can do in this marketplace: the effective role, the sellers that the caller acts for, whether the caller can create listings, and whether the caller has open seller obligations. Read it before you offer a write.

type ViewerAccess

Fields

FieldTypeDescription
actingFor[User!]!
Sellers whose rows the caller can act on: the caller first, then the owner of each store that the caller staffs. Only the caller when role is below SELLER.
canSellBoolean!
Whether the caller can create listings. False when role is below SELLER, when an account restriction blocks the caller's listings, or when Marketplace.commerceEnabled is false. On a marketplace whose plan gates features, also false for every role below OWNER when Marketplace.hasMultipleSellers is false. Also false when admin-api cannot read the store settings. Store staff create listings for the store owner only when this value is true.
hasOutstandingObligationsBoolean!
True when the caller is the seller on an order in this marketplace that is not complete or that has an open dispute, whatever the membership status. While role is below SELLER, such a caller can still read Viewer.orders and the other fields that open obligations admit; other fields fail with FORBIDDEN.
roleMarketplaceRole
The membership role when the membership is ACTIVE, otherwise null. Every role gate reads this value: a field or mutation whose description names a higher role refuses the caller.

Returned by