How to

Track product availability

Get notified when out-of-stock products are back in stock using Geins Merchant API

Prerequisites

  • Merchant API key
  • SKU ID of the product to monitor
  • Valid email address for notifications

Goal

  • Subscribe to availability notifications for a specific product SKU

Architecture at a glance

  • Use monitorProductAvailability mutation → Provide email and SKU ID → Get notified when product is back in stock

Example

To monitor product availability, use the monitorProductAvailability mutation in the Merchant API. You need to provide an email address and the SKU ID of the product you want to track.

Try it out in the GraphQL Playground using the query, headers and variables below.

Request example

mutation monitorProductAvailability(
    $email: String!
    $skuId: Int!
    $channelId: String
    $languageId: String
    $marketId: String
) {
  monitorProductAvailability(
    email: $email
    skuId: $skuId
    channelId: $channelId
    languageId: $languageId
    marketId: $marketId
  )
}
The channelId, languageId, and marketId arguments are optional and can be left out to use default values.

Response example

200 OK
response.json
{
  "data": {
    "monitorProductAvailability": true
  }
}

Options

Channel, Language, and Market

The mutation also supports optional parameters for multi-market support:

Read more about channelId, languageId, and marketId in the "how to"-article about using multi-market support.
Related