canonical: https://jentic.com/apis/onlinexpress.co.in/onlinexpress

# OnlineXpress B2C API

The OnlineXpress B2C API books and manages courier shipments for business-to-consumer delivery in India. It creates forward and reverse shipments individually or in bulk, tracks a shipment by its order id, validates delivery pincodes, and cancels shipments. A login call issues the bearer token that authorises the shipment operations.

## For AI agents

Book forward and reverse courier shipments individually or in bulk, track by order id, validate pincodes, and cancel shipments for B2C delivery in India.

## Scope

Does not handle payments, warehousing, or return refunds. Use for booking, tracking, and cancelling courier shipments only.

## Capabilities

- Book a forward or reverse courier shipment
- Create many shipments at once with a bulk request
- Track a shipment by its order id
- Validate a delivery pincode before booking
- Cancel one or more shipments

## Use cases

### AI Fulfilment Agent

An AI agent connected through Jentic turns a confirmed order into a booked shipment by validating the delivery pincode and creating the shipment, so an order moves to dispatch without the developer wiring the courier calls by hand. The agent books the shipment, then returns the tracking reference for the order id.

Example prompt: Validate the destination pincode for an order, book a forward shipment, and return the tracking reference

### Bulk Shipment Creation

A store processing a day's orders books them together with a single bulk create request rather than one call per parcel. This keeps dispatch fast at volume, and each resulting shipment can then be tracked by its order id as it moves through the courier network.

Example prompt: Submit a bulk create request for a batch of orders and collect the tracking references for each

### Order Tracking and Cancellation

A support tool checks delivery progress by tracking a shipment by its order id and cancels shipments that are no longer needed, such as a cancelled or undeliverable order. Reverse shipments cover returns, so the same API handles outbound delivery and the pickup leg.

Example prompt: Track a shipment by its order id and, if the order was cancelled, cancel the shipment and confirm the new status

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/shipments` | Create a forward or reverse shipment |
| POST | `/bulkcreate` | Bulk create shipments |
| GET | `/track/{order_id}` | Track a shipment by order id |
| GET | `/pincodes/{pin}` | Validate a delivery pincode |
| POST | `/cancelorder` | Cancel one or more shipments |

## Key resources

- **Shipments** — Create forward and reverse shipments one at a time
- **Bulk Create** — Create many shipments in a single request
- **Tracking** — Shipment status by order id
- **Pincode Validation** — Check whether a delivery pincode is serviceable
- **Cancellation** — Cancel one or more shipments

## 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:** 38 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 64 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 15 / 100
  - Agent Usability: 94 / 100
  - Security: 75 / 100
  - AI Discoverability: 63 / 100
- **View full report:** https://jentic.com/apis/onlinexpress.co.in/onlinexpress/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 OnlineXpress B2C API by hand means calling its login operation for a bearer token, refreshing it, and sequencing the shipment, tracking, and cancellation calls yourself. Through Jentic you install once, import OnlineXpress from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** A rule can give your agent just the shipment-booking and tracking operations and leave cancellation and bulk creation out unless you add them. You choose which operations it may call.
- **Credential handling:** Your OnlineXpress credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'book a shipment' or 'track an order', and Jentic returns the matching OnlineXpress operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shippo API** — Multi-carrier shipping with label generation and tracking.
- **ShipEngine API** — Shipping API for rates, labels, and tracking across carriers.
- **AfterShip API** — Unified shipment tracking across hundreds of carriers.

## FAQ

### What authentication does the OnlineXpress B2C API use?

The OnlineXpress B2C API uses a bearer token in the Authorization header, per its OpenAPI spec, which you obtain from its login operation; the shipment, tracking, and cancellation operations then carry that token. Through Jentic the credentials are held encrypted by your own Jentic One instance and injected at call time.

### Can I track a shipment with the OnlineXpress B2C API?

Yes. The tracking operation returns a shipment's current status by its order id, and you can validate a delivery pincode before booking to confirm it is serviceable. Shipments are booked forward or reverse, individually or in bulk.

### Can I cancel a shipment with the OnlineXpress B2C API?

Yes. The cancellation operation accepts one or more shipments to cancel. Pair it with tracking to confirm the shipment status before and after the cancellation.

### Can I limit what my agent is allowed to do with the OnlineXpress B2C API?

Yes. Write a rule that allows only the shipment-booking and tracking operations, so the agent books and tracks parcels while cancellation and bulk creation stay out of its reach unless you add them. Every call the agent makes is logged.

### How do I book a shipment with the OnlineXpress B2C API through Jentic?

Search by intent in Jentic with a query like 'book a courier shipment', add the OnlineXpress B2C API from the Jentic API Directory, and your agent validates the pincode then creates the shipment and returns the tracking reference. To run it on your own infrastructure, install Jentic One from its GitHub repo.
