Promotion codes
Delete promotion code
Delete a promotion code
DELETE
/
v1
/
promotion-codes
Delete promotion code
curl --request DELETE \
--url https://api.example.com/v1/promotion-codesimport requests
url = "https://api.example.com/v1/promotion-codes"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/v1/promotion-codes', 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://api.example.com/v1/promotion-codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://api.example.com/v1/promotion-codes"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/v1/promotion-codes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/promotion-codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"status": 1,
"message": "Promotion code deleted in the app successfully"
}
}
Endpoint
DELETE https://api.partnero.com/v1/promotion-codes
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Promotion code to delete |
coupon | object | Yes | Parent coupon reference |
coupon.uuid_code | string | Yes | UUID of the parent coupon |
Request
cURL
curl --location --request DELETE 'https://api.partnero.com/v1/promotion-codes' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"code": "PROMO123",
"coupon": {
"uuid_code": "coupon_123"
}
}'
Response
{
"data": {
"status": 1,
"message": "Promotion code deleted in the app successfully"
}
}
Deletion is permanent. Promotion codes are force-deleted and cannot be restored. To temporarily disable a code, use the update endpoint instead.
Previous
OverviewReceive real-time HTTP notifications for partner sign-ups, customer creation, and transactions. Automate your affiliate program workflows.
Next
⌘I
Delete promotion code
curl --request DELETE \
--url https://api.example.com/v1/promotion-codesimport requests
url = "https://api.example.com/v1/promotion-codes"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/v1/promotion-codes', 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://api.example.com/v1/promotion-codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://api.example.com/v1/promotion-codes"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/v1/promotion-codes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/promotion-codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"status": 1,
"message": "Promotion code deleted in the app successfully"
}
}
