Skip to main content
POST
Send a PACT v3 event
The events endpoint takes a CloudEvent in the PACT v3 format. It needs a token with the pact:read permission, even when your PACT API is public.

Accepted event types

PCF requests

A RequestCreatedEvent asks for the footprints that match its data, which takes the same criteria as the footprint filters: productId, companyId, geography, classification, status, validOn, validAfter and validBefore. A footprint has to match all of them. Variable answers by sending an event back to the requester’s PACT API, at <source>/3/events, where source is the request’s own source. It authenticates with the credentials of the PACT data source whose URL matches that source (see Answering PCF requests). The answer is one of:
  • RequestFulfilledEvent with the matching footprints in pfs.
  • RequestRejectedEvent with error code NotFound when no footprint matches, or the request names no criteria.
  • RequestRejectedEvent with error code BadRequest when more than 100 footprints match. Narrow the request, or page through GET /pact/3/footprints.
The answer’s requestEventId is the request’s id. A request whose source matches none of the company’s PACT data sources gets no answer.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/cloudevents+json

A CloudEvent in the PACT v3 format.

specversion
enum<string>
required
Available options:
1.0
id
string
required
Maximum string length: 256
source
string
required

The sender's PACT API URL. Variable answers a PCF request at <source>/3/events.

Maximum string length: 1024
Example:

"https://partner.example.com/pact"

time
string<date-time>
required
Example:

"2025-01-01T00:00:00.000Z"

type
enum<string>
required
Available options:
org.wbcsd.pact.ProductFootprint.RequestCreatedEvent.3,
org.wbcsd.pact.ProductFootprint.RequestFulfilledEvent.3,
org.wbcsd.pact.ProductFootprint.RequestRejectedEvent.3,
org.wbcsd.pact.ProductFootprint.PublishedEvent.3
data
object
required

For a RequestCreatedEvent, the criteria of the footprints asked for: productId, companyId, geography, classification and status take up to 100 values each; validOn, validAfter and validBefore take one ISO 8601 date.

Example:

Response

The event was accepted