Supplier Tags Queries

Access supplier tags for classification.

SupplierTag — Returns a single supplier tag based on the id provided

query GetSupplierTag($id: ID) {
  SupplierTag(id: $id) {
    id
    label
    active
  }
}
{
  "id": 100012
}

SupplierTags — Returns a list of supplier tags with filters, ordering, and search

query SupplierTags(
  $orderBy: [QuerySupplierTagsOrderByOrderByClause!],
  $where: QuerySupplierTagsWhereWhereConditions,
  $search: String,
  $first: Int,
  $page: Int
) {
  SupplierTags(
    orderBy: $orderBy
    where: $where
    search: $search
    first: $first
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      active
    }
  }
}
{
  "where": {
    "AND": [
      { "column": "ACTIVE", "operator": "EQ", "value": true }
    ]
  },
  "orderBy": [
    { "column": "LABEL", "order": "ASC" }
  ],
  "search": "tag name"
}

Available fields

FieldTypeDescription
idIntUnique identifier of the tag.
labelStringName/Label of the tag.
activeBooleanTag's activation status.

Filters

You can create filters based on following fields:

id - Int
Example: { "column": "ID", "operator": "EQ", "value": 10001 }
label - String
Example: { "column": "LABEL", "operator": "LIKE", "value": "%Premium%" }
active - Boolean
Example: { "column": "ACTIVE", "operator": "EQ", "value": true }

Sorting

You can sort data based on following fields: id, label, active

query SortSupplierTags(
  $where: QuerySupplierTagsWhereWhereConditions,
  $first: Int,
  $page: Int
) {
  SupplierTags(
    where: $where
    orderBy: [{ column: LABEL, order: ASC }]
    first: $first
    page: $page
  ) {
    paginatorInfo {
      total
      currentPage
    }
    data {
      id
      label
      active
    }
  }
}

Example of data returned

{
  "data": {
    "SupplierTags": [
      {
        "id": 100001,
        "label": "Key Partner",
        "active": true
      },
      {
        "id": 100002,
        "label": "Premium Supplier",
        "active": true
      }
    ]
  }
}