canonical: https://jentic.com/apis/swaggerhub.jbhifi/basket-api

# Jbhifi Basket API

Receive a basket of goods, coupon codes and fulfillment options and retrieves fulfilment options, applies basket level promotions and any supplied coupon codes then returns the basket and fulfilment option details. The API exposes 2 endpoints secured with apiKey authentication.

## For AI agents

Programmatically get all fulfilment options for a sku / basket of skus, retrieve previously calculated basket prices by id. Covers 2 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for e-commerce only.

## Capabilities

- Get all fulfilment options for a SKU / basket of SKUs
- Retrieve previously calculated basket prices by Id
- Integrate Basket API into automated workflows
- Query and filter Basket API records by parameters
- Monitor Basket API operational status and events

## Use cases

### E-Commerce Operations

Use the Basket API to perform e commerce operations programmatically. The API provides 2 endpoints covering core functionality including get all fulfilment options for a sku / basket of skus, retrieve previously calculated basket prices by id.

Example prompt: Call POST `/Basket/Api/CalculatePrices` to get all fulfilment options for a sku / basket of skus

### Data Retrieval and Monitoring

Query Basket API resources on a schedule to track changes, generate alerts, or feed downstream dashboards. Agents poll relevant endpoints, compare against previous state, and trigger actions when thresholds are crossed.

Example prompt: Poll the primary Basket API endpoint, compare response to last known state, and alert if changed

### AI Agent Integration via Jentic

AI agents discover and call Basket API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'get all fulfilment options for a sku / basket of skus', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/Basket/Api/CalculatePrices` | Get all fulfilment options for a SKU / basket of SKUs |
| GET | `/Basket/Api/CalculatedPrices/{CalculatedBasketId}` | Retrieve previously calculated basket prices by Id |

## Key resources

- **basket** — Basket price and promotion calculation

## Why Jentic

- **Setup:** Wiring the Basket API by hand means reading its spec, setting the x-api-key header on the price requests, and handling request formatting and retries yourself. Through Jentic you install once, import Basket from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Basket puts the calculated basket id in the URL path for retrieval (the calculated-prices path), so a rule can pin your agent to reading one calculated basket. You choose the operations it may call, so the price-calculation POST is only in the allowed set if you add it.
- **Credential handling:** Your Basket API x-api-key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'calculate prices for a basket of SKUs', and Jentic returns the matching Basket operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shopify** — Alternative e commerce API
- **Stripe** — Alternative e commerce API

## FAQ

### What authentication does the Basket API use?

The Basket API uses an API key passed in the `x-api-key` header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I get all fulfilment options for a sku / basket of skus with the Basket API?

Yes. Use the POST `/Basket/Api/CalculatePrices` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Basket API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I get all fulfilment options for a sku / basket of skus through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get all fulfilment options for a sku / basket of skus'. Jentic returns the matching Basket API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Basket API have?

The Basket API exposes 2 endpoints covering basket operations.
