SDK Reference
@proveanything/smartlinks
npm install @proveanything/smartlinks
View on npm →Namespaces
Core Data & Configuration
variant
Manage product variants per product; includes serial number helpers.
8 functions3 types
getPublic
Get a single variant by ID for a collection and product (public endpoint).
public
getPublic(collectionId: string,
productId: string,
variantId: string) → Promise<>getSN
Get serial numbers for a variant (admin only).
public
getSN(collectionId: string,
productId: string,
variantId: string,
startIndex: number = 0,
count: number = 10) → Promise<any>lookupSN
Look up a serial number by code for a variant (admin only).
public
lookupSN(collectionId: string,
productId: string,
variantId: string,
codeId: string) → Promise<any>get
Get a single variant by ID for a collection and product (admin only).
public
get(collectionId: string,
productId: string,
variantId: string) → Promise<>list
List all variants for a collection and product (admin only).
public
list(collectionId: string,
productId: string) → Promise<[]>create
Create a new variant for a collection and product (admin only).
public
create(collectionId: string,
productId: string,
data: ) → Promise<>update
Update a variant for a collection and product (admin only).
public
update(collectionId: string,
productId: string,
variantId: string,
data: ) → Promise<>remove
Delete a variant for a collection and product (admin only).
public
remove(collectionId: string,
productId: string,
variantId: string) → Promise<void>