Listar carrinhos abandonados de um cliente
curl --request GET \
--url https://api.dooki.com.br/v2/{alias}/customers/{id}/carts \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>'import requests
url = "https://api.dooki.com.br/v2/{alias}/customers/{id}/carts"
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'User-Token': '<api-key>', 'User-Secret-Key': '<api-key>'}
};
fetch('https://api.dooki.com.br/v2/{alias}/customers/{id}/carts', 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}/customers/{id}/carts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}/customers/{id}/carts"
req, _ := http.NewRequest("GET", 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.get("https://api.dooki.com.br/v2/{alias}/customers/{id}/carts")
.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}/customers/{id}/carts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"merchant_id": "1",
"customer_id": 123,
"token": "<string>",
"shipment_service_id": 123,
"payment_alias": "<string>",
"has_recommendation": true,
"is_upsell": true,
"total_transactions": 123,
"simulate_url": "<string>",
"unauth_simulate_url": "<string>",
"totalizers": {
"total_items": "<string>",
"subtotal": 123,
"discount": 123,
"shipment": 123,
"shipment_original_value": 123,
"shipment_discount_value": 123,
"shipment_discount_percent": "<string>",
"promocode_discount_value": 123,
"combos_discount_value": 123,
"total": 123,
"subtotal_formated": "<string>",
"discount_formated": "<string>",
"total_formated": "<string>",
"shipment_formated": "<string>"
},
"tracking_data": {
"name": "<string>",
"email": "jsmith@example.com"
},
"utm_source": "<string>",
"utm_campaign": "<string>",
"utm_medium": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"last_transaction_status": "<string>"
}
]
}Cliente
Listar carrinhos abandonados de um cliente
Obtém uma lista de carrinhos abandonados de um cliente específico
GET
/
{alias}
/
customers
/
{id}
/
carts
Listar carrinhos abandonados de um cliente
curl --request GET \
--url https://api.dooki.com.br/v2/{alias}/customers/{id}/carts \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>'import requests
url = "https://api.dooki.com.br/v2/{alias}/customers/{id}/carts"
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'User-Token': '<api-key>', 'User-Secret-Key': '<api-key>'}
};
fetch('https://api.dooki.com.br/v2/{alias}/customers/{id}/carts', 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}/customers/{id}/carts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}/customers/{id}/carts"
req, _ := http.NewRequest("GET", 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.get("https://api.dooki.com.br/v2/{alias}/customers/{id}/carts")
.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}/customers/{id}/carts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"merchant_id": "1",
"customer_id": 123,
"token": "<string>",
"shipment_service_id": 123,
"payment_alias": "<string>",
"has_recommendation": true,
"is_upsell": true,
"total_transactions": 123,
"simulate_url": "<string>",
"unauth_simulate_url": "<string>",
"totalizers": {
"total_items": "<string>",
"subtotal": 123,
"discount": 123,
"shipment": 123,
"shipment_original_value": 123,
"shipment_discount_value": 123,
"shipment_discount_percent": "<string>",
"promocode_discount_value": 123,
"combos_discount_value": 123,
"total": 123,
"subtotal_formated": "<string>",
"discount_formated": "<string>",
"total_formated": "<string>",
"shipment_formated": "<string>"
},
"tracking_data": {
"name": "<string>",
"email": "jsmith@example.com"
},
"utm_source": "<string>",
"utm_campaign": "<string>",
"utm_medium": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"last_transaction_status": "<string>"
}
]
}Was this page helpful?
⌘I