Response fields

Use response fields to describe API response objects, nested properties, and returned resource shapes.

Response fields are the response-side partner to parameter fields. Use them inside Responses when documenting API output.

Basic example

responsestringrequired

A response field example.

<ResponseField name="response" type="string" required>
  A response field example.
</ResponseField>

Response group

Checkout session response

idstringrequired

Checkout session route key.

totalsobject

Calculated monetary totals for the session.

totals.totalinteger

Final total in the smallest currency unit.

<Responses title="Checkout session response" variant="list">
  <ResponseField name="id" type="string" required>
    Checkout session route key.
  </ResponseField>
  <ResponseField name="totals" type="object" expandable defaultOpen>
    Calculated monetary totals for the session.
    <ResponseField name="totals.total" type="integer">
      Final total in the smallest currency unit.
    </ResponseField>
  </ResponseField>
</Responses>

Nested objects

Response fields can expand nested objects so the visible page stays readable while still documenting the full returned shape.

Offer response

offerobjectrequired

The offer returned by a catalog or checkout API call.

offer.idstringrequired

Stable offer identifier.

offer.slugstringoptional

Public slug when the offer has a hosted route.

Checkout blocks such as order bumps, add-ons, and save offers.

offer.components[].typestringrequired

Component kind used by the checkout renderer.

request_idstringoptional

Trace identifier returned for support and debugging.

<Responses title="Offer response" variant="list">
  <ResponseField name="offer" type="object" required expandable defaultOpen>
    The offer returned by a catalog or checkout API call.
    <ResponseField name="offer.id" type="string" required>
      Stable offer identifier.
    </ResponseField>
    <ResponseField name="offer.components" type="array<object>" expandable>
      Checkout blocks such as order bumps, add-ons, and save offers.
    </ResponseField>
  </ResponseField>
</Responses>

With examples

Pair response fields with a ResponseExample or an ApiEndpoint so the schema and the payload teach the same object.

Response example

Request / response

200 offer

Response
{
  "offer": {
    "id": "off_123",
    "slug": "launch-plan",
    "components": [
      { "type": "order_bump", "title": "Add the workbook" }
    ]
  },
  "request_id": "req_abc"
}
<Responses title="Offer response" variant="list">
  <ResponseField name="offer" type="object" required expandable>
    The offer returned by the API.
  </ResponseField>
</Responses>

<Examples title="Response example">
  <ResponseExample title="200 offer">
    ```json title="Offer response"
    { "offer": { "id": "off_123" }, "request_id": "req_abc" }
    ```
  </ResponseExample>
</Examples>

Authoring rules

Response field rules

Mirror the payloadschema and example

If the example includes a property, document it or intentionally omit it from the example.

Expand objectsnested detail

Use expandable fields for objects and arrays where nested keys matter.

Prefer exact namesdot notation

Use offer.components[].type for nested array values so agents and readers can copy the shape accurately.

Props

namestringrequired

The name of the response value. Dot notation is supported for nested fields.

typestringrequired

Expected type of the response value. This can be any arbitrary string.

defaultstring

The default value.

requiredboolean

Show required beside the field name.

deprecatedboolean

Whether you have deprecated a field.

prestring[]

Labels that appear before the name of the field.

poststring[]

Labels that appear after the name of the field.

Plandalf extensions

optionalboolean

Marks the property as conditional or nullable when the page wants to be explicit.

responsestring

Alias for name, used when imported MDX describes response values with a response prop.

expandableboolean

Renders the row as a collapsible object container.

defaultOpenbooleandefault: false

Opens an expandable response field on first render.

idstring

Stable anchor for direct links to a field.

class | classNamestring

Optional classes for layout adjustments.

Feature detail