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

# Shoprite Message Streaming APIs

The Shoprite Message Streaming API publishes messages, such as events, to Kafka topics over HTTP so downstream consumers can pick them up. It acts as a Kafka producer proxy: a client posts one message or a list of messages, each with its targets (topic plus partition) and a content block carrying an encoding of UTF-8, UTF-16, or base64 and the payload. Partitioning supports round robin by default, message key, numbered partition, and sticky partitions for batched messages that share a batchReference.

## For AI agents

Publish single or multiple event messages to one or more Shoprite Kafka topics over HTTP, choosing round robin, message key, numbered, or sticky partitioning per target.

## Scope

Does not create topics, consume messages, or manage Kafka clusters. Use for publishing messages to existing Shoprite Kafka topics only.

## Capabilities

- Publish a single message to one or more Kafka topic and partition targets in one call
- Publish multiple messages in one submission, or as a batch to sticky partitions sharing a batchReference
- Route messages by round robin, message key, or explicit partition number per target
- Send payloads as UTF-8, UTF-16, or base64-encoded binary with a MIME contentType
- Fan the same source message out to several topics for consumer groups that need a transformed copy

## Use cases

### Agent that emits business events to Kafka

An AI agent that processes store or order activity often needs to tell other systems what happened. Through Jentic the agent searches for 'publish a message to a Kafka topic', loads the publishSingle operation, and posts the event with its contractID, interfaceIdentifier, and topic target, while the Basic credentials are injected at call time. Downstream consumers read the event from the topic without the agent holding a Kafka client.

Example prompt: Call POST `/messages/publishSingle` with publishVolume 'publishSingleMessage', the contractID and interfaceIdentifier, and a message targeting topic 'orders' with a roundRobinPartition and a UTF-8 JSON payload

### Ordered delivery with message-key partitioning

Events for the same entity, such as every update to one order, should land on the same partition so consumers see them in order. Each message target can use a messageKeyPartition whose messageKey decides the partition, or a numberedPartition with an explicit partitionNumber. This keeps per-entity ordering without the client managing Kafka partition assignment.

Example prompt: Publish three status updates for order 'ORD-1001' with POST `/messages/publishMultiple`, each targeting topic 'order-status' with a messageKeyPartition whose messageKey is 'ORD-1001'

### Batched publishing to sticky partitions

Bulk loads such as a nightly price or stock export are sent as one batch so they stay together. The publishMultiple operation accepts a list of messages and, for the publishBatchMessages volume, a batchReference that every stickyPartition target repeats, so the whole batch lands on the same topic and partition. Kafka's default limit of 1MB per message still applies to each payload.

Example prompt: Call POST `/messages/publishMultiple` with publishVolume 'publishBatchMessages', a batchReference UUID, and 50 stock-level messages whose stickyPartition targets carry the same batchReference

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/messages/publishSingle` | Publish a single message to one or more topic targets |
| POST | `/messages/publishMultiple` | Publish multiple or batched messages |

## Key resources

- **Messages** — Kafka messages with targets (topic and partition), a contentType, and content holding the encoding and payload
- **Partitions** — Partitioning strategies per target: roundRobinPartition, messageKeyPartition, numberedPartition, and stickyPartition

## 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:** 0 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 54 / 100
  - Developer Experience & Jentic Compatibility: 57 / 100
  - AI-Readiness & Agent Experience: 51 / 100
  - Agent Usability: 94 / 100
  - Security: 10 / 100
  - AI Discoverability: 0 / 100
- **View full report:** https://jentic.com/apis/shoprite.com/shoprite/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 Message Streaming API by hand means sending Basic credentials, building the discriminated publishVolume and partition objects correctly, and base64-encoding binary payloads. Through Jentic you install once, import it from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** The Shoprite API carries the Kafka topic and partition inside the request body, so rules bound which operations your agent may call, not which topic. Limit the agent to the operations it needs, such as single-message publishing, and leave bulk publishing out unless you add it.
- **Credential handling:** Your Basic 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 'publish a message to a Kafka topic' or 'send a batch of events', and Jentic returns the matching Shoprite operation with its input schema so the agent builds the partition and content objects correctly.

## Related APIs

- **Confluent Cloud** — Provision and manage the Kafka clusters and topics that messages are published to
- **Aiven** — Managed Kafka and other open-source data services across clouds
- **Ably** — Publish messages to realtime pub/sub channels over HTTP

## FAQ

### What authentication does the Shoprite Message Streaming API use?

Per its OpenAPI spec, the Message Streaming API uses HTTP Basic authentication on both operations, sent as an Authorization: Basic header. Each request body also carries a contractID, a UUID the spec describes as a proprietary form of API key, plus an interfaceIdentifier. Through Jentic the Basic credentials are stored by your own instance and attached at call time, so they never enter the agent's context.

### Can I choose which Kafka partition a message goes to?

Yes. Each message target names a topic and a partition whose type is roundRobinPartition (the default), messageKeyPartition with a messageKey, numberedPartition with a partitionNumber, or stickyPartition with a batchReference for batched messages.

### What are the rate limits for the Shoprite Message Streaming API?

The OpenAPI spec does not specify rate limits. It does note that Kafka has a default limit of 1MB per message payload. Check the Shoprite interface documentation at https://soldoc.shoprite.com/datastreaming/definitions for current limits.

### Is there a Shoprite Message Streaming MCP server?

You don't need an MCP server to give your agent the Message Streaming API. Jentic connects it directly from the API Directory: import it, store your Basic credentials once, and your agent calls the publish operations it needs, discovered on demand instead of preloaded into its context.

### How do I publish an event to Kafka through Jentic?

Search Jentic for 'publish a message to a Kafka topic', load the POST `/messages/publishSingle` operation, and send the contractID, interfaceIdentifier, publishVolume, and a message with its topic target and content. The API answers 202 with a requestId you can log. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Shoprite Message Streaming API?

Partly. A rule that allows only POST `/messages/publishSingle` lets the agent send one event per call while keeping bulk sends through publishMultiple out of reach, and every call it makes is logged. Which topic receives the event is still decided by the request body, so the rule cannot restrict topics.
