Skip to Content
Prets Developer Portal

Expanding responses

Ask for fields that a response leaves out by default with the expand query parameter.

Some fields are left out of a response by default because they are large or slow to load. Ask for them with the expand query parameter.

curl "https://api.prets.app/v1/quotes?expand=lineItems" \
  -H "Authorization: Bearer ak_..."

To expand more than one field, repeat the parameter:

curl "https://api.prets.app/v1/quotes?expand=lineItems&expand=progressSummary" \
  -H "Authorization: Bearer ak_..."

Expandable fields

Endpointexpand valueWhat it adds
List quoteslineItemsEach quote's line items. Without it, list items leave out lineItems.
List quotesprogressSummaryA short summary of where the quote stands. Left out when there is nothing to show.

Get a quote always returns the full quote, including lineItems and, when there is one, progressSummary. It has no expand.

List cases and List case messages accept expand but have no expandable fields yet. Any value returns 400.

Unknown fields

expand only accepts the values listed for that endpoint. Any other value returns 400:

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "Unknown expand field 'customer'",
    "param": "expand",
    "requestId": "..."
  }
}

Expanding across pages

On a paginated list, links.next.href keeps your expand values, so every page comes back with the same fields. If you build the next URL from links.next.cursor instead, send expand again. See Pagination.

On this page