prototypes

The prototypes query allows you to (not surprisingly!) return the Prototypes configured on the platform.

Key Information

Use-Case

Prototypes are a concept within the Marketplacer categorization domain. They allow you to define and associate sets Option Types (attributes) to a given part of your categorization tree. One possible use-case for using the prototypes query is when you are wanting to sync taxonomies between systems (e.g. in this case Marketplacer would be the source system).

Further Points of Note

  • Currently not available to Sellers, however Sellers can use the node or nodes queries to return specific prototypes

Availability

  • Operator API: Yes
  • Seller API: No

Example

query getOptionTypesForPrototype{
  prototypes(first: 100 after: null) {
    nodes {
      id
      name
      optionTypes {
        nodes {
          id
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Arguments

NameTypeDescription
ids[ID]Return prototypes based on their Ids
afterStringPagination cursor for moving through result set - more on pagination here
beforeStringNot in use - backwards pagination not supported
firstIntPagination page size - more on pagination here
lastIntNot in use - backwards pagination not supported

Response

Returns PrototypesConnection


Error Responses

HTTP ErrorError MessageMeaning
401UnauthorizedYou don’t have access to the endpoint, likely Basic Authentication credentials are missing
401API Token has expiredYou don’t have access to the endpoint, likely that you are either not supplying an API Key, or the key you are supplying is invalid
200Field ‘prototypes’ doesn’t exist on type ‘Query’Most likely returned if a Seller is attempting to use this query, or you are not supplying a valid API key

Further Reading