Delete subscription
curl --request DELETE \
--url https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-shop-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_bodyPush Subscriptions
Delete subscription
Delete a specific push subscription.
DELETE
/
push-subscriptions
/
{subscriptionId}
Delete subscription
curl --request DELETE \
--url https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>' \
--header 'x-shop-id: <api-key>'import requests
url = "https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}"
headers = {
"Authorization": "Bearer <token>",
"x-shop-id": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'x-shop-id': '<api-key>'}
};
fetch('https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-shop-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-shop-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.header("x-shop-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/push-subscriptions/{subscriptionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-shop-id"] = '<api-key>'
response = http.request(request)
puts response.read_bodyRequest
DELETE /push-subscriptions/678bd7e2e37452d19efcb4e9
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Provide the customer token as Bearer <jwt>. |
x-shop-id | string | Identify the shop. |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
subscriptionId | string | Yes | Subscription identifier. |
Successful response
{
"status": 200,
"success": true,
"message": "Subscription deleted",
"data": {}
}
Error response
{
"status": 404,
"success": false,
"message": "Subscription not found",
"data": {}
}
Authorizations
JWT issued by the Salesive Store API for authenticated shoppers.
Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.
Path Parameters
Response
200
Subscription deleted
Was this page helpful?
⌘I

