docs
  1. SCAYLE Resource Center
  2. Admin API
  3. Getting Started
  4. Identifiers

Identifiers

The Admin API allows you to request resources by using two types of identifiers:

  • id
  • referenceKey

When referring to a resource outside the SCAYLE ecosystem, you often have to provide a referenceKey as a unique identifier for the resource. However, if the resource was created by SCAYLE, it is assigned an internally unique identifier called id. You can choose between these two types of identifiers to request a resource.

The ID is an ecosystem-exclusive identifier. However, once you set a reference key, you can also refer to it internally.

Using the ID

let response = await client.apis.Products.getProduct({productIdentifier: 123});
let product = response.body;

Using the Reference Key

let response = await client.apis.Products.getProduct({productIdentifier: "key=my-key-123"});
let product = response.body;