Skip to main content

Delete Shipping Channel

Deletes a specific shipping channel by ID for the authenticated user.

Endpoint

DELETE /v1/shipping-channels/{id}

Authentication

API key required. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

ParameterTypeDescription
idstringThe ID of the shipping channel to delete.

Response

200 OK

{
"message": "Shipping channel deleted successfully"
}

Error Responses

Status CodeDescription
401Unauthorized - Invalid or missing API key
403Forbidden - You don't have permission to access this shipping channel
404Not Found - The specified shipping channel could not be found
429Too Many Requests - Rate limit exceeded
500Server Error - Something went wrong on our end

Example Request

cURL

curl -X DELETE \
https://api.shipping-channels.com/v1/shipping-channels/ch_123456 \
-H "Authorization: Bearer YOUR_API_KEY"

PHP

<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.shipping-channels.com/v1/shipping-channels/ch_123456', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
],
]);

$data = json_decode($response->getBody(), true);

JavaScript

fetch('https://api.shipping-channels.com/v1/shipping-channels/ch_123456', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));