Tagging Objects
Apply tags to categorise objects
Jungle allows you to tag almost any object in the platform. Tags can be informative, and they help with sorting and filtering objects. Tags can be retrieved when retrieving an object from the API.
Applying a Tag
You can tag an object like so:
mutation TagAdd {
tagAdd(
input: {
object: { id: "xid:jungle/Product:shopify/productid/my-shop:1234", typename: "Product" }
tags: ["awesome-product"]
}
) {
... on MutationSuccess {
ok
}
... on MutationFailure {
reason
}
}
}
Removing a Tag
You can remove an object tag like so:
mutation TagRemove {
tagRemove(
input: {
object: { id: "xid:jungle/Product:shopify/productid/my-shop:1234", typename: "Product" }
tags: ["awesome-product"]
}
) {
... on MutationSuccess {
ok
}
... on MutationFailure {
reason
}
}
}
Reading Object Tags
You can retrieve an object with its tags with the following query:
query GetProduct {
object(input: { id: "xid:jungle/Product:shopify/productid/my-shop:1234", typename: "Product" }) {
id
... on Product {
tags
}
}
}
Which produces a result like this:
{
"data": {
"object": {
"id": "201",
"tags": ["awesome-product"]
}
}
}
Quickstart
Go from nothing to a fulfilled order in a handful of API calls
Types
The core object types you'll work with in Jungle
Can't find what you're looking for? Contact us