Class: ProductsService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:150
Products Service Manages all product-related operations with full type safety
Extends
BaseService
Constructors
Constructor
new ProductsService(
client):ProductsService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:12
Parameters
client
Returns
ProductsService
Inherited from
BaseService.constructor
Properties
client
protectedclient:TanqoryClient
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:10
Inherited from
BaseService.client
Methods
addGiftCardComment()
addGiftCardComment(
giftCardId,message,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2552
Add comment to gift card timeline
Parameters
giftCardId
string
Gift card identifier
message
string
Comment message
storeId
string
Store identifier
Returns
Promise<any>
Created comment
Example
const comment = await client.products.addGiftCardComment(
'gc-123',
'Customer requested balance check',
'store-123'
)
console.log(`Comment added: ${comment.data.id}`)
addProductsToCollection()
addProductsToCollection(
id,productIds,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:826
Add products to a manual collection
Parameters
id
string
Collection ID
productIds
string[]
Product IDs to add
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Updated collection
Example
const collection = await client.products.addProductsToCollection(
'col-123',
['prod-1', 'prod-2', 'prod-3'],
'store-123'
)
console.log(collection.data.productCount) // Updated count
adjustInventory()
adjustInventory(
storeId,adjustment):Promise<{barcode?:string;comparePrice?:number;cost?:number;countryOfOrigin?:string;hsCode?:string;id:string;imageUrl?:string;locations:object[];policy:"DENY"|"CONTINUE";price?:number;productId:string;productTitle:string;sku?:string;totalAvailable:number;totalCommitted:number;totalOnHand:number;totalUnavailable:number;tracked:boolean;updatedAt:Date;variantId:string;variantTitle?:string;weight?: {unit:"kg"|"g"|"lb"|"oz";value:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1281
Adjust inventory quantity with reason tracking
Parameters
storeId
string
Store identifier
adjustment
Inventory adjustment data
locationId
string
notes?
string
quantityChange
number
reason
"received" | "correction" | "count" | "return_restock" | "damaged" | "theft_or_loss" | "promotion_or_donation"
variantId
string
Returns
Promise<{ barcode?: string; comparePrice?: number; cost?: number; countryOfOrigin?: string; hsCode?: string; id: string; imageUrl?: string; locations: object[]; policy: "DENY" | "CONTINUE"; price?: number; productId: string; productTitle: string; sku?: string; totalAvailable: number; totalCommitted: number; totalOnHand: number; totalUnavailable: number; tracked: boolean; updatedAt: Date; variantId: string; variantTitle?: string; weight?: { unit: "kg" | "g" | "lb" | "oz"; value: number; }; }>
Created adjustment record
Example
const adjustment = await client.products.adjustInventory('store-123', {
variantId: 'var-123',
locationId: 'loc-456',
quantityChange: -5,
reason: 'damaged',
notes: 'Water damage during shipping'
})
console.log(adjustment.data.quantityAfter)
buildQuery()
protectedbuildQuery(options?):Record<string,any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:26
Build query parameters
Parameters
options?
Returns
Record<string, any>
Inherited from
BaseService.buildQuery
bulkAddPurchaseOrderTags()
bulkAddPurchaseOrderTags(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1751
Bulk add tags to purchase orders
Parameters
storeId
string
data
ids
string[]
tags
string[]
Returns
Promise<any>
bulkAddTransferTags()
bulkAddTransferTags(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2005
Bulk add tags to transfers
Parameters
storeId
string
data
ids
string[]
tags
string[]
Returns
Promise<any>
bulkDeactivateGiftCards()
bulkDeactivateGiftCards(
storeId,request):Promise<{deactivatedCount:number;failedIds:string[]; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2505
Bulk deactivate gift cards
Parameters
storeId
string
Store identifier
request
Bulk deactivation request
giftCardIds
string[]
Returns
Promise<{ deactivatedCount: number; failedIds: string[]; }>
Bulk deactivation results
Example
const result = await client.products.bulkDeactivateGiftCards('store-123', {
giftCardIds: ['gc-1', 'gc-2', 'gc-3']
})
console.log(`Deactivated: ${result.data.deactivatedCount}`)
bulkDelete()
bulkDelete(
request,storeId):Promise<{deleted:number;failed:number;success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:563
Bulk delete products
Parameters
request
Bulk deletion request
ids
string[]
storeId
string
Store identifier
Returns
Promise<{ deleted: number; failed: number; success: boolean; }>
Bulk deletion results
Example
const result = await client.products.bulkDelete({
ids: ['prod-1', 'prod-2', 'prod-3']
}, 'store-123')
console.log(`Deleted: ${result.data.deleted}`)
bulkDeleteCollections()
bulkDeleteCollections(
ids,storeId):Promise<{deleted:number;failed:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1001
Bulk delete collections
Parameters
ids
string[]
Array of collection IDs
storeId
string
Store identifier
Returns
Promise<{ deleted: number; failed: number; }>
Deletion results
Example
const result = await client.products.bulkDeleteCollections(
['col-1', 'col-2'],
'store-123'
)
console.log(result.deleted)
bulkEdit()
bulkEdit(
storeId,data):Promise<{errors?:object[];productsUpdated:number;success:boolean;variantsUpdated:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:520
Bulk edit products and variants (heterogeneous per-item updates)
Parameters
storeId
string
data
products
object[]
variants
object[]
Returns
Promise<{ errors?: object[]; productsUpdated: number; success: boolean; variantsUpdated: number; }>
bulkPublishCollections()
bulkPublishCollections(
ids,storeId):Promise<{failed:number;published:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1027
Bulk publish collections
Parameters
ids
string[]
Array of collection IDs
storeId
string
Store identifier
Returns
Promise<{ failed: number; published: number; }>
Publish results
Example
const result = await client.products.bulkPublishCollections(
['col-1', 'col-2'],
'store-123'
)
bulkRemovePurchaseOrderTags()
bulkRemovePurchaseOrderTags(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1761
Bulk remove tags from purchase orders
Parameters
storeId
string
data
ids
string[]
tags
string[]
Returns
Promise<any>
bulkRemoveTransferTags()
bulkRemoveTransferTags(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2013
Bulk remove tags from transfers
Parameters
storeId
string
data
ids
string[]
tags
string[]
Returns
Promise<any>
bulkSendGiftCards()
bulkSendGiftCards(
storeId,request):Promise<{failedIds:string[];sentCount:number;skippedIds:string[]; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2523
Bulk send gift cards to their recipients
Parameters
storeId
string
Store identifier
request
Bulk send request
giftCardIds
string[]
Returns
Promise<{ failedIds: string[]; sentCount: number; skippedIds: string[]; }>
Bulk send results
bulkSetAvailable()
bulkSetAvailable(
storeId,params):Promise<{data: {errors:object[];failed:number;success:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1388
Bulk set available quantities
Parameters
storeId
string
Store identifier
params
items
object[]
Returns
Promise<{ data: { errors: object[]; failed: number; success: number; }; }>
Result with success/failed counts
Example
const result = await client.products.bulkSetAvailable('store-123', {
items: [
{ variantId: 'var-1', locationId: 'loc-1', available: 50 },
{ variantId: 'var-2', locationId: 'loc-1', available: 30 }
]
})
console.log(`Updated ${result.data.success} items`)
bulkSetUnavailableBreakdown()
bulkSetUnavailableBreakdown(
storeId,params):Promise<{data: {errors:object[];failed:number;success:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1469
Bulk set unavailable breakdown
Parameters
storeId
string
Store identifier
params
items
object[]
Returns
Promise<{ data: { errors: object[]; failed: number; success: number; }; }>
Result with success/failed counts
Example
const result = await client.products.bulkSetUnavailableBreakdown('store-123', {
items: [
{ variantId: 'var-1', locationId: 'loc-1', breakdown: { damaged: 2 } },
{ variantId: 'var-2', locationId: 'loc-1', breakdown: { qualityControl: 1 } }
]
})
bulkUnpublishCollections()
bulkUnpublishCollections(
ids,storeId):Promise<{failed:number;unpublished:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1053
Bulk unpublish collections
Parameters
ids
string[]
Array of collection IDs
storeId
string
Store identifier
Returns
Promise<{ failed: number; unpublished: number; }>
Unpublish results
Example
const result = await client.products.bulkUnpublishCollections(
['col-1', 'col-2'],
'store-123'
)
bulkUpdate()
bulkUpdate(
storeId,request):Promise<{failed:number;success:boolean;updated:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:506
Bulk update products
Parameters
storeId
string
Store identifier
request
Bulk update request
productIds
string[]
updates
{ category?: string; isVisible?: boolean; productType?: string; publishedChannels?: string[]; status?: "ACTIVE" | "DRAFT" | "ARCHIVED"; tags?: string[]; vendor?: string; }
updates.category?
string
updates.isVisible?
boolean
updates.productType?
string
updates.publishedChannels?
string[]
updates.status?
"ACTIVE" | "DRAFT" | "ARCHIVED"
updates.tags?
string[]
updates.vendor?
string
Returns
Promise<{ failed: number; success: boolean; updated: number; }>
Bulk update results
Example
const result = await client.products.bulkUpdate('store-123', {
productIds: ['prod-1', 'prod-2', 'prod-3'],
updates: {
status: 'ACTIVE',
tags: ['featured']
}
})
console.log(`Updated: ${result.data.updated}`)
checkGiftCardBalance()
checkGiftCardBalance(
storeId,code):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2636
Check gift card balance by code Used at checkout to validate and display available balance
Parameters
storeId
string
Store identifier
code
string
Gift card code (e.g., XXXX-XXXX-XXXX-XXXX)
Returns
Promise<any>
Gift card balance information
Example
const balance = await client.products.checkGiftCardBalance('store-123', 'ABCD-1234-EFGH-5678')
if (balance.data.canUse) {
console.log(`Available: ${balance.data.currentBalance.amount}`)
} else {
console.log(`Error: ${balance.data.errorMessage}`)
}
create()
create(
storeId,data):Promise<{basePrice?: {amount:number;currency:string; };catalogs?:string[];category?:string;categoryAttributes?:object[];collections?:string[];compareAtPrice?: {amount:number;currency:string; };countryOfOrigin?:string;createdAt:Date;description?:string;giftCardTemplate?:string;handle:string;hasMultipleVariants:boolean;hsCode?:string;id:string;inventoryTracked:boolean;isGiftCard?:boolean;isVisible?:boolean;media?:object[];metafields?:object[];options?:object[];orderCount:number;packageId?:string;price: {amount:number;currency:string; };productType?:string;publishedAt?:Date;publishedChannels?:string[];seo?: {description?:string;handle?:string;keywords?:string[];title?:string; };status:"ACTIVE"|"DRAFT"|"ARCHIVED";storeId:string;tags?:string[];title:string;totalInventory:number;updatedAt:Date;variants:object[];vendor?:string;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:434
Create a new product
Parameters
storeId
string
Store identifier
data
Product creation data
barcode?
string
catalogs?
string[]
category?
string
categoryAttributes?
object[]
collections?
string[]
comparePrice?
number
cost?
number
countryOfOrigin?
string
description?
string
giftCardTemplate?
string
hsCode?
string
inventoryQty?
number
isDigital?
boolean
isGiftCard?
boolean
isVisible?
boolean
locationInventory?
object[]
media?
object[]
metafields?
object[]
options?
object[]
packageId?
string
price?
number
productType?
string
publishedChannels?
string[]
sellingPlanGroupIds?
string[]
seo?
{ description?: string; handle?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.handle?
string
seo.keywords?
string[]
seo.title?
string
sku?
string
status?
"ACTIVE" | "DRAFT" | "ARCHIVED"
tags?
string[]
taxable?
boolean
title
string
trackInventory?
boolean
variants?
object[]
vendor?
string
weight?
{ unit: "kg" | "g" | "lb" | "oz"; value: number; }
weight.unit
"kg" | "g" | "lb" | "oz"
weight.value
number
Returns
Promise<{ basePrice?: { amount: number; currency: string; }; catalogs?: string[]; category?: string; categoryAttributes?: object[]; collections?: string[]; compareAtPrice?: { amount: number; currency: string; }; countryOfOrigin?: string; createdAt: Date; description?: string; giftCardTemplate?: string; handle: string; hasMultipleVariants: boolean; hsCode?: string; id: string; inventoryTracked: boolean; isGiftCard?: boolean; isVisible?: boolean; media?: object[]; metafields?: object[]; options?: object[]; orderCount: number; packageId?: string; price: { amount: number; currency: string; }; productType?: string; publishedAt?: Date; publishedChannels?: string[]; seo?: { description?: string; handle?: string; keywords?: string[]; title?: string; }; status: "ACTIVE" | "DRAFT" | "ARCHIVED"; storeId: string; tags?: string[]; title: string; totalInventory: number; updatedAt: Date; variants: object[]; vendor?: string; viewCount: number; }>
Created product
Example
const product = await client.products.create('store-123', {
title: 'iPhone 15 Pro',
description: 'Latest Apple smartphone with titanium design',
media: [{
url: 'https://cdn.example.com/iphone15.jpg',
alt: 'iPhone 15 Pro',
type: 'image',
position: 0
}],
status: 'ACTIVE',
category: 'Electronics',
productType: 'Smartphone',
vendor: 'Apple',
tags: ['new', 'flagship'],
variants: [{
title: '256GB Natural Titanium',
sku: 'IPH15-PRO-256-NT',
barcode: '0194253778646',
price: 39900,
compareAtPrice: 42900,
cost: 30000,
taxable: true,
requiresShipping: true, // Per-variant (Tanqory standard)
trackQuantity: true,
quantity: 50,
weight: { value: 221, unit: 'g' },
dimensions: { length: 14.7, width: 7.09, height: 0.83, unit: 'cm' }
}],
seo: {
title: 'iPhone 15 Pro - Buy Now',
description: 'Get the latest iPhone 15 Pro with titanium design',
keywords: ['iphone', 'apple', 'smartphone']
}
})
createCollection()
createCollection(
storeId,data):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:750
Create a new collection
Parameters
storeId
string
Store identifier
data
Collection creation data
collectionType
"MANUAL" | "SMART"
description?
string
disjunctive?
boolean
image?
{ alt?: string; position: number; type: "image" | "video" | "3d-model"; url: string; }
image.alt?
string
image.position
number
image.type
"image" | "video" | "3d-model"
image.url
string
imageAlt?
string
imageUrl?
string
mediaId?
string
metafields?
object[]
productIds?
string[]
publishedChannels?
string[]
rules?
object[]
scheduledPublishAt?
Date
seo?
{ description?: string; handle?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.handle?
string
seo.keywords?
string[]
seo.title?
string
sortOrder?
"manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"
themeTemplate?
string
title
string
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Created collection
Example
// Manual collection
const manual = await client.products.createCollection('store-123', {
title: 'Summer Sale',
description: 'Hot deals for summer',
collectionType: 'MANUAL',
productIds: ['prod-1', 'prod-2']
})
// Smart collection
const smart = await client.products.createCollection('store-123', {
title: 'Electronics',
collectionType: 'SMART',
rules: [{
column: 'type',
relation: 'equals',
condition: 'Electronics'
}]
})
createCollectionView()
createCollectionView(
data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2995
Create a new collection view
Parameters
data
any
Collection view data
storeId
string
Store identifier
Returns
Promise<any>
Created collection view
createGiftCard()
createGiftCard(
storeId,data):Promise<{code:string;createdAt:Date;currentBalance: {amount:number;currency:string; };customerEmail?:string;customerId?:string;customerName?:string;expiresAt?:Date;id:string;initialBalance: {amount:number;currency:string; };issuedAt:Date;lastUsedAt?:Date;notes?:string;recipientEmail?:string;recipientName?:string;status:"ACTIVE"|"PARTIAL"|"REDEEMABLE"|"FULL"|"EMPTY"|"DEACTIVATED";storeId:string;timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2399
Create a new gift card
Parameters
storeId
string
Store identifier
data
Gift card creation data
code?
string
customerEmail?
string
customerId?
string
customerName?
string
expiresAt?
Date
initialBalance
{ amount: number; currency: string; }
initialBalance.amount
number
initialBalance.currency
string
notes?
string
recipientEmail?
string
recipientName?
string
Returns
Promise<{ code: string; createdAt: Date; currentBalance: { amount: number; currency: string; }; customerEmail?: string; customerId?: string; customerName?: string; expiresAt?: Date; id: string; initialBalance: { amount: number; currency: string; }; issuedAt: Date; lastUsedAt?: Date; notes?: string; recipientEmail?: string; recipientName?: string; status: "ACTIVE" | "PARTIAL" | "REDEEMABLE" | "FULL" | "EMPTY" | "DEACTIVATED"; storeId: string; timeline: object[]; updatedAt: Date; }>
Created gift card
Example
const giftCard = await client.products.createGiftCard('store-123', {
initialBalance: { amount: 1000, currency: 'THB' },
expiresAt: '2025-12-31',
recipientName: 'Jane Doe',
notes: 'Birthday gift'
})
console.log(giftCard.data.code) // Generated code
createInventoryView()
createInventoryView(
data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3082
Parameters
data
any
storeId
string
Returns
Promise<any>
createProductView()
createProductView(
data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2888
Create a new product view
Parameters
data
any
Product view data
storeId
string
Store identifier
Returns
Promise<any>
Created product view
createPurchaseOrder()
createPurchaseOrder(
storeId,data):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1713
Create a new purchase order
Parameters
storeId
string
Store identifier
data
Purchase order creation data
carrierId?
string
currency
string
destinationId
string
estimatedArrival?
Date
items
object[]
noteToSupplier?
string
paymentTerms?
"NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"
referenceNumber?
string
shippingCarrier?
string
supplierId
string
tags?
string[]
trackingNumber?
string
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
Created purchase order
Example
const po = await client.products.createPurchaseOrder('store-123', {
supplierId: 'sup-123',
destinationId: 'loc-456',
items: [{
variantId: 'var-789',
quantity: 100,
cost: 25000,
supplierSku: 'SUPPLIER-SKU-123'
}],
paymentTerms: 'NET_30',
currency: 'THB',
estimatedArrival: '2024-02-01',
noteToSupplier: 'Please pack items carefully'
})
createPurchaseOrderView()
createPurchaseOrderView(
data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3184
Parameters
data
any
storeId
string
Returns
Promise<any>
createShipment()
createShipment(
storeId,shipment):Promise<{carrierId?:string;carrierName?:string;createdAt:Date;estimatedArrival?:Date;id:string;items:object[];receipts?:object[];receivedAt?:Date;shipmentNumber:string;shippedAt?:Date;shippingCarrier?:string;status:"received"|"draft"|"in_transit";trackingLastSyncAt?:Date;trackingNumber?:string;trackingRegisteredAt?:Date;trackingRegistrationStatus?:"PENDING"|"EXPIRED"|"FAILED"|"REGISTERED";trackingUrl?:string;transferId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2105
Create a shipment for a transfer
Parameters
storeId
string
Store identifier
shipment
Shipment creation data
carrierId?
string
carrierName?
string
estimatedArrival?
Date
items
object[]
shippingCarrier?
string
trackingNumber?
string
transferId
string
Returns
Promise<{ carrierId?: string; carrierName?: string; createdAt: Date; estimatedArrival?: Date; id: string; items: object[]; receipts?: object[]; receivedAt?: Date; shipmentNumber: string; shippedAt?: Date; shippingCarrier?: string; status: "received" | "draft" | "in_transit"; trackingLastSyncAt?: Date; trackingNumber?: string; trackingRegisteredAt?: Date; trackingRegistrationStatus?: "PENDING" | "EXPIRED" | "FAILED" | "REGISTERED"; trackingUrl?: string; transferId: string; updatedAt: Date; }>
Created shipment
Example
const shipment = await client.products.createShipment('store-123', {
transferId: 'trans-123',
items: [{
transferItemId: 'item-1',
quantity: 50
}],
estimatedArrival: '2024-02-01',
trackingNumber: 'SHIP123456',
shippingCarrier: 'Kerry Express'
})
createSupplier()
createSupplier(
storeId,data):Promise<{address?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };archivedAt?:Date;company:string;contactName?:string;createdAt:Date;currency:string;email?:string;id:string;isArchived?:boolean;notes?:string;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";phone?:string;storeId:string;totalOrders:number;totalSpent: {amount:number;currency:string; };updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1576
Create a new supplier
Parameters
storeId
string
Store identifier
data
Supplier creation data
address?
{ address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }
address.address1
string
address.address2?
string
address.city
string
address.company?
string
address.country
string
address.firstName?
string
address.lastName?
string
address.phone?
string
address.postalCode
string
address.province
string
company
string
contactName?
string
email?
string
notes?
string
paymentTerms?
"NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"
phone?
string
Returns
Promise<{ address?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; archivedAt?: Date; company: string; contactName?: string; createdAt: Date; currency: string; email?: string; id: string; isArchived?: boolean; notes?: string; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; phone?: string; storeId: string; totalOrders: number; totalSpent: { amount: number; currency: string; }; updatedAt: Date; }>
Created supplier
Example
const supplier = await client.products.createSupplier('store-123', {
company: 'Tech Supplies Co.',
contactName: 'John Doe',
phone: '+66-2-123-4567',
address: {
address1: '123 Industry Rd',
city: 'Bangkok',
province: 'Bangkok',
country: 'TH',
postalCode: '10110'
},
currency: 'THB',
paymentTerms: 'NET_30'
})
createTransfer()
createTransfer(
storeId,data):Promise<{createdAt:Date;destinationId:string;destinationIsActive?:boolean;destinationName:string;id:string;items:object[];notes?:string;originId:string;originIsActive?:boolean;originName:string;referenceNumber?:string;shipments:object[];status:"DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED";storeId:string;tags:string[];timeline:object[];transferNumber:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1973
Create a new inventory transfer
Parameters
storeId
string
Store identifier
data
Transfer creation data
destinationId
string
items
object[]
notes?
string
originId
string
referenceNumber?
string
tags?
string[]
Returns
Promise<{ createdAt: Date; destinationId: string; destinationIsActive?: boolean; destinationName: string; id: string; items: object[]; notes?: string; originId: string; originIsActive?: boolean; originName: string; referenceNumber?: string; shipments: object[]; status: "DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED"; storeId: string; tags: string[]; timeline: object[]; transferNumber: string; updatedAt: Date; }>
Created transfer
Example
const transfer = await client.products.createTransfer('store-123', {
originId: 'loc-warehouse',
destinationId: 'loc-retail',
items: [{
variantId: 'var-123',
quantity: 50
}],
referenceNumber: 'REF-2024-001',
notes: 'Stock up for weekend sale'
})
createTransferView()
createTransferView(
data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3133
Parameters
data
any
storeId
string
Returns
Promise<any>
deactivateGiftCard()
deactivateGiftCard(
id,storeId):Promise<{code:string;createdAt:Date;currentBalance: {amount:number;currency:string; };customerEmail?:string;customerId?:string;customerName?:string;expiresAt?:Date;id:string;initialBalance: {amount:number;currency:string; };issuedAt:Date;lastUsedAt?:Date;notes?:string;recipientEmail?:string;recipientName?:string;status:"ACTIVE"|"PARTIAL"|"REDEEMABLE"|"FULL"|"EMPTY"|"DEACTIVATED";storeId:string;timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2450
Deactivate a gift card
Parameters
id
string
Gift card ID
storeId
string
Store identifier
Returns
Promise<{ code: string; createdAt: Date; currentBalance: { amount: number; currency: string; }; customerEmail?: string; customerId?: string; customerName?: string; expiresAt?: Date; id: string; initialBalance: { amount: number; currency: string; }; issuedAt: Date; lastUsedAt?: Date; notes?: string; recipientEmail?: string; recipientName?: string; status: "ACTIVE" | "PARTIAL" | "REDEEMABLE" | "FULL" | "EMPTY" | "DEACTIVATED"; storeId: string; timeline: object[]; updatedAt: Date; }>
Updated gift card
Example
const giftCard = await client.products.deactivateGiftCard('gc-123', 'store-123')
console.log(giftCard.data.status) // 'DEACTIVATED'
delete()
delete(
id,storeId):Promise<{deleted:true;id:string;object:"product"; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:483
Delete a product
Parameters
id
string
Product ID
storeId
string
Store identifier
Returns
Promise<{ deleted: true; id: string; object: "product"; }>
Deletion confirmation
Example
const response = await client.products.delete('prod-123', 'store-123')
console.log(response.data.deleted) // true
deleteCollection()
deleteCollection(
id,storeId):Promise<{deletedId:string;success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:801
Delete a collection
Parameters
id
string
Collection ID
storeId
string
Store identifier
Returns
Promise<{ deletedId: string; success: boolean; }>
Deletion confirmation
Example
const response = await client.products.deleteCollection('col-123', 'store-123')
console.log(response.data.deleted) // true
deleteCollectionView()
deleteCollectionView(
id,storeId):Promise<boolean>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3022
Delete a collection view
Parameters
id
string
Collection view ID
storeId
string
Store identifier
Returns
Promise<boolean>
Success status
deleteGiftCardComment()
deleteGiftCardComment(
giftCardId,commentId,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2607
Delete gift card comment
Parameters
giftCardId
string
Gift card identifier
commentId
string
Comment identifier
storeId
string
Store identifier
Returns
Promise<any>
Deletion confirmation
Example
await client.products.deleteGiftCardComment(
'gc-123',
'comment-456',
'store-123'
)
deleteInventoryView()
deleteInventoryView(
id,storeId):Promise<boolean>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3094
Parameters
id
string
storeId
string
Returns
Promise<boolean>
deleteProductView()
deleteProductView(
id,storeId):Promise<boolean>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2915
Delete a product view
Parameters
id
string
Product view ID
storeId
string
Store identifier
Returns
Promise<boolean>
Success status
deletePurchaseOrderView()
deletePurchaseOrderView(
id,storeId):Promise<boolean>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3196
Parameters
id
string
storeId
string
Returns
Promise<boolean>
deleteSupplier()
deleteSupplier(
id,storeId):Promise<{deletedId:string;success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1627
Delete a supplier
Parameters
id
string
Supplier ID
storeId
string
Store identifier
Returns
Promise<{ deletedId: string; success: boolean; }>
Deletion confirmation
Example
const response = await client.products.deleteSupplier('sup-123', 'store-123')
console.log(response.data.deleted) // true
deleteTransfer()
deleteTransfer(
id,storeId):Promise<{success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2061
Delete a transfer (only DRAFT transfers can be deleted)
Parameters
id
string
Transfer ID
storeId
string
Store identifier
Returns
Promise<{ success: boolean; }>
Success status
Example
await client.products.deleteTransfer('trans-123', 'store-123')
deleteTransferView()
deleteTransferView(
id,storeId):Promise<boolean>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3145
Parameters
id
string
storeId
string
Returns
Promise<boolean>
deleteVariant()
deleteVariant(
storeId,variantId):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2848
Delete a variant Cannot delete the last variant of a product
Parameters
storeId
string
variantId
string
Returns
Promise<void>
Example
await client.products.deleteVariant('store-123', 'variant-456')
duplicateCollectionView()
duplicateCollectionView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3034
Duplicate a collection view
Parameters
id
string
Collection view ID
storeId
string
Store identifier
Returns
Promise<any>
Duplicated collection view
duplicateInventoryView()
duplicateInventoryView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3099
Parameters
id
string
storeId
string
Returns
Promise<any>
duplicateProductView()
duplicateProductView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2927
Duplicate a product view
Parameters
id
string
Product view ID
storeId
string
Store identifier
Returns
Promise<any>
Duplicated product view
duplicatePurchaseOrderView()
duplicatePurchaseOrderView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3201
Parameters
id
string
storeId
string
Returns
Promise<any>
duplicateTransferView()
duplicateTransferView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3150
Parameters
id
string
storeId
string
Returns
Promise<any>
editGiftCardComment()
editGiftCardComment(
giftCardId,commentId,message,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2577
Edit gift card comment
Parameters
giftCardId
string
Gift card identifier
commentId
string
Comment identifier
message
string
Updated message
storeId
string
Store identifier
Returns
Promise<any>
Updated comment
Example
const comment = await client.products.editGiftCardComment(
'gc-123',
'comment-456',
'Updated: Customer confirmed balance',
'store-123'
)
generateIdempotencyKey()
protectedgenerateIdempotencyKey(prefix):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:19
Generate idempotency key
Parameters
prefix
string
Returns
string
Inherited from
BaseService.generateIdempotencyKey
getCollectionCounts()
getCollectionCounts(
storeId):Promise<{data: {all:number;draft:number;manual:number;published:number;smart:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:619
Get collection counts by type and status Lightweight API for getting counts without fetching data
Parameters
storeId
string
Store identifier
Returns
Promise<{ data: { all: number; draft: number; manual: number; published: number; smart: number; }; }>
Collection counts by type and status
Example
const counts = await client.products.getCollectionCounts('store-123')
console.log(counts.data.all) // Total collections
console.log(counts.data.manual) // Manual collections
console.log(counts.data.smart) // Smart collections
getCollectionCountsTimeseries()
getCollectionCountsTimeseries(
storeId,params):Promise<{all:object[];draft:object[];manual:object[];published:object[];smart:object[]; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:646
Get collection counts time-series data grouped by date
Parameters
storeId
string
Store identifier
params
TimeseriesParams
Time-series parameters (from, to, groupBy)
Returns
Promise<{ all: object[]; draft: object[]; manual: object[]; published: object[]; smart: object[]; }>
Time-series data keyed by type and status
getCollectionProducts()
getCollectionProducts(
id,storeId,params?):Promise<{data:unknown[];meta: {limit:number;page:number;total:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1121
Get products in a collection with pagination
Parameters
id
string
Collection ID
storeId
string
Store identifier
params?
Pagination parameters
limit?
number
page?
number
Returns
Promise<{ data: unknown[]; meta: { limit: number; page: number; total: number; }; }>
Products in the collection
Example
const products = await client.products.getCollectionProducts('col-123', 'store-123', {
page: 1,
limit: 20
})
getCollectionView()
getCollectionView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2982
Get a specific collection view
Parameters
id
string
Collection view ID
storeId
string
Store identifier
Returns
Promise<any>
Collection view
getCounts()
getCounts(
storeId,previousPeriodDate?):Promise<{active:number;all:number;archived:number;averagePrice:number;draft:number;lowStock:number;outOfStock:number;previous?: {active:number;all:number;archived:number;draft:number;lowStock:number;outOfStock:number; };totalInventory:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:170
Get product counts by status Lightweight API for getting counts without fetching data
Parameters
storeId
string
Store identifier
previousPeriodDate?
string
Returns
Promise<{ active: number; all: number; archived: number; averagePrice: number; draft: number; lowStock: number; outOfStock: number; previous?: { active: number; all: number; archived: number; draft: number; lowStock: number; outOfStock: number; }; totalInventory: number; }>
Product counts by status
Example
const counts = await client.products.getCounts('store-123')
console.log(counts.data.all) // Total products
console.log(counts.data.active) // Active products
console.log(counts.data.lowStock) // Low stock products
getCountsTimeseries()
getCountsTimeseries(
storeId,params):Promise<{active:object[];all:object[];archived:object[];averagePrice:object[];draft:object[];lowStock:object[];outOfStock:object[];totalInventory:object[]; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:221
Get product counts time-series data grouped by date
Parameters
storeId
string
Store identifier
params
TimeseriesParams
Time-series parameters (from, to, groupBy)
Returns
Promise<{ active: object[]; all: object[]; archived: object[]; averagePrice: object[]; draft: object[]; lowStock: object[]; outOfStock: object[]; totalInventory: object[]; }>
Time-series data keyed by status
getExportMimeType()
protectedgetExportMimeType(format):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:45
Get MIME type for export format
Parameters
format
string
Returns
string
Inherited from
BaseService.getExportMimeType
getGiftCardCounts()
getGiftCardCounts(
storeId):Promise<{data: {active:number;all:number;deactivated:number;empty:number;expired:number;partial:number; };success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2271
Get gift card counts by status Lightweight API for getting counts without fetching data
Parameters
storeId
string
Store identifier
Returns
Promise<{ data: { active: number; all: number; deactivated: number; empty: number; expired: number; partial: number; }; success: boolean; }>
Gift card counts by status
Example
const counts = await client.products.getGiftCardCounts('store-123')
console.log(counts.data.all) // Total gift cards
console.log(counts.data.active) // Active gift cards
console.log(counts.data.partial) // Partially used gift cards
console.log(counts.data.empty) // Empty gift cards
console.log(counts.data.deactivated) // Deactivated gift cards
console.log(counts.data.expired) // Expired gift cards
getGiftCardCountsTimeseries()
getGiftCardCountsTimeseries(
storeId,params):Promise<{data: {active:object[];all:object[];deactivated:object[];empty:object[];partial:object[]; };success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2302
Get gift card counts timeseries for analytics charts
Parameters
storeId
string
Store identifier
params
Time-series parameters (from, to, groupBy)
from
string
groupBy?
"day" | "week" | "month"
to
string
Returns
Promise<{ data: { active: object[]; all: object[]; deactivated: object[]; empty: object[]; partial: object[]; }; success: boolean; }>
Time-series data keyed by status
getInventoryCounts()
getInventoryCounts(
storeId,locationId?):Promise<{data: {all:number;inStock:number;lowStock:number;outOfStock:number; };success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1153
Get inventory counts by stock status Lightweight API for getting counts without fetching data
Parameters
storeId
string
Store identifier
locationId?
string
Optional location ID to filter by
Returns
Promise<{ data: { all: number; inStock: number; lowStock: number; outOfStock: number; }; success: boolean; }>
Inventory counts by stock status
Example
const counts = await client.products.getInventoryCounts('store-123')
console.log(counts.data.all) // Total items
console.log(counts.data.inStock) // In stock
console.log(counts.data.lowStock) // Low stock
console.log(counts.data.outOfStock) // Out of stock
getInventoryCountsTimeseries()
getInventoryCountsTimeseries(
storeId,params):Promise<{data: {inStockItems:object[];lowStockItems:object[];outOfStockItems:object[];totalItems:object[];totalLocations:object[];totalUnits:object[]; };success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1185
Get inventory counts timeseries for analytics charts
Parameters
storeId
string
Store identifier
params
InventoryTimeseriesParams
Query parameters (from, to, optional locationId, optional groupBy)
Returns
Promise<{ data: { inStockItems: object[]; lowStockItems: object[]; outOfStockItems: object[]; totalItems: object[]; totalLocations: object[]; totalUnits: object[]; }; success: boolean; }>
Timeseries data for inventory metrics
getInventoryHistory()
getInventoryHistory(
variantId,storeId,options?):Promise<PaginatedResponse<{available?:number;committed?:number;createdAt:Date;id:string;incoming?:number;location?: {id:string;name:string; };locationId:string;notes?:string;onHand?:number;quantityAfter:number;quantityBefore:number;quantityChange:number;reason:"received"|"correction"|"count"|"return_restock"|"damaged"|"theft_or_loss"|"promotion_or_donation";referenceId?:string;referenceType?:string;type?:"PURCHASE"|"ADJUSTMENT"|"SALE"|"RETURN"|"TRANSFER"|"DAMAGE";unavailable?:number;userId?:string;userName?:string;variantId:string; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1315
Get inventory adjustment history for a variant
Parameters
variantId
string
Variant ID
storeId
string
Store identifier
options?
Query options for pagination and filtering
fromDate?
string | Date
limit?
number
locationId?
string
page?
number
toDate?
string | Date
Returns
Promise<PaginatedResponse<{ available?: number; committed?: number; createdAt: Date; id: string; incoming?: number; location?: { id: string; name: string; }; locationId: string; notes?: string; onHand?: number; quantityAfter: number; quantityBefore: number; quantityChange: number; reason: "received" | "correction" | "count" | "return_restock" | "damaged" | "theft_or_loss" | "promotion_or_donation"; referenceId?: string; referenceType?: string; type?: "PURCHASE" | "ADJUSTMENT" | "SALE" | "RETURN" | "TRANSFER" | "DAMAGE"; unavailable?: number; userId?: string; userName?: string; variantId: string; }>>
List of inventory adjustments
Example
const history = await client.products.getInventoryHistory('var-123', 'store-123', {
page: 1,
limit: 20,
locationId: 'loc-456'
})
history.data.forEach(adj => {
console.log(`${adj.createdAt}: ${adj.quantityChange} (${adj.reason})`)
})
getInventoryView()
getInventoryView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3076
Parameters
id
string
storeId
string
Returns
Promise<any>
getProductView()
getProductView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2875
Get a specific product view
Parameters
id
string
Product view ID
storeId
string
Store identifier
Returns
Promise<any>
Product view
getPurchaseOrderTagsPaginated()
getPurchaseOrderTagsPaginated(
storeId,params?):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1741
Get all purchase order tags (paginated)
Parameters
storeId
string
params?
limit?
number
page?
number
search?
string
Returns
Promise<any>
getPurchaseOrderTagSuggestions()
getPurchaseOrderTagSuggestions(
storeId,params?):Promise<string[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1728
Get purchase order tag suggestions
Parameters
storeId
string
params?
search?
string
Returns
Promise<string[]>
getPurchaseOrderView()
getPurchaseOrderView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3178
Parameters
id
string
storeId
string
Returns
Promise<any>
getTagSuggestions()
getTagSuggestions(
storeId,search?):Promise<string[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:260
Get tag suggestions from existing products Tags are aggregated from all products in the store and cached server-side
Parameters
storeId
string
Store identifier
search?
string
Optional search string to filter tags
Returns
Promise<string[]>
Array of tag suggestions
getTagSuggestionsPaginated()
getTagSuggestionsPaginated(
storeId,options?):Promise<{limit:number;page:number;tags:string[];total:number;totalPages:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:287
Get paginated tag suggestions for "View all tags" modal
Parameters
storeId
string
Store identifier
options?
Pagination and search options
limit?
number
page?
number
search?
string
Returns
Promise<{ limit: number; page: number; tags: string[]; total: number; totalPages: number; }>
Paginated tag suggestions
getTransferCounts()
getTransferCounts(
storeId):Promise<{data: {all:number;draft:number;in_transit:number;ready_to_ship:number;transferred:number; };success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1892
Get transfer counts by status
Parameters
storeId
string
Store identifier
Returns
Promise<{ data: { all: number; draft: number; in_transit: number; ready_to_ship: number; transferred: number; }; success: boolean; }>
Transfer counts by status
Example
const counts = await client.products.getTransferCounts('store-123')
console.log(counts.data.all) // Total transfers
console.log(counts.data.draft) // Draft transfers
console.log(counts.data.in_transit) // In transit
getTransferTagsPaginated()
getTransferTagsPaginated(
storeId,params?):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1997
Get all transfer tags (paginated)
Parameters
storeId
string
params?
limit?
number
page?
number
search?
string
Returns
Promise<any>
getTransferTagSuggestions()
getTransferTagSuggestions(
storeId,params?):Promise<string[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1984
Get transfer tag suggestions
Parameters
storeId
string
params?
search?
string
Returns
Promise<string[]>
getTransferTimeseries()
getTransferTimeseries(
storeId,params):Promise<{data: {all:object[];draft:object[];in_transit:object[];ready_to_ship:object[];transferred:object[]; };success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1921
Get transfer counts time-series data grouped by date
Parameters
storeId
string
Store identifier
params
Time-series parameters (from, to, groupBy)
from
string
groupBy?
"day" | "week" | "month"
to
string
Returns
Promise<{ data: { all: object[]; draft: object[]; in_transit: object[]; ready_to_ship: object[]; transferred: object[]; }; success: boolean; }>
Time-series data keyed by status
getTransferView()
getTransferView(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3127
Parameters
id
string
storeId
string
Returns
Promise<any>
getVendorSuggestions()
getVendorSuggestions(
storeId,search?):Promise<string[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:274
Get vendor suggestions from existing products Vendors are aggregated from all products in the store and cached server-side
Parameters
storeId
string
Store identifier
search?
string
Optional search string to filter vendors
Returns
Promise<string[]>
Array of vendor suggestions
getVendorSuggestionsPaginated()
getVendorSuggestionsPaginated(
storeId,options?):Promise<{limit:number;page:number;total:number;totalPages:number;vendors:string[]; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:313
Get paginated vendor suggestions for "View all vendors" modal
Parameters
storeId
string
Store identifier
options?
Pagination and search options
limit?
number
page?
number
search?
string
Returns
Promise<{ limit: number; page: number; total: number; totalPages: number; vendors: string[]; }>
Paginated vendor suggestions
importInventory()
importInventory(
storeId,file):Promise<{errors:object[];failed:number;success:boolean;updated:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2762
Import inventory from CSV file
Parameters
storeId
string
Store identifier
file
FormData
CSV file to import
Returns
Promise<{ errors: object[]; failed: number; success: boolean; updated: number; }>
Import results
Example
const formData = new FormData()
formData.append('file', csvFile)
const result = await client.products.importInventory('store-123', formData)
console.log(`Updated: ${result.data.updated}`)
console.log(`Failed: ${result.data.failed}`)
importProducts()
importProducts(
storeId,file):Promise<{errors:object[];failed:number;imported:number;success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2737
Import products from CSV file
Parameters
storeId
string
Store identifier
file
FormData
CSV file to import
Returns
Promise<{ errors: object[]; failed: number; imported: number; success: boolean; }>
Import results
Example
const formData = new FormData()
formData.append('file', csvFile)
const result = await client.products.importProducts('store-123', formData)
console.log(`Imported: ${result.imported}`)
console.log(`Failed: ${result.failed}`)
if (result.errors.length > 0) {
result.errors.forEach(err => {
console.log(`Row ${err.row}: ${err.message}`)
})
}
list()
list(
storeId,params?,options?):Promise<{data:object[];filters: {isGiftCard?:boolean;productType?:string;search?:string;searchBy?:"all"|"title"|"sku"|"variantTitle"|"barcode";status?:"ACTIVE"|"DRAFT"|"ARCHIVED";stockStatus?:"in_stock"|"low_stock"|"out_of_stock";vendor?:string; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:352
List all products with advanced filtering
Parameters
storeId
string
Store identifier
params?
Query parameters for filtering, sorting, and pagination
currencyCode?
string
isGiftCard?
boolean
limit?
number
marketId?
string
page?
number
productType?
string
search?
string
searchBy?
"all" | "title" | "sku" | "variantTitle" | "barcode"
sortBy?
string
sortOrder?
"asc" | "desc"
status?
"ACTIVE" | "DRAFT" | "ARCHIVED"
stockStatus?
"in_stock" | "low_stock" | "out_of_stock"
vendor?
string
options?
useCache?
boolean
Returns
Promise<{ data: object[]; filters: { isGiftCard?: boolean; productType?: string; search?: string; searchBy?: "all" | "title" | "sku" | "variantTitle" | "barcode"; status?: "ACTIVE" | "DRAFT" | "ARCHIVED"; stockStatus?: "in_stock" | "low_stock" | "out_of_stock"; vendor?: string; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Paginated list of products
Example
const products = await client.products.list('store-123', {
status: ['ACTIVE'],
category: ['Electronics'],
inventoryStatus: ['in_stock'],
priceMin: 1000,
priceMax: 50000,
page: 1,
limit: 20
})
listCollections()
listCollections(
storeId,params?,options?):Promise<{data:object[];filters: {collectionType?:"MANUAL"|"SMART";publishedChannels?:string[];search?:string; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:684
List all collections
Parameters
storeId
string
Store identifier
params?
Query parameters
collectionType?
"MANUAL" | "SMART"
limit?
number
page?
number
publishedChannels?
string[]
search?
string
options?
useCache?
boolean
Returns
Promise<{ data: object[]; filters: { collectionType?: "MANUAL" | "SMART"; publishedChannels?: string[]; search?: string; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Paginated list of collections
Example
const collections = await client.products.listCollections('store-123', {
collectionType: ['SMART'],
page: 1,
limit: 20
})
listCollectionViews()
listCollectionViews(
storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2969
List all collection views for a store
Parameters
storeId
string
Store identifier
Returns
Promise<any[]>
Array of collection views
listGiftCards()
listGiftCards(
storeId,params?):Promise<{data:object[];filters: {dateFrom?:Date;dateTo?:Date;search?:string;status?: ("ACTIVE"|"PARTIAL"|"REDEEMABLE"|"FULL"|"EMPTY"|"DEACTIVATED")[]; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2349
List all gift cards
Parameters
storeId
string
Store identifier
params?
Query parameters
dateFrom?
Date
dateTo?
Date
limit?
number
page?
number
search?
string
status?
("ACTIVE" | "PARTIAL" | "REDEEMABLE" | "FULL" | "EMPTY" | "DEACTIVATED")[]
Returns
Promise<{ data: object[]; filters: { dateFrom?: Date; dateTo?: Date; search?: string; status?: ("ACTIVE" | "PARTIAL" | "REDEEMABLE" | "FULL" | "EMPTY" | "DEACTIVATED")[]; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Paginated list of gift cards
Example
const giftCards = await client.products.listGiftCards('store-123', {
status: ['ACTIVE', 'PARTIAL'],
dateFrom: '2024-01-01',
dateeTo: '2024-12-31'
})
listInventory()
listInventory(
storeId,params?):Promise<{data:object[];filters: {available?: {max?:number;min?:number; };binName?:string;committed?: {max?:number;min?:number; };locationId?:string;onHand?: {max?:number;min?:number; };productType?:string;salesChannel?:string[];search?:string;sku?:string;tags?:string[];unavailable?: {max?:number;min?:number; };variantIds?:string[];vendor?:string; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1232
List all inventory items with filtering
Parameters
storeId
string
Store identifier
params?
Query parameters
available?
{ max?: number; min?: number; }
available.max?
number
available.min?
number
binName?
string
committed?
{ max?: number; min?: number; }
committed.max?
number
committed.min?
number
limit?
number
locationId?
string
lowStockThreshold?
number
onHand?
{ max?: number; min?: number; }
onHand.max?
number
onHand.min?
number
page?
number
productType?
string
salesChannel?
string[]
search?
string
sku?
string
sort?
string
stockStatus?
"in_stock" | "low_stock" | "out_of_stock"
tags?
string[]
tracked?
boolean
unavailable?
{ max?: number; min?: number; }
unavailable.max?
number
unavailable.min?
number
variantIds?
string[]
vendor?
string
Returns
Promise<{ data: object[]; filters: { available?: { max?: number; min?: number; }; binName?: string; committed?: { max?: number; min?: number; }; locationId?: string; onHand?: { max?: number; min?: number; }; productType?: string; salesChannel?: string[]; search?: string; sku?: string; tags?: string[]; unavailable?: { max?: number; min?: number; }; variantIds?: string[]; vendor?: string; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Paginated list of inventory items
Example
const inventory = await client.products.listInventory('store-123', {
search: 'IPH',
available: { min: 0, max: 10 },
page: 1,
limit: 20
})
listInventoryViews()
listInventoryViews(
storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3070
Parameters
storeId
string
Returns
Promise<any[]>
listProductViews()
listProductViews(
storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2862
List all product views for a store
Parameters
storeId
string
Store identifier
Returns
Promise<any[]>
Array of product views
listPurchaseOrders()
listPurchaseOrders(
storeId,params?):Promise<{data:object[];filters: {dateFrom?:Date;dateTo?:Date;destinationId?:string[];search?:string;status?: ("CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED")[];supplierId?:string[]; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1655
List all purchase orders
Parameters
storeId
string
Store identifier
params?
Query parameters
dateFrom?
Date
dateTo?
Date
destinationId?
string[]
limit?
number
page?
number
search?
string
status?
("CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED")[]
supplierId?
string[]
Returns
Promise<{ data: object[]; filters: { dateFrom?: Date; dateTo?: Date; destinationId?: string[]; search?: string; status?: ("CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED")[]; supplierId?: string[]; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Paginated list of purchase orders
Example
const orders = await client.products.listPurchaseOrders('store-123', {
status: ['ORDERED', 'PARTIAL'],
supplierId: ['sup-123'],
dateFrom: '2024-01-01',
dateTo: '2024-12-31'
})
listPurchaseOrderViews()
listPurchaseOrderViews(
storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3172
Parameters
storeId
string
Returns
Promise<any[]>
listSuppliers()
listSuppliers(
storeId,params?):Promise<{page:number;pageSize:number;suppliers:object[];total:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1520
List all suppliers
Parameters
storeId
string
Store identifier
params?
Query parameters
limit?
number
page?
number
search?
string
Returns
Promise<{ page: number; pageSize: number; suppliers: object[]; total: number; }>
Paginated list of suppliers
Example
const suppliers = await client.products.listSuppliers('store-123', {
search: 'Tech',
page: 1,
limit: 20
})
listTransfers()
listTransfers(
storeId,params?):Promise<{data:object[];filters: {dateFrom?:Date;dateTo?:Date;destinationId?:string[];originId?:string[];search?:string;status?: ("DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED")[]; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1847
List all inventory transfers
Parameters
storeId
string
Store identifier
params?
Query parameters
dateFrom?
Date
dateTo?
Date
destinationId?
string[]
limit?
number
originId?
string[]
page?
number
search?
string
status?
("DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED")[]
Returns
Promise<{ data: object[]; filters: { dateFrom?: Date; dateTo?: Date; destinationId?: string[]; originId?: string[]; search?: string; status?: ("DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED")[]; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Paginated list of transfers
Example
const transfers = await client.products.listTransfers('store-123', {
status: ['IN_TRANSIT'],
originId: ['loc-1'],
dateFrom: '2024-01-01'
})
listTransferViews()
listTransferViews(
storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3121
Parameters
storeId
string
Returns
Promise<any[]>
markShipmentInTransit()
markShipmentInTransit(
transferId,shipmentId,storeId):Promise<{carrierId?:string;carrierName?:string;createdAt:Date;estimatedArrival?:Date;id:string;items:object[];receipts?:object[];receivedAt?:Date;shipmentNumber:string;shippedAt?:Date;shippingCarrier?:string;status:"received"|"draft"|"in_transit";trackingLastSyncAt?:Date;trackingNumber?:string;trackingRegisteredAt?:Date;trackingRegistrationStatus?:"PENDING"|"EXPIRED"|"FAILED"|"REGISTERED";trackingUrl?:string;transferId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2133
Mark shipment as in transit
Parameters
transferId
string
Transfer ID
shipmentId
string
Shipment ID
storeId
string
Store identifier
Returns
Promise<{ carrierId?: string; carrierName?: string; createdAt: Date; estimatedArrival?: Date; id: string; items: object[]; receipts?: object[]; receivedAt?: Date; shipmentNumber: string; shippedAt?: Date; shippingCarrier?: string; status: "received" | "draft" | "in_transit"; trackingLastSyncAt?: Date; trackingNumber?: string; trackingRegisteredAt?: Date; trackingRegistrationStatus?: "PENDING" | "EXPIRED" | "FAILED" | "REGISTERED"; trackingUrl?: string; transferId: string; updatedAt: Date; }>
Updated shipment
Example
const shipment = await client.products.markShipmentInTransit('trans-123', 'ship-456', 'store-123')
markTransferReady()
markTransferReady(
id,storeId):Promise<{createdAt:Date;destinationId:string;destinationIsActive?:boolean;destinationName:string;id:string;items:object[];notes?:string;originId:string;originIsActive?:boolean;originName:string;referenceNumber?:string;shipments:object[];status:"DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED";storeId:string;tags:string[];timeline:object[];transferNumber:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2077
Mark a transfer as ready to ship
Parameters
id
string
Transfer ID
storeId
string
Store identifier
Returns
Promise<{ createdAt: Date; destinationId: string; destinationIsActive?: boolean; destinationName: string; id: string; items: object[]; notes?: string; originId: string; originIsActive?: boolean; originName: string; referenceNumber?: string; shipments: object[]; status: "DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED"; storeId: string; tags: string[]; timeline: object[]; transferNumber: string; updatedAt: Date; }>
Updated transfer
Example
const transfer = await client.products.markTransferReady('trans-123', 'store-123')
publishCollection()
publishCollection(
id,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:909
Publish a collection
Parameters
id
string
Collection ID
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Published collection
Example
const collection = await client.products.publishCollection('col-123', 'store-123')
console.log(collection.data.publishedAt) // Date
receivePurchaseOrder()
receivePurchaseOrder(
id,items,storeId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1815
Receive items from a purchase order
Parameters
id
string
Purchase order ID
items
object[]
Items to receive with quantities
storeId
string
Store identifier
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
Updated purchase order
Example
const po = await client.products.receivePurchaseOrder('po-123', [
{ itemId: 'item-1', quantityReceived: 95 },
{ itemId: 'item-2', quantityReceived: 100 }
], 'store-123')
console.log(po.data.status) // 'PARTIAL' or 'RECEIVED'
receiveShipment()
receiveShipment(
transferId,shipmentId,items,storeId):Promise<{createdAt:Date;destinationId:string;destinationIsActive?:boolean;destinationName:string;id:string;items:object[];notes?:string;originId:string;originIsActive?:boolean;originName:string;referenceNumber?:string;shipments:object[];status:"DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED";storeId:string;tags:string[];timeline:object[];transferNumber:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2200
Receive items from a specific shipment
Parameters
transferId
string
Transfer ID
shipmentId
string
Shipment ID
items
object[]
Items to receive with quantities
storeId
string
Store identifier
Returns
Promise<{ createdAt: Date; destinationId: string; destinationIsActive?: boolean; destinationName: string; id: string; items: object[]; notes?: string; originId: string; originIsActive?: boolean; originName: string; referenceNumber?: string; shipments: object[]; status: "DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED"; storeId: string; tags: string[]; timeline: object[]; transferNumber: string; updatedAt: Date; }>
Updated transfer
Example
const transfer = await client.products.receiveShipment('trans-123', 'ship-456', [
{ itemId: 'item-1', quantityAccepted: 48, quantityRejected: 2 },
{ itemId: 'item-2', quantityAccepted: 100, quantityRejected: 0 }
], 'store-123')
receiveTransfer()
receiveTransfer(
id,items,storeId):Promise<{createdAt:Date;destinationId:string;destinationIsActive?:boolean;destinationName:string;id:string;items:object[];notes?:string;originId:string;originIsActive?:boolean;originName:string;referenceNumber?:string;shipments:object[];status:"DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED";storeId:string;tags:string[];timeline:object[];transferNumber:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2233
Receive items from a transfer (transfer-level, not shipment-specific)
Parameters
id
string
Transfer ID
items
object[]
Items to receive with quantities
storeId
string
Store identifier
Returns
Promise<{ createdAt: Date; destinationId: string; destinationIsActive?: boolean; destinationName: string; id: string; items: object[]; notes?: string; originId: string; originIsActive?: boolean; originName: string; referenceNumber?: string; shipments: object[]; status: "DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED"; storeId: string; tags: string[]; timeline: object[]; transferNumber: string; updatedAt: Date; }>
Updated transfer
Example
const transfer = await client.products.receiveTransfer('trans-123', [
{ itemId: 'item-1', quantityAccepted: 48, quantityRejected: 2 },
{ itemId: 'item-2', quantityAccepted: 100, quantityRejected: 0 }
], 'store-123')
redeemGiftCard()
redeemGiftCard(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2662
Redeem gift card (deduct balance) Used when completing an order with gift card payment
Parameters
storeId
string
Store identifier
data
any
Redemption data (code, amount, orderId)
Returns
Promise<any>
Redemption result with new balance
Example
const result = await client.products.redeemGiftCard('store-123', {
code: 'ABCD-1234-EFGH-5678',
amount: 50000, // 500 THB in satang
orderId: 'order-123'
})
console.log(`Redeemed: ${result.data.amountRedeemed.amount}`)
console.log(`Remaining: ${result.data.newBalance.amount}`)
refreshSmartCollection()
refreshSmartCollection(
id,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:978
Refresh a smart collection (re-evaluate rules)
Parameters
id
string
Collection ID
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Refreshed collection with updated products
Example
const collection = await client.products.refreshSmartCollection('col-123', 'store-123')
console.log(collection.data.productCount) // Updated count
refundToGiftCard()
refundToGiftCard(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2692
Refund to gift card (add balance back) Used when refunding an order that was paid with a gift card
Parameters
storeId
string
Store identifier
data
any
Refund data (code, amount, orderId)
Returns
Promise<any>
Refund result with new balance
Example
const result = await client.products.refundToGiftCard('store-123', {
code: 'ABCD-1234-EFGH-5678',
amount: 50000, // 500 THB in satang
orderId: 'order-123'
})
console.log(`Refunded: ${result.data.amountRefunded.amount}`)
console.log(`New balance: ${result.data.newBalance.amount}`)
removeProductsFromCollection()
removeProductsFromCollection(
id,productIds,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:855
Remove products from a manual collection
Parameters
id
string
Collection ID
productIds
string[]
Product IDs to remove
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Updated collection
Example
const collection = await client.products.removeProductsFromCollection(
'col-123',
['prod-1', 'prod-2'],
'store-123'
)
reorderCollectionProducts()
reorderCollectionProducts(
id,productIds,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:884
Reorder products in a collection
Parameters
id
string
Collection ID
productIds
string[]
Ordered array of product IDs
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Updated collection
Example
const collection = await client.products.reorderCollectionProducts(
'col-123',
['prod-3', 'prod-1', 'prod-2'], // New order
'store-123'
)
reorderCollectionViews()
reorderCollectionViews(
viewIds,storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3060
Reorder collection views
Parameters
viewIds
string[]
Array of view IDs in desired order
storeId
string
Store identifier
Returns
Promise<any[]>
Reordered collection views
reorderInventoryViews()
reorderInventoryViews(
viewIds,storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3111
Parameters
viewIds
string[]
storeId
string
Returns
Promise<any[]>
reorderProductViews()
reorderProductViews(
viewIds,storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2953
Reorder product views
Parameters
viewIds
string[]
Array of view IDs in desired order
storeId
string
Store identifier
Returns
Promise<any[]>
Reordered product views
reorderPurchaseOrderViews()
reorderPurchaseOrderViews(
viewIds,storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3213
Parameters
viewIds
string[]
storeId
string
Returns
Promise<any[]>
reorderTransferViews()
reorderTransferViews(
viewIds,storeId):Promise<any[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3162
Parameters
viewIds
string[]
storeId
string
Returns
Promise<any[]>
restoreCollection()
restoreCollection(
id,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1076
Restore a soft-deleted collection
Parameters
id
string
Collection ID
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Restored collection
Example
const collection = await client.products.restoreCollection('col-123', 'store-123')
retrieve()
retrieve(
id,storeId,options?):Promise<{basePrice?: {amount:number;currency:string; };catalogs?:string[];category?:string;categoryAttributes?:object[];collections?:string[];compareAtPrice?: {amount:number;currency:string; };countryOfOrigin?:string;createdAt:Date;description?:string;giftCardTemplate?:string;handle:string;hasMultipleVariants:boolean;hsCode?:string;id:string;inventoryTracked:boolean;isGiftCard?:boolean;isVisible?:boolean;media?:object[];metafields?:object[];options?:object[];orderCount:number;packageId?:string;price: {amount:number;currency:string; };productType?:string;publishedAt?:Date;publishedChannels?:string[];seo?: {description?:string;handle?:string;keywords?:string[];title?:string; };status:"ACTIVE"|"DRAFT"|"ARCHIVED";storeId:string;tags?:string[];title:string;totalInventory:number;updatedAt:Date;variants:object[];vendor?:string;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:377
Get a single product by ID
Parameters
id
string
Product ID
storeId
string
Store identifier
options?
useCache?
boolean
Returns
Promise<{ basePrice?: { amount: number; currency: string; }; catalogs?: string[]; category?: string; categoryAttributes?: object[]; collections?: string[]; compareAtPrice?: { amount: number; currency: string; }; countryOfOrigin?: string; createdAt: Date; description?: string; giftCardTemplate?: string; handle: string; hasMultipleVariants: boolean; hsCode?: string; id: string; inventoryTracked: boolean; isGiftCard?: boolean; isVisible?: boolean; media?: object[]; metafields?: object[]; options?: object[]; orderCount: number; packageId?: string; price: { amount: number; currency: string; }; productType?: string; publishedAt?: Date; publishedChannels?: string[]; seo?: { description?: string; handle?: string; keywords?: string[]; title?: string; }; status: "ACTIVE" | "DRAFT" | "ARCHIVED"; storeId: string; tags?: string[]; title: string; totalInventory: number; updatedAt: Date; variants: object[]; vendor?: string; viewCount: number; }>
Product details
Example
const response = await client.products.retrieve('prod-123', 'store-123')
console.log(response.data.title)
console.log(response.data.variants)
retrieveCollection()
retrieveCollection(
id,storeId,options?):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:709
Get a single collection by ID
Parameters
id
string
Collection ID
storeId
string
Store identifier
options?
useCache?
boolean
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Collection details
Example
const collection = await client.products.retrieveCollection('col-123', 'store-123')
console.log(collection.data.title)
console.log(collection.data.productCount)
retrieveCollectionByHandle()
retrieveCollectionByHandle(
handle,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1095
Get a collection by handle (URL slug)
Parameters
handle
string
Collection handle
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Collection details
Example
const collection = await client.products.retrieveCollectionByHandle('summer-sale', 'store-123')
retrieveGiftCard()
retrieveGiftCard(
id,storeId):Promise<{code:string;createdAt:Date;currentBalance: {amount:number;currency:string; };customerEmail?:string;customerId?:string;customerName?:string;expiresAt?:Date;id:string;initialBalance: {amount:number;currency:string; };issuedAt:Date;lastUsedAt?:Date;notes?:string;recipientEmail?:string;recipientName?:string;status:"ACTIVE"|"PARTIAL"|"REDEEMABLE"|"FULL"|"EMPTY"|"DEACTIVATED";storeId:string;timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2373
Get a single gift card by ID
Parameters
id
string
Gift card ID
storeId
string
Store identifier
Returns
Promise<{ code: string; createdAt: Date; currentBalance: { amount: number; currency: string; }; customerEmail?: string; customerId?: string; customerName?: string; expiresAt?: Date; id: string; initialBalance: { amount: number; currency: string; }; issuedAt: Date; lastUsedAt?: Date; notes?: string; recipientEmail?: string; recipientName?: string; status: "ACTIVE" | "PARTIAL" | "REDEEMABLE" | "FULL" | "EMPTY" | "DEACTIVATED"; storeId: string; timeline: object[]; updatedAt: Date; }>
Gift card details
Example
const giftCard = await client.products.retrieveGiftCard('gc-123', 'store-123')
console.log(giftCard.data.code)
console.log(giftCard.data.currentBalance)
console.log(giftCard.data.status)
retrieveInventory()
retrieveInventory(
id,storeId):Promise<{barcode?:string;comparePrice?:number;cost?:number;countryOfOrigin?:string;hsCode?:string;id:string;imageUrl?:string;locations:object[];policy:"DENY"|"CONTINUE";price?:number;productId:string;productTitle:string;sku?:string;totalAvailable:number;totalCommitted:number;totalOnHand:number;totalUnavailable:number;tracked:boolean;updatedAt:Date;variantId:string;variantTitle?:string;weight?: {unit:"kg"|"g"|"lb"|"oz";value:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1255
Get inventory details for a specific item
Parameters
id
string
Inventory item ID (variant ID)
storeId
string
Store identifier
Returns
Promise<{ barcode?: string; comparePrice?: number; cost?: number; countryOfOrigin?: string; hsCode?: string; id: string; imageUrl?: string; locations: object[]; policy: "DENY" | "CONTINUE"; price?: number; productId: string; productTitle: string; sku?: string; totalAvailable: number; totalCommitted: number; totalOnHand: number; totalUnavailable: number; tracked: boolean; updatedAt: Date; variantId: string; variantTitle?: string; weight?: { unit: "kg" | "g" | "lb" | "oz"; value: number; }; }>
Inventory item details
Example
const item = await client.products.retrieveInventory('var-123', 'store-123')
console.log(item.data.totalAvailable)
console.log(item.data.locations)
retrievePurchaseOrder()
retrievePurchaseOrder(
id,storeId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1681
Get a single purchase order by ID
Parameters
id
string
Purchase order ID
storeId
string
Store identifier
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
Purchase order details
Example
const po = await client.products.retrievePurchaseOrder('po-123', 'store-123')
console.log(po.data.poNumber)
console.log(po.data.status)
console.log(po.data.costs.total)
retrieveSupplier()
retrieveSupplier(
id,storeId):Promise<{address?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };archivedAt?:Date;company:string;contactName?:string;createdAt:Date;currency:string;email?:string;id:string;isArchived?:boolean;notes?:string;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";phone?:string;storeId:string;totalOrders:number;totalSpent: {amount:number;currency:string; };updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1543
Get a single supplier by ID
Parameters
id
string
Supplier ID
storeId
string
Store identifier
Returns
Promise<{ address?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; archivedAt?: Date; company: string; contactName?: string; createdAt: Date; currency: string; email?: string; id: string; isArchived?: boolean; notes?: string; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; phone?: string; storeId: string; totalOrders: number; totalSpent: { amount: number; currency: string; }; updatedAt: Date; }>
Supplier details
Example
const supplier = await client.products.retrieveSupplier('sup-123', 'store-123')
console.log(supplier.data.company)
console.log(supplier.data.totalOrders)
retrieveTransfer()
retrieveTransfer(
id,storeId):Promise<{createdAt:Date;destinationId:string;destinationIsActive?:boolean;destinationName:string;id:string;items:object[];notes?:string;originId:string;originIsActive?:boolean;originName:string;referenceNumber?:string;shipments:object[];status:"DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED";storeId:string;tags:string[];timeline:object[];transferNumber:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1871
Get a single transfer by ID
Parameters
id
string
Transfer ID
storeId
string
Store identifier
Returns
Promise<{ createdAt: Date; destinationId: string; destinationIsActive?: boolean; destinationName: string; id: string; items: object[]; notes?: string; originId: string; originIsActive?: boolean; originName: string; referenceNumber?: string; shipments: object[]; status: "DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED"; storeId: string; tags: string[]; timeline: object[]; transferNumber: string; updatedAt: Date; }>
Transfer details
Example
const transfer = await client.products.retrieveTransfer('trans-123', 'store-123')
console.log(transfer.data.transferNumber)
console.log(transfer.data.status)
console.log(transfer.data.items)
retrieveVariant()
retrieveVariant(
storeId,variantId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2781
Get a single variant by ID
Parameters
storeId
string
variantId
string
Returns
Promise<any>
Example
const variant = await client.products.retrieveVariant('store-123', 'variant-456')
console.log(variant.price) // 29900
scheduleCollectionPublish()
scheduleCollectionPublish(
id,publishAt,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:953
Schedule a collection for publishing
Parameters
id
string
Collection ID
publishAt
Date
Date to publish
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Scheduled collection
Example
const collection = await client.products.scheduleCollectionPublish(
'col-123',
new Date('2024-12-25T00:00:00Z'),
'store-123'
)
search()
search(
request,storeId?):Promise<{data:object[];filters: {isGiftCard?:boolean;productType?:string;search?:string;searchBy?:"all"|"title"|"sku"|"variantTitle"|"barcode";status?:"ACTIVE"|"DRAFT"|"ARCHIVED";stockStatus?:"in_stock"|"low_stock"|"out_of_stock";vendor?:string; };pagination: {hasNext:boolean;hasPrev:boolean;limit:number;page:number;total:number;totalPages:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:590
Search products with full-text search
Parameters
request
Search request
limit?
number
page?
number
query
string
storeId?
string
Store identifier (optional)
Returns
Promise<{ data: object[]; filters: { isGiftCard?: boolean; productType?: string; search?: string; searchBy?: "all" | "title" | "sku" | "variantTitle" | "barcode"; status?: "ACTIVE" | "DRAFT" | "ARCHIVED"; stockStatus?: "in_stock" | "low_stock" | "out_of_stock"; vendor?: string; }; pagination: { hasNext: boolean; hasPrev: boolean; limit: number; page: number; total: number; totalPages: number; }; }>
Search results
Example
const results = await client.products.search({
query: 'iPhone',
page: 1,
limit: 20
}, 'store-123')
sendGiftCard()
sendGiftCard(
storeId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2476
Send a gift card via email
Parameters
storeId
string
Store identifier
data
Email sending data
from?
string
giftCardId?
string
message?
string
subject?
string
to
string
Returns
Promise<any>
Updated gift card
Example
const response = await client.products.sendGiftCard('store-123', {
giftCardId: 'gc-123',
from: 'Your Name',
subject: 'Happy Birthday!',
message: 'Enjoy your special day!'
})
console.log(response.data.code)
setAvailable()
setAvailable(
storeId,params):Promise<{barcode?:string;comparePrice?:number;cost?:number;countryOfOrigin?:string;hsCode?:string;id:string;imageUrl?:string;locations:object[];policy:"DENY"|"CONTINUE";price?:number;productId:string;productTitle:string;sku?:string;totalAvailable:number;totalCommitted:number;totalOnHand:number;totalUnavailable:number;tracked:boolean;updatedAt:Date;variantId:string;variantTitle?:string;weight?: {unit:"kg"|"g"|"lb"|"oz";value:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1351
Set available quantity directly (Tanqory model) Recalculates onHand = available + committed + unavailable
Parameters
storeId
string
Store identifier
params
Set available parameters
available
number
locationId
string
notes?
string
variantId
string
Returns
Promise<{ barcode?: string; comparePrice?: number; cost?: number; countryOfOrigin?: string; hsCode?: string; id: string; imageUrl?: string; locations: object[]; policy: "DENY" | "CONTINUE"; price?: number; productId: string; productTitle: string; sku?: string; totalAvailable: number; totalCommitted: number; totalOnHand: number; totalUnavailable: number; tracked: boolean; updatedAt: Date; variantId: string; variantTitle?: string; weight?: { unit: "kg" | "g" | "lb" | "oz"; value: number; }; }>
Updated inventory item
Example
const item = await client.products.setAvailable('store-123', {
variantId: 'var-123',
locationId: 'loc-456',
available: 50,
notes: 'Stock count adjustment'
})
setUnavailableBreakdown()
setUnavailableBreakdown(
storeId,params):Promise<{barcode?:string;comparePrice?:number;cost?:number;countryOfOrigin?:string;hsCode?:string;id:string;imageUrl?:string;locations:object[];policy:"DENY"|"CONTINUE";price?:number;productId:string;productTitle:string;sku?:string;totalAvailable:number;totalCommitted:number;totalOnHand:number;totalUnavailable:number;tracked:boolean;updatedAt:Date;variantId:string;variantTitle?:string;weight?: {unit:"kg"|"g"|"lb"|"oz";value:number; }; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1428
Set unavailable breakdown (damaged, qualityControl, safetyStock, reserved) Recalculates available = onHand - committed - unavailable
Parameters
storeId
string
Store identifier
params
Breakdown parameters
breakdown
{ damaged?: number; qualityControl?: number; reserved?: number; safetyStock?: number; }
breakdown.damaged?
number
breakdown.qualityControl?
number
breakdown.reserved?
number
breakdown.safetyStock?
number
locationId
string
notes?
string
variantId
string
Returns
Promise<{ barcode?: string; comparePrice?: number; cost?: number; countryOfOrigin?: string; hsCode?: string; id: string; imageUrl?: string; locations: object[]; policy: "DENY" | "CONTINUE"; price?: number; productId: string; productTitle: string; sku?: string; totalAvailable: number; totalCommitted: number; totalOnHand: number; totalUnavailable: number; tracked: boolean; updatedAt: Date; variantId: string; variantTitle?: string; weight?: { unit: "kg" | "g" | "lb" | "oz"; value: number; }; }>
Updated inventory item
Example
const item = await client.products.setUnavailableBreakdown('store-123', {
variantId: 'var-123',
locationId: 'loc-456',
breakdown: { damaged: 5, qualityControl: 2 },
notes: 'Updated damaged count'
})
toggleCollectionViewPin()
toggleCollectionViewPin(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3047
Toggle pin status of a collection view
Parameters
id
string
Collection view ID
storeId
string
Store identifier
Returns
Promise<any>
Updated collection view
toggleInventoryViewPin()
toggleInventoryViewPin(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3105
Parameters
id
string
storeId
string
Returns
Promise<any>
toggleProductViewPin()
toggleProductViewPin(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2940
Toggle pin status of a product view
Parameters
id
string
Product view ID
storeId
string
Store identifier
Returns
Promise<any>
Updated product view
togglePurchaseOrderViewPin()
togglePurchaseOrderViewPin(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3207
Parameters
id
string
storeId
string
Returns
Promise<any>
toggleTransferViewPin()
toggleTransferViewPin(
id,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3156
Parameters
id
string
storeId
string
Returns
Promise<any>
unpublishCollection()
unpublishCollection(
id,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:929
Unpublish a collection
Parameters
id
string
Collection ID
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Unpublished collection
Example
const collection = await client.products.unpublishCollection('col-123', 'store-123')
console.log(collection.data.publishedAt) // null
update()
update(
id,data,storeId):Promise<{basePrice?: {amount:number;currency:string; };catalogs?:string[];category?:string;categoryAttributes?:object[];collections?:string[];compareAtPrice?: {amount:number;currency:string; };countryOfOrigin?:string;createdAt:Date;description?:string;giftCardTemplate?:string;handle:string;hasMultipleVariants:boolean;hsCode?:string;id:string;inventoryTracked:boolean;isGiftCard?:boolean;isVisible?:boolean;media?:object[];metafields?:object[];options?:object[];orderCount:number;packageId?:string;price: {amount:number;currency:string; };productType?:string;publishedAt?:Date;publishedChannels?:string[];seo?: {description?:string;handle?:string;keywords?:string[];title?:string; };status:"ACTIVE"|"DRAFT"|"ARCHIVED";storeId:string;tags?:string[];title:string;totalInventory:number;updatedAt:Date;variants:object[];vendor?:string;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:458
Update an existing product
Parameters
id
string
Product ID
data
Product update data
barcode?
string
catalogs?
string[]
category?
string
categoryAttributes?
object[]
collections?
string[]
comparePrice?
number
cost?
number
countryOfOrigin?
string
description?
string
giftCardTemplate?
string
hsCode?
string
id
string
inventoryQty?
number
isDigital?
boolean
isGiftCard?
boolean
isVisible?
boolean
locationInventory?
object[]
media?
object[]
metafields?
object[]
options?
object[]
packageId?
string
price?
number
productType?
string
publishedChannels?
string[]
sellingPlanGroupIds?
string[]
seo?
{ description?: string; handle?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.handle?
string
seo.keywords?
string[]
seo.title?
string
sku?
string
status?
"ACTIVE" | "DRAFT" | "ARCHIVED"
tags?
string[]
taxable?
boolean
title?
string
trackInventory?
boolean
variants?
object[]
vendor?
string
weight?
{ unit: "kg" | "g" | "lb" | "oz"; value: number; }
weight.unit
"kg" | "g" | "lb" | "oz"
weight.value
number
storeId
string
Store identifier
Returns
Promise<{ basePrice?: { amount: number; currency: string; }; catalogs?: string[]; category?: string; categoryAttributes?: object[]; collections?: string[]; compareAtPrice?: { amount: number; currency: string; }; countryOfOrigin?: string; createdAt: Date; description?: string; giftCardTemplate?: string; handle: string; hasMultipleVariants: boolean; hsCode?: string; id: string; inventoryTracked: boolean; isGiftCard?: boolean; isVisible?: boolean; media?: object[]; metafields?: object[]; options?: object[]; orderCount: number; packageId?: string; price: { amount: number; currency: string; }; productType?: string; publishedAt?: Date; publishedChannels?: string[]; seo?: { description?: string; handle?: string; keywords?: string[]; title?: string; }; status: "ACTIVE" | "DRAFT" | "ARCHIVED"; storeId: string; tags?: string[]; title: string; totalInventory: number; updatedAt: Date; variants: object[]; vendor?: string; viewCount: number; }>
Updated product
Example
const product = await client.products.update('prod-123', {
title: 'iPhone 15 Pro Max',
status: 'ACTIVE',
tags: ['new', 'flagship', 'sale']
}, 'store-123')
updateCollection()
updateCollection(
id,data,storeId):Promise<{collectionType:"MANUAL"|"SMART";conditions?:object[];createdAt:Date;description?:string;disjunctive?:boolean;handle:string;id:string;image?: {alt?:string;id:string;position:number;type:"image"|"video"|"3d-model";url:string; };metafields?:object[];productCount:number;productIds:string[];publishedAt?:Date;publishedChannels:string[];scheduledPublishAt?:Date;seo: {description?:string;handle?:string;keywords?:string[];title?:string; };sortOrder?:"manual"|"best-selling"|"created-desc"|"created-asc"|"price-desc"|"price-asc";storeId:string;themeTemplate?:string;title:string;updatedAt:Date;viewCount:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:776
Update an existing collection
Parameters
id
string
Collection ID
data
Collection update data
collectionType?
"MANUAL" | "SMART"
description?
string
disjunctive?
boolean
id
string
image?
{ alt?: string; position: number; type: "image" | "video" | "3d-model"; url: string; }
image.alt?
string
image.position
number
image.type
"image" | "video" | "3d-model"
image.url
string
imageAlt?
string
imageUrl?
string
mediaId?
string
metafields?
object[]
productIds?
string[]
publishedChannels?
string[]
rules?
object[]
scheduledPublishAt?
Date
seo?
{ description?: string; handle?: string; keywords?: string[]; title?: string; }
seo.description?
string
seo.handle?
string
seo.keywords?
string[]
seo.title?
string
sortOrder?
"manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"
themeTemplate?
string
title?
string
storeId
string
Store identifier
Returns
Promise<{ collectionType: "MANUAL" | "SMART"; conditions?: object[]; createdAt: Date; description?: string; disjunctive?: boolean; handle: string; id: string; image?: { alt?: string; id: string; position: number; type: "image" | "video" | "3d-model"; url: string; }; metafields?: object[]; productCount: number; productIds: string[]; publishedAt?: Date; publishedChannels: string[]; scheduledPublishAt?: Date; seo: { description?: string; handle?: string; keywords?: string[]; title?: string; }; sortOrder?: "manual" | "best-selling" | "created-desc" | "created-asc" | "price-desc" | "price-asc"; storeId: string; themeTemplate?: string; title: string; updatedAt: Date; viewCount: number; }>
Updated collection
Example
const collection = await client.products.updateCollection('col-123', {
title: 'Updated Summer Sale',
description: 'Even better deals!'
}, 'store-123')
updateCollectionView()
updateCollectionView(
id,data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3009
Update a collection view
Parameters
id
string
Collection view ID
data
any
Updated collection view data
storeId
string
Store identifier
Returns
Promise<any>
Updated collection view
updateGiftCard()
updateGiftCard(
id,data,storeId):Promise<{code:string;createdAt:Date;currentBalance: {amount:number;currency:string; };customerEmail?:string;customerId?:string;customerName?:string;expiresAt?:Date;id:string;initialBalance: {amount:number;currency:string; };issuedAt:Date;lastUsedAt?:Date;notes?:string;recipientEmail?:string;recipientName?:string;status:"ACTIVE"|"PARTIAL"|"REDEEMABLE"|"FULL"|"EMPTY"|"DEACTIVATED";storeId:string;timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2425
Update an existing gift card
Parameters
id
string
Gift card ID
data
Gift card update data
customerEmail?
string
customerId?
string
customerName?
string
expiresAt?
Date
id
string
notes?
string
recipientEmail?
string
recipientName?
string
storeId
string
Store identifier
Returns
Promise<{ code: string; createdAt: Date; currentBalance: { amount: number; currency: string; }; customerEmail?: string; customerId?: string; customerName?: string; expiresAt?: Date; id: string; initialBalance: { amount: number; currency: string; }; issuedAt: Date; lastUsedAt?: Date; notes?: string; recipientEmail?: string; recipientName?: string; status: "ACTIVE" | "PARTIAL" | "REDEEMABLE" | "FULL" | "EMPTY" | "DEACTIVATED"; storeId: string; timeline: object[]; updatedAt: Date; }>
Updated gift card
Example
const giftCard = await client.products.updateGiftCard('gc-123', {
expiresAt: '2026-12-31',
notes: 'Extended expiration'
}, 'store-123')
updateInventoryView()
updateInventoryView(
id,data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3088
Parameters
id
string
data
any
storeId
string
Returns
Promise<any>
updateProductView()
updateProductView(
id,data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2902
Update a product view
Parameters
id
string
Product view ID
data
any
Updated product view data
storeId
string
Store identifier
Returns
Promise<any>
Updated product view
updatePurchaseOrder()
updatePurchaseOrder(
id,data,storeId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1786
Update an existing purchase order
Parameters
id
string
Purchase order ID
data
Purchase order update data
carrierId?
string
currency?
string
destinationId?
string
estimatedArrival?
Date
id
string
items?
object[]
noteToSupplier?
string
paymentTerms?
"NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"
referenceNumber?
string
shippingCarrier?
string
supplierId?
string
tags?
string[]
trackingNumber?
string
storeId
string
Store identifier
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
Updated purchase order
Example
const po = await client.products.updatePurchaseOrder('po-123', {
estimatedArrival: '2024-02-15',
trackingNumber: 'TRACK123456'
}, 'store-123')
updatePurchaseOrderView()
updatePurchaseOrderView(
id,data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3190
Parameters
id
string
data
any
storeId
string
Returns
Promise<any>
updateShipment()
updateShipment(
transferId,shipmentId,data,storeId):Promise<{carrierId?:string;carrierName?:string;createdAt:Date;estimatedArrival?:Date;id:string;items:object[];receipts?:object[];receivedAt?:Date;shipmentNumber:string;shippedAt?:Date;shippingCarrier?:string;status:"received"|"draft"|"in_transit";trackingLastSyncAt?:Date;trackingNumber?:string;trackingRegisteredAt?:Date;trackingRegistrationStatus?:"PENDING"|"EXPIRED"|"FAILED"|"REGISTERED";trackingUrl?:string;transferId:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2164
Update shipment tracking information
Parameters
transferId
string
Transfer ID
shipmentId
string
Shipment ID
data
Shipment update data
carrierName?
string
estimatedArrival?
Date
shippingCarrier?
string
trackingNumber?
string
trackingUrl?
string
storeId
string
Store identifier
Returns
Promise<{ carrierId?: string; carrierName?: string; createdAt: Date; estimatedArrival?: Date; id: string; items: object[]; receipts?: object[]; receivedAt?: Date; shipmentNumber: string; shippedAt?: Date; shippingCarrier?: string; status: "received" | "draft" | "in_transit"; trackingLastSyncAt?: Date; trackingNumber?: string; trackingRegisteredAt?: Date; trackingRegistrationStatus?: "PENDING" | "EXPIRED" | "FAILED" | "REGISTERED"; trackingUrl?: string; transferId: string; updatedAt: Date; }>
Updated shipment
Example
const shipment = await client.products.updateShipment('trans-123', 'ship-456', {
trackingNumber: 'TRK123456',
trackingUrl: 'https://track.example.com/TRK123456',
shippingCarrier: 'DHL Express',
estimatedArrival: new Date('2024-12-15')
}, 'store-123')
updateSupplier()
updateSupplier(
id,data,storeId):Promise<{address?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };archivedAt?:Date;company:string;contactName?:string;createdAt:Date;currency:string;email?:string;id:string;isArchived?:boolean;notes?:string;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";phone?:string;storeId:string;totalOrders:number;totalSpent: {amount:number;currency:string; };updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:1602
Update an existing supplier
Parameters
id
string
Supplier ID
data
Supplier update data
address?
{ address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }
address.address1
string
address.address2?
string
address.city
string
address.company?
string
address.country
string
address.firstName?
string
address.lastName?
string
address.phone?
string
address.postalCode
string
address.province
string
company?
string
contactName?
string
email?
string
id
string
notes?
string
paymentTerms?
"NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"
phone?
string
storeId
string
Store identifier
Returns
Promise<{ address?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; archivedAt?: Date; company: string; contactName?: string; createdAt: Date; currency: string; email?: string; id: string; isArchived?: boolean; notes?: string; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; phone?: string; storeId: string; totalOrders: number; totalSpent: { amount: number; currency: string; }; updatedAt: Date; }>
Updated supplier
Example
const supplier = await client.products.updateSupplier('sup-123', {
paymentTerms: 'NET_45'
}, 'store-123')
updateTransfer()
updateTransfer(
id,data,storeId):Promise<{createdAt:Date;destinationId:string;destinationIsActive?:boolean;destinationName:string;id:string;items:object[];notes?:string;originId:string;originIsActive?:boolean;originName:string;referenceNumber?:string;shipments:object[];status:"DRAFT"|"READY_TO_SHIP"|"IN_TRANSIT"|"TRANSFERRED";storeId:string;tags:string[];timeline:object[];transferNumber:string;updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2037
Update an existing transfer
Parameters
id
string
Transfer ID
data
Transfer update data
destinationId?
string
id
string
items?
object[]
notes?
string
originId?
string
referenceNumber?
string
tags?
string[]
storeId
string
Store identifier
Returns
Promise<{ createdAt: Date; destinationId: string; destinationIsActive?: boolean; destinationName: string; id: string; items: object[]; notes?: string; originId: string; originIsActive?: boolean; originName: string; referenceNumber?: string; shipments: object[]; status: "DRAFT" | "READY_TO_SHIP" | "IN_TRANSIT" | "TRANSFERRED"; storeId: string; tags: string[]; timeline: object[]; transferNumber: string; updatedAt: Date; }>
Updated transfer
Example
const transfer = await client.products.updateTransfer('trans-123', {
notes: 'Updated shipping instructions'
}, 'store-123')
updateTransferView()
updateTransferView(
id,data,storeId):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:3139
Parameters
id
string
data
any
storeId
string
Returns
Promise<any>
updateVariant()
updateVariant(
storeId,variantId,data):Promise<any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/products.ts:2801
Update a single variant Only updates the specified variant without affecting other variants
Parameters
storeId
string
variantId
string
data
barcode?
string
compareAtPrice?
number
cost?
number
countryOfOrigin?
string
hsCode?
string
imageUrl?
string
locationInventory?
object[]
metafields?
object[]
options?
Record<string, string>
packageId?
string
price?
number
requiresShipping?
boolean
sku?
string
taxable?
boolean
title?
string
trackQuantity?
boolean
weight?
{ unit: string; value: number; }
weight.unit
string
weight.value
number
Returns
Promise<any>
Example
const variant = await client.products.updateVariant('store-123', 'variant-456', {
price: 32900,
sku: 'IPH15-BLK-128',
locationInventory: [
{ locationId: 'loc-1', quantity: 50 },
{ locationId: 'loc-2', quantity: 30 }
]
})