Excluir um desconto da loja
curl --request DELETE \
--url https://api.dooki.com.br/v2/{alias}/discounts/{id} \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>'import requests
url = "https://api.dooki.com.br/v2/{alias}/discounts/{id}"
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'User-Token': '<api-key>', 'User-Secret-Key': '<api-key>'}
};
fetch('https://api.dooki.com.br/v2/{alias}/discounts/{id}', 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.dooki.com.br/v2/{alias}/discounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"User-Secret-Key: <api-key>",
"User-Token: <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://api.dooki.com.br/v2/{alias}/discounts/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<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://api.dooki.com.br/v2/{alias}/discounts/{id}")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/discounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1520,
"store_id": 1319250,
"discount_type_id": 1520,
"name": "Lucas",
"entry_condition_type": "amount",
"entry_condition_value": 10,
"discount_method": "percent",
"discount_value": 100,
"discount_type": "buy_x_get_y",
"accumulate": false,
"start_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}Descontos
Excluir um desconto da loja
Exclui um desconto na loja
DELETE
/
{alias}
/
discounts
/
{id}
Excluir um desconto da loja
curl --request DELETE \
--url https://api.dooki.com.br/v2/{alias}/discounts/{id} \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>'import requests
url = "https://api.dooki.com.br/v2/{alias}/discounts/{id}"
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'User-Token': '<api-key>', 'User-Secret-Key': '<api-key>'}
};
fetch('https://api.dooki.com.br/v2/{alias}/discounts/{id}', 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.dooki.com.br/v2/{alias}/discounts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"User-Secret-Key: <api-key>",
"User-Token: <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://api.dooki.com.br/v2/{alias}/discounts/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<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://api.dooki.com.br/v2/{alias}/discounts/{id}")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/discounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1520,
"store_id": 1319250,
"discount_type_id": 1520,
"name": "Lucas",
"entry_condition_type": "amount",
"entry_condition_value": 10,
"discount_method": "percent",
"discount_value": 100,
"discount_type": "buy_x_get_y",
"accumulate": false,
"start_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"end_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"created_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"updated_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
}
}Path Parameters
Alias da loja
Response
Detalhes do desconto
Representa os atributos de um Desconto
Example:
1520
Example:
1319250
Example:
1520
Example:
"Lucas"
Example:
"amount"
Example:
10
Example:
"percent"
Example:
100
Example:
"buy_x_get_y"
Example:
false
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I