> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goshippo.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.goshippo.com/feedback

```json
{
  "path": "/docs/API_Concepts/APIExpand",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Expand response

> Learn how to use the expand query parameter to include full object details in Shippo API responses.

In some Shippo API responses, instead of returning parameters, the endpoint will return the object ID of the object that contains the parameters. This is available for a number of Shippo objects.

For example, in the transaction response, the `rate` is returned as an object ID. The Shippo API is designed in this way to manage the size of the response.

**Request:**

```shell Get a transaction theme={null}
curl --location 'https://api.goshippo.com/transactions/3e294ad43f7e417889c3c3766df2589b' \
--header 'Authorization: ShippoToken <API_TOKEN>' \
--header 'Content-Type: application/json'
```

**Response:**

```json response sample theme={null}
{
    "object_state": "VALID",
    "status": "SUCCESS",
    "object_created": "2024-04-23T16:03:01.881Z",
    "object_updated": "2024-04-23T16:03:04.906Z",
    "object_id": "3e294ad43f7e417889c3c3766df2589b",
    "object_owner": "mrhippo@goshippo.com",
    "test": true,
    "rate": "819282d7ec8d4b1db3d03bbf8f0e1a7d",
    "tracking_number": "EB000098472US",
    "tracking_status": "UNKNOWN",
}

```

You can choose to expand an object using the query parameter `expand`. When you expand an object, the returned response includes the parameters in that object.

**Request:**

```shell Get a transaction including expand request theme={null}
curl --location 'https://api.goshippo.com/transactions/3e294ad43f7e417889c3c3766df2589b?expand="rate"' \
--header 'Authorization: ShippoToken <API_TOKEN>' \
--header 'Content-Type: application/json'
```

**Response:**

```json Get a transaction including expand response theme={null}
{
    "object_state": "VALID",
    "status": "SUCCESS",
    "object_created": "2024-04-23T16:03:01.881Z",
    "object_updated": "2024-04-23T16:03:04.906Z",
    "object_id": "3e294ad43f7e417889c3c3766df2589b",
    "object_owner": "mrhippo@goshippo.com",
    "test": true,
    "rate": {
        "object_id": "819282d7ec8d4b1db3d03bbf8f0e1a7d",
        "amount": "76.66",
        "currency": "USD",
        "amount_local": "71.95",
        "currency_local": "EUR",
        "provider": "USPS",
        "servicelevel_name": "Priority Mail Express International",
        "servicelevel_token": "usps_priority_mail_express_international",
        "carrier_account": "b19e750708384303ac19ca693fe037ce"
    },
    "tracking_number": "EB000098472US",
    "tracking_status": "UNKNOWN",
}
```

You can choose to expand multiple objects together at once using an array.

```shell Get a transaction including expand multiple objects theme={null}
curl --location 'https://api.goshippo.com/transactions/3e294ad43f7e417889c3c3766df2589b?expand=["rate","parcel"]' \
--header 'Authorization: ShippoToken <API_TOKEN>' \
--header 'Content-Type: application/json'
```

This method does not support recursion.
