canonical: https://jentic.com/apis/rwdtrim.com/rwdtrim

# Rwdtrim RWD Client API Documentation

The RWD Client API places wholesale orders with RWD on behalf of a company's customers, using the pricing that RWD has already assigned to them. One call fetches the customer's pricing template, the products available to order, the quantity discount tiers, and customer settings such as whether tax applies. A second call creates the order from a customerId and product ids with quantities, and the backend calculates prices, quantity discounts, tax, and totals, so client code never computes or overrides a price.

## For AI agents

Fetch a customer's RWD pricing template, products, and discount tiers, then place an order by customerId and product quantities with totals calculated server-side.

## Scope

Does not track shipments, issue invoices, or let callers set or override prices. Use for reading assigned pricing and placing orders with RWD only.

## Capabilities

- Fetch the pricing template, orderable products, quantity discount tiers, and customer settings with GET `/rwd-client/order/order-details`
- Place an order with POST `/rwd-client/order/create-order` from a customerId and a products list of productId and quantity
- Attach a purchase order number (PoNo) and delivery notes to an order
- Rely on server-side pricing: quantity discounts on products flagged quantityDiscount and tax only for customers with isTaxed

## Use cases

### Reordering agent through Jentic

A customer's purchasing assistant restocks from RWD without logging into a portal. Through Jentic it searches for 'place a wholesale order', receives the RWD operations with their input schemas, and first calls GET `/rwd-client/order/order-details` to load the products and pricing assigned to the account. It then calls POST `/rwd-client/order/create-order` with the customerId and the product ids and quantities, and reports the totals RWD calculated.

Example prompt: Call GET `/rwd-client/order/order-details`, pick productId '65f5c080687a87a263de8882', then call POST `/rwd-client/order/create-order` with customerId '694e18cef7ebad9850b561fc' and quantity 10 for that product, and report the order total

### Orders with purchase order references

Buyers who work from purchase orders need the PO number on every order for matching invoices later. POST `/rwd-client/order/create-order` accepts PoNo and free-text notes alongside the required customerId and products, for example PoNo 'PO-2025-0042' with the note 'Deliver to warehouse B'.

Example prompt: Call POST `/rwd-client/order/create-order` with customerId '694e18cef7ebad9850b561fc', products [{productId '65f5c080687a87a263de8882', quantity 50}], PoNo 'PO-2025-0042', and notes 'Deliver to warehouse B'

### Quoting with quantity discounts

Before committing, a buyer wants to know what pricing will apply. GET `/rwd-client/order/order-details` returns the customer's pricing template and the quantity discount tiers. Products marked quantityDiscount are summed together and matched against the tiers, and tax is added only when the customer has isTaxed, so an agent can explain the expected order shape before placing it.

Example prompt: Call GET `/rwd-client/order/order-details` and list each product eligible for quantity discounts with the discount tier thresholds that apply

## Key resources

- **Order details** — Customer pricing template, available products, quantity discount tiers, and customer settings
- **Orders** — Create an order from a customerId and product quantities, with optional PoNo and notes

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 60 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 87 / 100
  - AI-Readiness & Agent Experience: 33 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 100 / 100
- **View full report:** https://jentic.com/apis/rwdtrim.com/rwdtrim/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the RWD Client API by hand means passing the company key in the x-api-key header and chaining the order-details lookup into create-order with the right customerId and product ids. Through Jentic you install once, import RWD from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The RWD Client API carries the customer and products in the request body, so rules bound which operations your agent may call, not which customer it orders for. You choose the operations it may call, so placing orders is not included unless you add create-order.
- **Credential handling:** Your RWD 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 'place a wholesale order' or 'get my product pricing', and Jentic returns the matching RWD operation with its input schema so the agent calls the right endpoint without reading the docs.

## Related APIs

- **Katana API** — Manufacturing and inventory management with purchase orders
- **Veeqo API** — Inventory and order management across sales channels
- **ShipBob API Reference** — Fulfilment orders, inventory, and shipping

## FAQ

### What authentication does the RWD Client API use?

The RWD Client API declares an apiKey scheme named ApiKeyAuth in its OpenAPI spec, sent in the `x-api-key` header. The key is linked to your company record and determines which customer data you can access; the spec says to contact your administrator to obtain one. Through Jentic the key is held by your own Jentic One instance and attached at call time.

### Can I set my own prices when creating an RWD order?

No. The spec states that prices come from the customer's assigned pricing template and cannot be overridden through the API. POST `/rwd-client/order/create-order` takes the customerId and product ids with quantities, and the backend calculates quantity discounts, tax, and the total as subTotal minus totalQuantityDiscount plus taxCharge.

### How are quantity discounts and tax applied to RWD orders?

Per the spec, products with quantityDiscount set to true are eligible: their quantities are summed, matched against the discount tiers returned by GET `/rwd-client/order/order-details`, and the matching percentage is applied to each eligible unit price. Tax is applied only when the customer has isTaxed set, at the tax rate applied to subTotal minus totalQuantityDiscount.

### How do I place an RWD order through Jentic?

Search Jentic for 'place a wholesale order', load GET `/rwd-client/order/order-details` to get your product ids, then load POST `/rwd-client/order/create-order` and execute it with customerId and a products list of productId and quantity. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there an RWD MCP server?

You don't need an MCP server to give your agent the RWD Client API. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent finds the order-details and create-order operations when it needs them.

### Can I limit what my agent is allowed to do with the RWD Client API?

Yes. For a quoting assistant, write a rule that allows only GET `/rwd-client/order/order-details.` The agent can read products, pricing, and discount tiers but cannot place orders, and each call it makes is logged. Add the create-order operation only for agents you want buying.
