Sign in

Map Skus to collections

POST https://{organization}.myguper.com/api/catalog/collection/query/by/{interface}

Given a list of SKU IDs, returns which collections (in the given interface) each SKU belongs to. A SKU matches a collection when:

  • it appears as an explicit SKU in collection_sku,
  • it falls inside a numeric range in collection_sku_ranges (sku_start <= sku <= sku_end),
  • it matches a LIKE pattern in collection_sku_pattern (e.g. ot%, %ot, %ot%, case-insensitive),
  • or the collection has no SKU/range/pattern declared for that interface (empty-collection fallback: such collections are returned for every SKU).

Try-it values populated from environment ACME (Demo)


Authentication

Token

Send your user token in the x-guper-authorization header.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Path parameters

Name Type Description
interface * string External interface (e.g. ecommerce, vtex) used to look up SKUs/ranges/patterns.

Request body

Content-Type: json

[
    "OT123", "abc", "550"
]

Responses

{
    "OT123": {
        "id": "OT123",
        "collection": [
            2,
            17
        ]
    },
    "abc": {
        "id": "abc",
        "collection": [
            2
        ]
    },
    "550": {
        "id": "550",
        "collection": [
            2,
            9
        ]
    }
}
Copied to clipboard