Module ebay.inventory

ballerinax/ebay.inventory Ballerina library

2.0.0

Overview

The eBay Inventory connector provides programmatic access to the eBay Sell Inventory API, which lets sellers create and manage inventory items, product compatibility, inventory item groups, offers and inventory locations. This connector supports version 1.18.8 of the Inventory API and lets Ballerina integrations create listings, update stock and prices in bulk, and publish or withdraw offers on eBay marketplaces.

Key features

  • Create, replace, retrieve and delete inventory items, including bulk operations of up to 25 SKUs per call
  • Manage multi-variation listings through inventory item groups and product compatibility lists
  • Create, update, publish and withdraw offers, individually or by inventory item group, and preview listing fees
  • Maintain inventory locations and map them to listings and SKUs

Setup guide

  1. Sign in to the eBay Developers Program and create an application keyset in the Application Keys page.

  2. Configure the OAuth redirect URL (RuName) of the application and grant it the https://api.ebay.com/oauth/api_scope/sell.inventory scope, or https://api.ebay.com/oauth/api_scope/sell.inventory.readonly for read-only access.

  3. Complete the authorization code grant flow with the seller account to obtain a user access token and a refresh token.

  4. Keep the access token at hand. The connector sends it as a bearer token, or you can configure a refresh token with the client ID and client secret so that the connector renews the access token automatically.

Quickstart

To use the eBay Inventory connector in your Ballerina application, update the .bal file as follows:

Step 1: Import the module and declare the configuration.

Copy
import ballerinax/ebay.inventory;

configurable string accessToken = ?;

Step 2: Create a Config.toml file with your credentials.

Copy
accessToken = "<your-ebay-user-access-token>"

Step 3: Create a client.

Copy
inventory:Client inventoryClient = check new ({auth: {token: accessToken}});

Step 4: Call an operation, for example list the inventory items of the seller.

Copy
public function main() returns error? {
    inventory:InventoryItems _ = check inventoryClient->getInventoryItems('limit = "10");
}

Examples

The eBay Inventory connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:

  • Listing publish workflow - Create an inventory item, draft an offer, preview the listing fees and optionally publish the offer.
  • Stock offer audit - Page through all inventory items and report the SKUs that have no published offer.

Import

import ballerinax/ebay.inventory;Copy

Other versions

See more...

Metadata

Released date: 1 day ago

Version: 2.0.0

License: Apache-2.0


Security

Direct vulnerabilities: No known direct vulnerabilities

Indirect vulnerabilities: 

Checked on 2026-11-21 via OSV.dev


Compatibility

Platform: any

Ballerina version: 2201.12.0

GraalVM compatible: Yes


Pull count

Total: 51

Current verison: 1


Weekly downloads


Source repository


Keywords

Vendor/eBay

Area/E-Commerce

Type/Connector


Contributors