API Reference Bazaar v#0.3.0

Copy Markdown View Source

Modules

Business logic helpers for UCP Checkout Sessions.

ISO 4217 currency codes supported by UCP.

Business logic helpers for UCP discount capability.

Builder for the UCP Discovery Profile.

Error documents for API responses.

Fulfillment capability helpers: the method and destination types UCP defines, and the default business and platform configuration a handler advertises.

Behaviour for implementing UCP merchant handlers.

Idempotency store on a Cachex cache, for production: entries expire with the cache's default TTL, and Cachex's distributed routers keep records visible across nodes.

In-memory idempotency store on a named ETS table.

Business logic helpers for UCP Messages (errors, warnings, info).

Order documents: building one from a completed checkout, applying the updates a platform sends, and recording fulfillment events.

Phoenix controller that dispatches to your UCP/ACP handler.

Phoenix router macros for mounting UCP and ACP routes.

Platform profiles.

Idempotent replay for requests carrying an Idempotency-Key header.

The UCP request pipeline in one plug: Bazaar.Plugs.UCPHeaders followed by Bazaar.Plugs.Idempotency.

Reads the UCP request headers and negotiates the protocol version.

Plug that validates incoming UCP requests against schemas.

Plug that validates outgoing UCP responses against schemas.

Exception raised when response validation fails in strict mode.

Protocol constants and status mappings for UCP and ACP protocols.

Transforms requests and responses between UCP and ACP protocol formats.

OpenAI product feed schema.

Capability (Business Schema)

Capability (Platform Schema)

Capability (Response Schema)

Catalog Lookup with Loyalty Complete Request

Catalog Search with Loyalty Complete Request

Catalog Lookup with Loyalty Create Request

Catalog Search with Loyalty Create Request

Catalog Lookup with Loyalty Update Request

Catalog Search with Loyalty Update Request

Payment Instrument (Split Payments) Complete Request

Payment Instrument (Split Payments) Create Request

Payment Instrument (Split Payments) Response

Payment Instrument (Split Payments) Update Request

Checkout with Payment Terms Complete Request

Order with Accepted Payment Term Complete Request

Order Payment with Accepted Term Complete Request

Payment with Terms Complete Request

Checkout with Payment Terms Create Request

Order with Accepted Payment Term Create Request

Order Payment with Accepted Term Create Request

Payment with Terms Create Request

Order with Accepted Payment Term Response

Order Payment with Accepted Term Response

Checkout with Payment Terms Update Request

Order with Accepted Payment Term Update Request

Order Payment with Accepted Term Update Request

Payment with Terms Update Request

Location Summary Complete Request

Token Credential Complete Request

Payment Handler (Business Schema)

Payment Handler (Platform Schema)

Payment Handler (Response Schema)

UCP Profile Document

UCP Business Profile Document

Ed25519 pairs with EdDSA

UCP Platform Profile Document

Service (Business Schema)

Service (Platform Schema)

Service (Response Schema)

Buyer with Consent Complete Request

Checkout with Buyer Consent Complete Request

Buyer with Consent Create Request

Buyer with Consent Update Request

Checkout with Cart Complete Request

Checkout with Cart Create Request

Checkout with Cart Response

Checkout with Cart Update Request

Platform Order Schema Complete Request

Platform Order Schema Create Request

Platform Order Schema Response

Platform Order Schema Update Request

Fulfillment Available Method Complete Request

Fulfillment Available Method Create Request

Fulfillment Available Method Response

Fulfillment Available Method Update Request

Fulfillment Destination Complete Request

Fulfillment Destination Create Request

Fulfillment Destination Update Request

Fulfillment Option Base Complete Request

Fulfillment Option Base Create Request

Fulfillment Option Base Update Request

Business Location Destination Complete Request

Business Location Destination Create Request

Business Location Destination Response

Business Location Destination Update Request

Shipping Destination Complete Request

A2A UCP Message Envelope

Embedded Transport Config

Embedded Protocol Message Envelope

JSON-RPC 2.0 Envelope

MCP Tool Call Envelope

UCP Business Schema Complete Request

UCP Platform Schema Complete Request

UCP Cart Response Schema Complete Request

UCP Catalog Response Schema Complete Request

UCP Checkout Response Schema Complete Request

UCP Location Response Schema Complete Request

UCP Order Response Schema Complete Request

UCP Business Schema Create Request

UCP Platform Schema Create Request

UCP Cart Response Schema Create Request

UCP Catalog Response Schema Create Request

UCP Checkout Response Schema Create Request

UCP Location Response Schema Create Request

UCP Order Response Schema Create Request

UCP Business Schema Response

UCP Platform Schema Response

UCP Cart Response Schema Response

UCP Catalog Response Schema Response

UCP Checkout Response Schema Response

UCP Location Response Schema Response

UCP Order Response Schema Response

UCP Business Schema Update Request

UCP Platform Schema Update Request

UCP Cart Response Schema Update Request

UCP Catalog Response Schema Update Request

UCP Checkout Response Schema Update Request

UCP Location Response Schema Update Request

UCP Order Response Schema Update Request

HTTP message signatures (RFC 9421) the way UCP uses them.

A signing key for UCP HTTP message signatures: EC P-256 (ES256) or Ed25519 (EdDSA), as the spec allows.

Telemetry events emitted by Bazaar.

Ready-to-use telemetry logger for Bazaar events.

Validates data against UCP and ACP schemas.

Custom JSV resolver for loading UCP schemas from the priv directory.

Order event delivery to platforms.

One order event to deliver: the order document encoded once, with the Webhook-Id and Webhook-Timestamp that identify it. Nothing here changes between delivery attempts, which is what lets the platform deduplicate retries.

Retry helpers for webhook delivery.

Mix Tasks

Generates Elixir schema modules from UCP JSON Schema files.

Generates Elixir schema modules for all JSON Schema files in a directory.