Skip to main content

Import Service Level Mappings

POST 

/api/shippo/instances/:integration_instance/service-levels/import

Applies a mapping CSV (the format produced by Export Service Level Mappings). Send as multipart/form-data.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Form fields:

  • file (file, required): a CSV (csv or txt), max 2 MB, with a header row.

Each row is matched to a service level by id, or by carrier_account_object_id + service_level_token (the older carrier_account_id header is still accepted). The mapping target is resolved by shipping_method_id, else by shipping_method_name (matches a shipping method's name or full name, case-insensitive). A row with both shipping method columns blank clears the mapping. The enabled column accepts yes/no/true/false/1/0; blank leaves it unchanged, so an unedited export re-imports with no changes.

Returns 200 with a summary: created (newly mapped), updated (re-mapped, or only the enabled flag changed), deleted (cleared) and errors (one message per rejected line or invalid enabled value). Returns 422 when the file is missing, not a CSV, too large or unreadable; 404 for an unknown instance.

Authentication: Requires a Bearer token.

Request​

Responses​

OK

Response Headers
    Content-Type