Skip to content

List Shippo carrier accounts

Open .md

POST/v2/api/store/{team_slug}/v2/carrier_account/goshippo

v2Operation ID v2_public_shipment_carrier_goshippo

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_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team

Request body

application/json, optional.

  • Only the account with this carrier account number.

    • At most 255 characters
  • carrierstring

    Only this carrier, for example usps or ups. Lower-cased for you.

    • At most 100 characters
  • pageinteger

    Shippo page number.

    • Minimum 1
  • resultsinteger

    Accounts per page.

    • Minimum 1
    • Maximum 100

Response

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

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You 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.

  • 404Not 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.

  • 422The 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.
  • 500A 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.