# List Shippo carrier accounts

```http
POST https://secure.yoprint.com/v2/api/store/{team_slug}/v2/carrier_account/goshippo
```

- API version: v2
- Operation ID: `v2_public_shipment_carrier_goshippo`
- Section: Shipping › [Shipping rates and estimates](https://developer.yoprint.com/reference/shipping-rates-and-estimates.md)
- Web page: https://developer.yoprint.com/reference/shipping-rates-and-estimates/v2-shipment-carrier-goshippo/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Lists the carrier accounts in your team's connected Shippo account, with their service levels. Read-only: nothing is bought or saved.

Use an account's `object_id` in `carrier_accounts` when you get rates, to rate only those accounts. A service level `token` (for example `usps_priority`) matches `rates[].servicelevel.token`.

The reply is a trimmed copy of Shippo's list, without the usual `success`/`data` envelope: `results`, `messages` and `is_live_mode_warning_required` (always false in production, where every call is live).

## Permission

Any member of the team. No sales order permission is checked. Needs a connected, enabled Shippo integration (Settings > Integrations > Shippo Shipping). Without one the reply is 422 `goshippo_not_enabled` with no message.

## Side effects

- Calls Shippo (read-only; it buys nothing).

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.

## Request body

Content type `application/json`, optional.

Fields:

- `account_id` (string, optional): Only the account with this carrier account number. At most 255 characters.
- `carrier` (string, optional): Only this carrier, for example `usps` or `ups`. Lower-cased for you. At most 100 characters.
- `page` (integer, optional): Shippo page number. Minimum 1.
- `results` (integer, optional): Accounts per page. Minimum 1. Maximum 100.

### Example request

```bash
curl -X POST 'https://secure.yoprint.com/v2/api/store/your-team/v2/carrier_account/goshippo' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1' \
  -H 'Content-Type: application/json' \
  -d '{
    "carrier": "ups",
    "results": 25
  }'
```

## Response

`200` A trimmed copy of Shippo's carrier account list (`results`, `messages`, `is_live_mode_warning_required`), without the YoPrint envelope.

Fields:

- `is_live_mode_warning_required` (boolean, optional)
- `messages` (array of objects, optional)
- `results` (array of objects, optional)
  - Each item:
    - `account_id` (string, optional)
    - `active` (boolean, optional)
    - `carrier` (string, optional)
    - `carrier_name` (string, optional)
    - `is_shippo_account` (boolean, optional): True for Shippo's own discounted account; false for your own carrier account.
    - `object_id` (string, optional): Send in `carrier_accounts` when you get rates.
    - `object_owner` (string, optional): The Shippo user who owns the account, as Shippo sends it (empty when Shippo sends none).
    - `service_levels` (array of objects, optional)
      - Each item:
        - `name` (string, optional)
        - `token` (string, optional)

Example response:

```json
{
  "is_live_mode_warning_required": false,
  "messages": [],
  "results": [
    {
      "account_id": "A1B2C3",
      "active": true,
      "carrier": "ups",
      "carrier_name": "UPS",
      "is_shippo_account": false,
      "object_id": "carrier_0001",
      "object_owner": "alex@example.com",
      "service_levels": [
        {
          "name": "Ground",
          "token": "ups_ground"
        }
      ]
    }
  ]
}
```

## Errors

- `401` The API key is missing or wrong (`unauthenticated`).
- `403` You are not allowed to do this. `api_access_not_in_plan`: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only `{"message": "Insufficient Permission"}`. Other refusals use the error envelope, with `unauthorized` or `user_is_not_authorized`.
- `404` Not found. `page_not_found`: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. `code: null`, with a message that starts "No query results for": there is no record with that id.
- `422` The request was refused and changed nothing. `validation_failed` lists what to fix in `error.fields`; other codes name a business rule, explained in `error.message`. A few checks answer with only `{"message": "..."}`. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer `connect_timeout` ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.
  - When: Shippo isn't connected or is disabled (`goshippo_not_enabled`). Fix: Connect Shippo in the web app first.
  - When: `results` is above 100, or a field has the wrong type. Fix: Fix the field named in the error.
- `500` A business rule refused the request (see the operation's errors), or something failed inside YoPrint. Refusals use the error envelope with a code such as `action_not_allowed`; an unexpected failure answers `{"message": "Server Error"}`. Repeating a refusal gets the same answer; after an unexpected failure, read the record back before you retry a change.
  - When: Shippo refused the request or could not be reached. Shippo errors are not translated into 4xx replies. Fix: Check the addresses, parcels and ids, then retry once. Do not loop.

## Notes

- Shippo's paging fields (`next`, `previous`, `count`) are not passed on. Page with `page` and `results` until `results` comes back short.
- Any team member can read the carrier account numbers in `account_id` and the owner in `object_owner`.

## Related

- [Get shipping rates](https://developer.yoprint.com/reference/shipping-rates-and-estimates/v2-shipment-rate-goshippo.md): `POST /v2/api/store/{team_slug}/v2/shipment_rate/goshippo`
