Entrar

Map Skus to collections

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

Dada uma lista de SKUs, retorna as coleções (na interface informada) a que cada SKU pertence. Um SKU casa com uma coleção quando:

  • aparece como SKU explícito em collection_sku,
  • cai dentro de uma faixa numérica em collection_sku_ranges (sku_start <= sku <= sku_end),
  • casa com um padrão LIKE em collection_sku_pattern (ex: ot%, %ot, %ot%, case-insensitive),
  • ou a coleção não tem nenhum SKU/range/pattern cadastrado para aquela interface (fallback de coleção vazia: aparece para todos os SKUs).

Try-it values populated from environment ACME (Demo)


Autenticação

Token

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

Cabeçalhos

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.

Parâmetros do caminho

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

Corpo da requisição

Content-Type: json

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

Respostas

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