concepts / request-response
Stable

Request And Response

  • Request fields describe accepted input.
  • Response fields describe returned output.
  • The platform derives typed protobuf messages from the contract.

Request Fields

Mark fields required when every caller must provide them. Use optional fields when the workflow has a clear default or can proceed without the value. Apply transforms and validators at the contract boundary so runnable logic receives predictable data.

Field shapeMeaning
email: stringRequired text value.
note: string?Optional text value.
age: number ! min(18)Required number with validation.

Runtime boundaries reject non-finite number values. A numeric time is exact integer epoch milliseconds in the range -9007199254740991 through 9007199254740991; RFC 3339 strings must also resolve to exact millisecond precision. Protobuf int64 values outside that exact range are rejected instead of rounded.

Response Fields

Keep one stable response shape for each API. Consumers can bind required fields directly and handle optional fields explicitly. The runnable response must match the declared names and types.

code
1return Response {2  success: true3  message: "Record updated"4  record_id: request.record_id5}

Typed Transport

App Marché derives a protobuf message from each contract. Page connections and platform clients should use that contract instead of inventing a second payload shape. This keeps validation, runtime decoding, and consumer bindings aligned.