Skip to main content

Method Signature

client.productData.getProductSellable(params: GetProductSellableParams): Promise<any>
Retrieves a list of products or parts based on their sellable status. This method helps you identify which products are currently available for sale or which have been discontinued.

Parameters

isSellable
boolean
required
Filter products by sellable status. Use true to get currently sellable products, or false to get products that are no longer sellable
productId
string
Optional product identifier to check sellable status for a specific product
partId
string
Optional part identifier to check sellable status for a specific part/variant

Returns

ProductSellableArray
array
Array of products and their sellable status information

Example

import { PromoStandards } from 'promostandards-sdk-js';

const client = new PromoStandards.Client({
  id: 'your_account_id',
  password: 'your_password',
  endpoints: [
    {
      type: 'ProductData',
      version: '2.0.0',
      url: 'https://supplier.com/productData'
    }
  ]
});

// Get all currently sellable products
const sellableProducts = await client.productData.getProductSellable({
  isSellable: true
});

console.log(sellableProducts);

// Check if a specific product is sellable
const productStatus = await client.productData.getProductSellable({
  productId: 'ITEM-12345',
  isSellable: true
});

// Get all discontinued products
const discontinuedProducts = await client.productData.getProductSellable({
  isSellable: false
});

// Check sellable status for a specific part
const partStatus = await client.productData.getProductSellable({
  productId: 'ITEM-12345',
  partId: 'ITEM-12345-BLK-L',
  isSellable: true
});

Use Cases

  • Catalog Synchronization: Regularly sync your catalog to ensure you’re only displaying sellable products
  • Inventory Management: Identify products that need to be removed from your active inventory
  • Product Lifecycle: Track which products are being phased out or discontinued

PromoStandards Documentation

For more details on the Product Data service, refer to the official PromoStandards documentation: Product Data Service 2.0.0

Build docs developers (and LLMs) love