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.
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
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.