Query a product by ID

You can query products in the product catalog one by one using the product object.

query {
  product(productId: "90871OSA") {
    attributes {
      name
      value
      type
    }
    metadata {
      dataSetId
      tracking {
        createdBy
        createdAt
        lastModifiedBy
        lastModifiedAt
      }
    }
  }
}
{
    "data": {
        "product": {
            "attributes": [
                {
                    "name": "productId",
                    "value": "90871OSA",
                    "type": "TEXT"
                },
                {
                    "name": "name",
                    "value": "Castle High Strength 52,5N Cement 25 kg",
                    "type": "TEXT"
                },
                {
                    "name": "dateAdded",
                    "value": "2025-01-05T00:00:00.000Z",
                    "type": "DATE"
                },
                {
                    "name": "category",
                    "value": "Cement",
                    "type": "TEXT"
                },
                {
                    "name": "description",
                    "value": "The PPC has a superior quality of fineness. It is impermeable and resistant to corrosion, thus resulting in a structure that is built to last.",
                    "type": "TEXT"
                },
                {
                    "name": "price",
                    "value": 876.70,
                    "type": "NUMBER"
                },
                {
                    "name": "status",
                    "value": "In stock",
                    "type": "TEXT"
                },
                {
                    "name": "model",
                    "value": "Castle High Strength",
                    "type": "TEXT"
                },
                {
                    "name": "brand",
                    "value": "CD0020101",
                    "type": "TEXT"
                }
            ],
            "metadata": {
                "dataSetId": "1e51480c-074a-5fd7-tecr-009900000000",
                "tracking": {
                    "createdBy": "[email protected]",
                    "createdAt": "2025-03-13T15:15:00.078Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedAt": "2025-03-13T15:15:00.078Z"
                }
            }
        }
    }
}

Running the query

If you haven't used our API before, see Using the Connect API for instructions. It explains how to authenticate your calls and suggests some tools for testing.

Query structure

Arguments

Arguments supported by the product object:

ArgumentValuesRequired?Definition
productIdIDRequiredThe ID of the product to get details for

Fields

The product query returns the following fields.

FieldValuesRequiredDescription
attributesArrayRequiredAn array of product attributes. There is a separate object for each attribute.
metadataObjectOptionalSee nested fields.

Fields supported by objects in the attributes array

Field ValuesRequired?Definition
nameStringRequiredThe name of a product attribute. Keep in mind this is an internal name, not the user-friendly label displayed in the GUI.
valueDepends on the type of attributeOptional The value set to the product attribute
typeOne of the following values:

- TEXT
- NUMBER
- BOOLEAN
- DATE
- ARRAY
- JSON
Optional The data format of the product attribute

Fields supported by the metadata object

FieldNested fieldValuesDescription
dataSetIdStringThe ID of your product catalog
trackingcreatedByStringThe login ID of the user who added the product to Connect
createdAtA date-time string at UTC, such as 2025-02-03T09:54:33ZShows when the product was added to Connect.
lastModifiedByStringThe login name of the user who last modified the product
lastModifiedAtA date-time string at UTC, such as 2025-02-03T09:54:33ZShows when the product was modified last time.