You can programmatically disconnect any carrier you have connected to your ShipStation API account using the DELETE method with the /v2/connections/carriers/ endpoint.
You may want to do this if you no longer use the services of the connected carrier account, or if you wish to use the same account but with a different carrier_id. For the latter case, you would disconnect the carrier from your account and then reconnect it.
Disconnecting a carrier through the API is available on ShipStation API (ShipEngine) plans only. It is not available to ShipStation accounts.
- The unique
carrier_idof the connected carrier you wish to disconnect. - The
carrier_namefor that carrier, such asups,fedex, ordhl_express.
You can list carriers to find both the carrier_id and carrier_name you need. The carrier_id is especially important if you have multiple accounts for the same carrier.
- If your carrier requires manifesting, you must manifest open shipments for that carrier before disconnecting it from your ShipStation API account.
- If you have any previously created labels under this carrier connection that you still wish to void, you must do so prior to disconnecting the carrier account.
- If you reconnect a disconnected carrier account, the new connection will have a new
carrier_id.
DELETE /v2/connections/carriers/{carrier_name}/{carrier_id}
See the Disconnect a carrier API reference for the full endpoint details.
- Productionhttps://api.shipstation.com/v2/connections/carriers/{carrier_name}/{carrier_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://api.shipstation.com/v2/connections/carriers/dhl_express/se-28529731 \
-H 'api-key: YOUR_API_KEY_HERE'- text/plain
- application/json
No response exampleWhen a carrier has been successfully disconnected, you will receive an HTTP 204 No Content status.