curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/orders \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"number": 123,
"customer_id": 123,
"value_total": 123,
"value_products": 1,
"value_discount": 1,
"value_shipment": 1,
"shipment_service": "<string>",
"days_delivery": 1,
"items": [
{
"product_id": 123,
"sku_id": 123,
"sku": "<string>",
"quantity": 2,
"price": 1,
"gift": true,
"gift_value": 1,
"has_recomm": true
}
],
"address": [
{
"receiver": "<string>",
"zipcode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"uf": "<string>"
}
],
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": true,
"marketplace_sale_number": "<string>",
"value_tax": 1,
"ip": "200.179.10.10",
"transactions": [
{
"customer_id": 123,
"authorized_at": "2025-07-31 23:59:59",
"amount": 1,
"installments": 2,
"holder_name": "<string>",
"holder_document": "<string>",
"payment_id": 123,
"affiliation_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": true,
"captured": true,
"captured_at": "2025-07-31 23:59:59",
"cancelled": true,
"billet_url": "<string>",
"billet_date": "2023-12-25"
}
],
"sent_to_antifraud": true,
"capture_date": "2023-12-25",
"authorized_at": "2025-07-31 23:59:59",
"captured_at": "2025-07-31 23:59:59",
"cancelled_at": "2025-07-31 23:59:59",
"track_code": "<string>",
"track_url": "<string>"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/orders"
payload = {
"number": 123,
"customer_id": 123,
"value_total": 123,
"value_products": 1,
"value_discount": 1,
"value_shipment": 1,
"shipment_service": "<string>",
"days_delivery": 1,
"items": [
{
"product_id": 123,
"sku_id": 123,
"sku": "<string>",
"quantity": 2,
"price": 1,
"gift": True,
"gift_value": 1,
"has_recomm": True
}
],
"address": [
{
"receiver": "<string>",
"zipcode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"uf": "<string>"
}
],
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": True,
"marketplace_sale_number": "<string>",
"value_tax": 1,
"ip": "200.179.10.10",
"transactions": [
{
"customer_id": 123,
"authorized_at": "2025-07-31 23:59:59",
"amount": 1,
"installments": 2,
"holder_name": "<string>",
"holder_document": "<string>",
"payment_id": 123,
"affiliation_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": True,
"captured": True,
"captured_at": "2025-07-31 23:59:59",
"cancelled": True,
"billet_url": "<string>",
"billet_date": "2023-12-25"
}
],
"sent_to_antifraud": True,
"capture_date": "2023-12-25",
"authorized_at": "2025-07-31 23:59:59",
"captured_at": "2025-07-31 23:59:59",
"cancelled_at": "2025-07-31 23:59:59",
"track_code": "<string>",
"track_url": "<string>"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
number: 123,
customer_id: 123,
value_total: 123,
value_products: 1,
value_discount: 1,
value_shipment: 1,
shipment_service: '<string>',
days_delivery: 1,
items: [
{
product_id: 123,
sku_id: 123,
sku: '<string>',
quantity: 2,
price: 1,
gift: true,
gift_value: 1,
has_recomm: true
}
],
address: [
{
receiver: '<string>',
zipcode: '<string>',
street: '<string>',
number: '<string>',
neighborhood: '<string>',
city: '<string>',
uf: '<string>'
}
],
marketplace_id: 123,
marketplace_account_id: 123,
authorized: true,
marketplace_sale_number: '<string>',
value_tax: 1,
ip: '200.179.10.10',
transactions: [
{
customer_id: 123,
authorized_at: '2025-07-31 23:59:59',
amount: 1,
installments: 2,
holder_name: '<string>',
holder_document: '<string>',
payment_id: 123,
affiliation_id: 123,
marketplace_id: 123,
marketplace_account_id: 123,
authorized: true,
captured: true,
captured_at: '2025-07-31 23:59:59',
cancelled: true,
billet_url: '<string>',
billet_date: '2023-12-25'
}
],
sent_to_antifraud: true,
capture_date: '2023-12-25',
authorized_at: '2025-07-31 23:59:59',
captured_at: '2025-07-31 23:59:59',
cancelled_at: '2025-07-31 23:59:59',
track_code: '<string>',
track_url: '<string>'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/orders', 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}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => 123,
'customer_id' => 123,
'value_total' => 123,
'value_products' => 1,
'value_discount' => 1,
'value_shipment' => 1,
'shipment_service' => '<string>',
'days_delivery' => 1,
'items' => [
[
'product_id' => 123,
'sku_id' => 123,
'sku' => '<string>',
'quantity' => 2,
'price' => 1,
'gift' => true,
'gift_value' => 1,
'has_recomm' => true
]
],
'address' => [
[
'receiver' => '<string>',
'zipcode' => '<string>',
'street' => '<string>',
'number' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'uf' => '<string>'
]
],
'marketplace_id' => 123,
'marketplace_account_id' => 123,
'authorized' => true,
'marketplace_sale_number' => '<string>',
'value_tax' => 1,
'ip' => '200.179.10.10',
'transactions' => [
[
'customer_id' => 123,
'authorized_at' => '2025-07-31 23:59:59',
'amount' => 1,
'installments' => 2,
'holder_name' => '<string>',
'holder_document' => '<string>',
'payment_id' => 123,
'affiliation_id' => 123,
'marketplace_id' => 123,
'marketplace_account_id' => 123,
'authorized' => true,
'captured' => true,
'captured_at' => '2025-07-31 23:59:59',
'cancelled' => true,
'billet_url' => '<string>',
'billet_date' => '2023-12-25'
]
],
'sent_to_antifraud' => true,
'capture_date' => '2023-12-25',
'authorized_at' => '2025-07-31 23:59:59',
'captured_at' => '2025-07-31 23:59:59',
'cancelled_at' => '2025-07-31 23:59:59',
'track_code' => '<string>',
'track_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dooki.com.br/v2/{alias}/orders"
payload := strings.NewReader("{\n \"number\": 123,\n \"customer_id\": 123,\n \"value_total\": 123,\n \"value_products\": 1,\n \"value_discount\": 1,\n \"value_shipment\": 1,\n \"shipment_service\": \"<string>\",\n \"days_delivery\": 1,\n \"items\": [\n {\n \"product_id\": 123,\n \"sku_id\": 123,\n \"sku\": \"<string>\",\n \"quantity\": 2,\n \"price\": 1,\n \"gift\": true,\n \"gift_value\": 1,\n \"has_recomm\": true\n }\n ],\n \"address\": [\n {\n \"receiver\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"uf\": \"<string>\"\n }\n ],\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"marketplace_sale_number\": \"<string>\",\n \"value_tax\": 1,\n \"ip\": \"200.179.10.10\",\n \"transactions\": [\n {\n \"customer_id\": 123,\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"amount\": 1,\n \"installments\": 2,\n \"holder_name\": \"<string>\",\n \"holder_document\": \"<string>\",\n \"payment_id\": 123,\n \"affiliation_id\": 123,\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"captured\": true,\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled\": true,\n \"billet_url\": \"<string>\",\n \"billet_date\": \"2023-12-25\"\n }\n ],\n \"sent_to_antifraud\": true,\n \"capture_date\": \"2023-12-25\",\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled_at\": \"2025-07-31 23:59:59\",\n \"track_code\": \"<string>\",\n \"track_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dooki.com.br/v2/{alias}/orders")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": 123,\n \"customer_id\": 123,\n \"value_total\": 123,\n \"value_products\": 1,\n \"value_discount\": 1,\n \"value_shipment\": 1,\n \"shipment_service\": \"<string>\",\n \"days_delivery\": 1,\n \"items\": [\n {\n \"product_id\": 123,\n \"sku_id\": 123,\n \"sku\": \"<string>\",\n \"quantity\": 2,\n \"price\": 1,\n \"gift\": true,\n \"gift_value\": 1,\n \"has_recomm\": true\n }\n ],\n \"address\": [\n {\n \"receiver\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"uf\": \"<string>\"\n }\n ],\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"marketplace_sale_number\": \"<string>\",\n \"value_tax\": 1,\n \"ip\": \"200.179.10.10\",\n \"transactions\": [\n {\n \"customer_id\": 123,\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"amount\": 1,\n \"installments\": 2,\n \"holder_name\": \"<string>\",\n \"holder_document\": \"<string>\",\n \"payment_id\": 123,\n \"affiliation_id\": 123,\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"captured\": true,\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled\": true,\n \"billet_url\": \"<string>\",\n \"billet_date\": \"2023-12-25\"\n }\n ],\n \"sent_to_antifraud\": true,\n \"capture_date\": \"2023-12-25\",\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled_at\": \"2025-07-31 23:59:59\",\n \"track_code\": \"<string>\",\n \"track_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 123,\n \"customer_id\": 123,\n \"value_total\": 123,\n \"value_products\": 1,\n \"value_discount\": 1,\n \"value_shipment\": 1,\n \"shipment_service\": \"<string>\",\n \"days_delivery\": 1,\n \"items\": [\n {\n \"product_id\": 123,\n \"sku_id\": 123,\n \"sku\": \"<string>\",\n \"quantity\": 2,\n \"price\": 1,\n \"gift\": true,\n \"gift_value\": 1,\n \"has_recomm\": true\n }\n ],\n \"address\": [\n {\n \"receiver\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"uf\": \"<string>\"\n }\n ],\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"marketplace_sale_number\": \"<string>\",\n \"value_tax\": 1,\n \"ip\": \"200.179.10.10\",\n \"transactions\": [\n {\n \"customer_id\": 123,\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"amount\": 1,\n \"installments\": 2,\n \"holder_name\": \"<string>\",\n \"holder_document\": \"<string>\",\n \"payment_id\": 123,\n \"affiliation_id\": 123,\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"captured\": true,\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled\": true,\n \"billet_url\": \"<string>\",\n \"billet_date\": \"2023-12-25\"\n }\n ],\n \"sent_to_antifraud\": true,\n \"capture_date\": \"2023-12-25\",\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled_at\": \"2025-07-31 23:59:59\",\n \"track_code\": \"<string>\",\n \"track_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"delivered": true,
"track_url": "<string>",
"track_code": "<string>",
"authorized": true,
"customer_id": 123,
"promocode_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"has_recomm": true,
"number": 123,
"marketplace_partner_id": 123,
"marketplace_sale_number": 123,
"value_total": 123,
"value_products": 123,
"value_discount": 123,
"value_shipment": 123,
"value_tax": 123,
"shipment_service": "<string>",
"shipment_quote_id": 123,
"days_delivery": 123,
"utm_source": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"ip": "<string>",
"items": [
{
"id": 123,
"product_id": 123,
"sku_id": 123,
"item_sku": "<string>",
"quantity": 123,
"price": 123,
"price_cost": 123,
"shipment_cost": 123,
"gift": true,
"gift_value": 123,
"has_recomm": 123,
"is_digital": true,
"freebie_id": 123,
"bundle_id": 123,
"bundle_name": "<string>"
}
],
"address": [
{
"id": 123,
"order_id": 123,
"address_name": "<string>",
"street": "<string>",
"number": 123,
"complement": "<string>",
"reference": "<string>",
"neighborhood": "<string>",
"receiver": "<string>",
"zipcode": 123,
"zip_code": 123,
"full_address": "<string>",
"city": "<string>",
"uf": "<string>",
"country": "<string>"
}
],
"transactions": {
"data": {
"id": 123,
"customer_id": 123,
"payment_id": 123,
"affiliation_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": true,
"captured": true,
"cancelled": true,
"can_be_captured": true,
"can_be_cancelled": true,
"gateway_transaction_id": 123,
"gateway_order_id": 123,
"gateway_authorization_code": "<string>",
"gateway_billet_id": 123,
"amount": 123,
"buyer_amount": 123,
"installment_value": 123,
"buyer_installment_value": 123,
"installments": 123,
"installment_formated": "<string>",
"buyer_installment_formated": "<string>",
"status": "<string>",
"error_message": "<string>",
"bank_name": "<string>",
"bank_alias": "<string>",
"truncated_card": "<string>",
"holder_name": "<string>",
"holder_document": "<string>",
"billet_url": "<string>",
"billet_barcode": "<string>",
"billet_date": "<string>",
"billet_our_number": "<string>",
"billet_document_number": "<string>",
"billet_whatsapp_link": "<string>",
"antifraud_sale_id": 123,
"antifraud_status": "<string>",
"antifraud_score": "<string>",
"sent_to_antifraud": "<string>",
"total_logs": 123,
"error_code": 123,
"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"
},
"capture_date": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"authorized_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"captured_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"cancelled_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"payment": {
"data": {
"id": 123,
"alias": "<string>",
"name": "<string>",
"has_config": true,
"active_config": true,
"is_credit_card": true,
"is_deposit": true,
"is_billet": true,
"is_pix": true,
"is_pix_in_installments": true,
"is_wallet": true,
"icon_url": "<string>"
}
},
"metadata": [
{
"key": "discount_highlight",
"value": "pix"
}
]
}
}
}Criar pedido
Cria um pedido na loja (é necessário ter um cliente pré-cadastrado)
curl --request POST \
--url https://api.dooki.com.br/v2/{alias}/orders \
--header 'Content-Type: application/json' \
--header 'User-Secret-Key: <api-key>' \
--header 'User-Token: <api-key>' \
--data '
{
"number": 123,
"customer_id": 123,
"value_total": 123,
"value_products": 1,
"value_discount": 1,
"value_shipment": 1,
"shipment_service": "<string>",
"days_delivery": 1,
"items": [
{
"product_id": 123,
"sku_id": 123,
"sku": "<string>",
"quantity": 2,
"price": 1,
"gift": true,
"gift_value": 1,
"has_recomm": true
}
],
"address": [
{
"receiver": "<string>",
"zipcode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"uf": "<string>"
}
],
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": true,
"marketplace_sale_number": "<string>",
"value_tax": 1,
"ip": "200.179.10.10",
"transactions": [
{
"customer_id": 123,
"authorized_at": "2025-07-31 23:59:59",
"amount": 1,
"installments": 2,
"holder_name": "<string>",
"holder_document": "<string>",
"payment_id": 123,
"affiliation_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": true,
"captured": true,
"captured_at": "2025-07-31 23:59:59",
"cancelled": true,
"billet_url": "<string>",
"billet_date": "2023-12-25"
}
],
"sent_to_antifraud": true,
"capture_date": "2023-12-25",
"authorized_at": "2025-07-31 23:59:59",
"captured_at": "2025-07-31 23:59:59",
"cancelled_at": "2025-07-31 23:59:59",
"track_code": "<string>",
"track_url": "<string>"
}
'import requests
url = "https://api.dooki.com.br/v2/{alias}/orders"
payload = {
"number": 123,
"customer_id": 123,
"value_total": 123,
"value_products": 1,
"value_discount": 1,
"value_shipment": 1,
"shipment_service": "<string>",
"days_delivery": 1,
"items": [
{
"product_id": 123,
"sku_id": 123,
"sku": "<string>",
"quantity": 2,
"price": 1,
"gift": True,
"gift_value": 1,
"has_recomm": True
}
],
"address": [
{
"receiver": "<string>",
"zipcode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"uf": "<string>"
}
],
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": True,
"marketplace_sale_number": "<string>",
"value_tax": 1,
"ip": "200.179.10.10",
"transactions": [
{
"customer_id": 123,
"authorized_at": "2025-07-31 23:59:59",
"amount": 1,
"installments": 2,
"holder_name": "<string>",
"holder_document": "<string>",
"payment_id": 123,
"affiliation_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": True,
"captured": True,
"captured_at": "2025-07-31 23:59:59",
"cancelled": True,
"billet_url": "<string>",
"billet_date": "2023-12-25"
}
],
"sent_to_antifraud": True,
"capture_date": "2023-12-25",
"authorized_at": "2025-07-31 23:59:59",
"captured_at": "2025-07-31 23:59:59",
"cancelled_at": "2025-07-31 23:59:59",
"track_code": "<string>",
"track_url": "<string>"
}
headers = {
"User-Token": "<api-key>",
"User-Secret-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'User-Token': '<api-key>',
'User-Secret-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
number: 123,
customer_id: 123,
value_total: 123,
value_products: 1,
value_discount: 1,
value_shipment: 1,
shipment_service: '<string>',
days_delivery: 1,
items: [
{
product_id: 123,
sku_id: 123,
sku: '<string>',
quantity: 2,
price: 1,
gift: true,
gift_value: 1,
has_recomm: true
}
],
address: [
{
receiver: '<string>',
zipcode: '<string>',
street: '<string>',
number: '<string>',
neighborhood: '<string>',
city: '<string>',
uf: '<string>'
}
],
marketplace_id: 123,
marketplace_account_id: 123,
authorized: true,
marketplace_sale_number: '<string>',
value_tax: 1,
ip: '200.179.10.10',
transactions: [
{
customer_id: 123,
authorized_at: '2025-07-31 23:59:59',
amount: 1,
installments: 2,
holder_name: '<string>',
holder_document: '<string>',
payment_id: 123,
affiliation_id: 123,
marketplace_id: 123,
marketplace_account_id: 123,
authorized: true,
captured: true,
captured_at: '2025-07-31 23:59:59',
cancelled: true,
billet_url: '<string>',
billet_date: '2023-12-25'
}
],
sent_to_antifraud: true,
capture_date: '2023-12-25',
authorized_at: '2025-07-31 23:59:59',
captured_at: '2025-07-31 23:59:59',
cancelled_at: '2025-07-31 23:59:59',
track_code: '<string>',
track_url: '<string>'
})
};
fetch('https://api.dooki.com.br/v2/{alias}/orders', 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}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => 123,
'customer_id' => 123,
'value_total' => 123,
'value_products' => 1,
'value_discount' => 1,
'value_shipment' => 1,
'shipment_service' => '<string>',
'days_delivery' => 1,
'items' => [
[
'product_id' => 123,
'sku_id' => 123,
'sku' => '<string>',
'quantity' => 2,
'price' => 1,
'gift' => true,
'gift_value' => 1,
'has_recomm' => true
]
],
'address' => [
[
'receiver' => '<string>',
'zipcode' => '<string>',
'street' => '<string>',
'number' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'uf' => '<string>'
]
],
'marketplace_id' => 123,
'marketplace_account_id' => 123,
'authorized' => true,
'marketplace_sale_number' => '<string>',
'value_tax' => 1,
'ip' => '200.179.10.10',
'transactions' => [
[
'customer_id' => 123,
'authorized_at' => '2025-07-31 23:59:59',
'amount' => 1,
'installments' => 2,
'holder_name' => '<string>',
'holder_document' => '<string>',
'payment_id' => 123,
'affiliation_id' => 123,
'marketplace_id' => 123,
'marketplace_account_id' => 123,
'authorized' => true,
'captured' => true,
'captured_at' => '2025-07-31 23:59:59',
'cancelled' => true,
'billet_url' => '<string>',
'billet_date' => '2023-12-25'
]
],
'sent_to_antifraud' => true,
'capture_date' => '2023-12-25',
'authorized_at' => '2025-07-31 23:59:59',
'captured_at' => '2025-07-31 23:59:59',
'cancelled_at' => '2025-07-31 23:59:59',
'track_code' => '<string>',
'track_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dooki.com.br/v2/{alias}/orders"
payload := strings.NewReader("{\n \"number\": 123,\n \"customer_id\": 123,\n \"value_total\": 123,\n \"value_products\": 1,\n \"value_discount\": 1,\n \"value_shipment\": 1,\n \"shipment_service\": \"<string>\",\n \"days_delivery\": 1,\n \"items\": [\n {\n \"product_id\": 123,\n \"sku_id\": 123,\n \"sku\": \"<string>\",\n \"quantity\": 2,\n \"price\": 1,\n \"gift\": true,\n \"gift_value\": 1,\n \"has_recomm\": true\n }\n ],\n \"address\": [\n {\n \"receiver\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"uf\": \"<string>\"\n }\n ],\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"marketplace_sale_number\": \"<string>\",\n \"value_tax\": 1,\n \"ip\": \"200.179.10.10\",\n \"transactions\": [\n {\n \"customer_id\": 123,\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"amount\": 1,\n \"installments\": 2,\n \"holder_name\": \"<string>\",\n \"holder_document\": \"<string>\",\n \"payment_id\": 123,\n \"affiliation_id\": 123,\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"captured\": true,\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled\": true,\n \"billet_url\": \"<string>\",\n \"billet_date\": \"2023-12-25\"\n }\n ],\n \"sent_to_antifraud\": true,\n \"capture_date\": \"2023-12-25\",\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled_at\": \"2025-07-31 23:59:59\",\n \"track_code\": \"<string>\",\n \"track_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("User-Token", "<api-key>")
req.Header.Add("User-Secret-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dooki.com.br/v2/{alias}/orders")
.header("User-Token", "<api-key>")
.header("User-Secret-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": 123,\n \"customer_id\": 123,\n \"value_total\": 123,\n \"value_products\": 1,\n \"value_discount\": 1,\n \"value_shipment\": 1,\n \"shipment_service\": \"<string>\",\n \"days_delivery\": 1,\n \"items\": [\n {\n \"product_id\": 123,\n \"sku_id\": 123,\n \"sku\": \"<string>\",\n \"quantity\": 2,\n \"price\": 1,\n \"gift\": true,\n \"gift_value\": 1,\n \"has_recomm\": true\n }\n ],\n \"address\": [\n {\n \"receiver\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"uf\": \"<string>\"\n }\n ],\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"marketplace_sale_number\": \"<string>\",\n \"value_tax\": 1,\n \"ip\": \"200.179.10.10\",\n \"transactions\": [\n {\n \"customer_id\": 123,\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"amount\": 1,\n \"installments\": 2,\n \"holder_name\": \"<string>\",\n \"holder_document\": \"<string>\",\n \"payment_id\": 123,\n \"affiliation_id\": 123,\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"captured\": true,\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled\": true,\n \"billet_url\": \"<string>\",\n \"billet_date\": \"2023-12-25\"\n }\n ],\n \"sent_to_antifraud\": true,\n \"capture_date\": \"2023-12-25\",\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled_at\": \"2025-07-31 23:59:59\",\n \"track_code\": \"<string>\",\n \"track_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dooki.com.br/v2/{alias}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["User-Token"] = '<api-key>'
request["User-Secret-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": 123,\n \"customer_id\": 123,\n \"value_total\": 123,\n \"value_products\": 1,\n \"value_discount\": 1,\n \"value_shipment\": 1,\n \"shipment_service\": \"<string>\",\n \"days_delivery\": 1,\n \"items\": [\n {\n \"product_id\": 123,\n \"sku_id\": 123,\n \"sku\": \"<string>\",\n \"quantity\": 2,\n \"price\": 1,\n \"gift\": true,\n \"gift_value\": 1,\n \"has_recomm\": true\n }\n ],\n \"address\": [\n {\n \"receiver\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"uf\": \"<string>\"\n }\n ],\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"marketplace_sale_number\": \"<string>\",\n \"value_tax\": 1,\n \"ip\": \"200.179.10.10\",\n \"transactions\": [\n {\n \"customer_id\": 123,\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"amount\": 1,\n \"installments\": 2,\n \"holder_name\": \"<string>\",\n \"holder_document\": \"<string>\",\n \"payment_id\": 123,\n \"affiliation_id\": 123,\n \"marketplace_id\": 123,\n \"marketplace_account_id\": 123,\n \"authorized\": true,\n \"captured\": true,\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled\": true,\n \"billet_url\": \"<string>\",\n \"billet_date\": \"2023-12-25\"\n }\n ],\n \"sent_to_antifraud\": true,\n \"capture_date\": \"2023-12-25\",\n \"authorized_at\": \"2025-07-31 23:59:59\",\n \"captured_at\": \"2025-07-31 23:59:59\",\n \"cancelled_at\": \"2025-07-31 23:59:59\",\n \"track_code\": \"<string>\",\n \"track_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"delivered": true,
"track_url": "<string>",
"track_code": "<string>",
"authorized": true,
"customer_id": 123,
"promocode_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"has_recomm": true,
"number": 123,
"marketplace_partner_id": 123,
"marketplace_sale_number": 123,
"value_total": 123,
"value_products": 123,
"value_discount": 123,
"value_shipment": 123,
"value_tax": 123,
"shipment_service": "<string>",
"shipment_quote_id": 123,
"days_delivery": 123,
"utm_source": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"ip": "<string>",
"items": [
{
"id": 123,
"product_id": 123,
"sku_id": 123,
"item_sku": "<string>",
"quantity": 123,
"price": 123,
"price_cost": 123,
"shipment_cost": 123,
"gift": true,
"gift_value": 123,
"has_recomm": 123,
"is_digital": true,
"freebie_id": 123,
"bundle_id": 123,
"bundle_name": "<string>"
}
],
"address": [
{
"id": 123,
"order_id": 123,
"address_name": "<string>",
"street": "<string>",
"number": 123,
"complement": "<string>",
"reference": "<string>",
"neighborhood": "<string>",
"receiver": "<string>",
"zipcode": 123,
"zip_code": 123,
"full_address": "<string>",
"city": "<string>",
"uf": "<string>",
"country": "<string>"
}
],
"transactions": {
"data": {
"id": 123,
"customer_id": 123,
"payment_id": 123,
"affiliation_id": 123,
"marketplace_id": 123,
"marketplace_account_id": 123,
"authorized": true,
"captured": true,
"cancelled": true,
"can_be_captured": true,
"can_be_cancelled": true,
"gateway_transaction_id": 123,
"gateway_order_id": 123,
"gateway_authorization_code": "<string>",
"gateway_billet_id": 123,
"amount": 123,
"buyer_amount": 123,
"installment_value": 123,
"buyer_installment_value": 123,
"installments": 123,
"installment_formated": "<string>",
"buyer_installment_formated": "<string>",
"status": "<string>",
"error_message": "<string>",
"bank_name": "<string>",
"bank_alias": "<string>",
"truncated_card": "<string>",
"holder_name": "<string>",
"holder_document": "<string>",
"billet_url": "<string>",
"billet_barcode": "<string>",
"billet_date": "<string>",
"billet_our_number": "<string>",
"billet_document_number": "<string>",
"billet_whatsapp_link": "<string>",
"antifraud_sale_id": 123,
"antifraud_status": "<string>",
"antifraud_score": "<string>",
"sent_to_antifraud": "<string>",
"total_logs": 123,
"error_code": 123,
"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"
},
"capture_date": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"authorized_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"captured_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"cancelled_at": {
"date": "2000-08-17 10:24:24",
"timezone_type": 3,
"timezone": "America/Sao_Paulo"
},
"payment": {
"data": {
"id": 123,
"alias": "<string>",
"name": "<string>",
"has_config": true,
"active_config": true,
"is_credit_card": true,
"is_deposit": true,
"is_billet": true,
"is_pix": true,
"is_pix_in_installments": true,
"is_wallet": true,
"icon_url": "<string>"
}
},
"metadata": [
{
"key": "discount_highlight",
"value": "pix"
}
]
}
}
}Path Parameters
Alias da loja
Body
Detalhes do pedido
Requisição para criação de pedidos
Alias do status (Veja GET {alias}/checkout/statuses para mais informações).
waiting_payment, cancelled, on_carriage, delivered, shipment_exception, invoiced, paid, refused, authorized, created, handling_products, ready_for_shipping, ready_for_pickup Número único do pedido por loja. Obrigatório, exceto quando usar marketplace_sale_number.
ID do cliente pertencente à loja (e, se aplicável, ao mesmo marketplace).
x >= 0x >= 0x >= 0Alias Serviço de frete escolhido.
x >= 01Show child attributes
Show child attributes
Endereço de entrega.
1 elementShow child attributes
Show child attributes
Obrigatório se o comprador vier de um marketplace específico.
Conta do marketplace (precisa pertencer à loja).
Define se o pedido inicia autorizado; pode ser inferido pelo status da conta do marketplace.
Número único do pedido no marketplace (por loja/conta). Quando presente, substitui a necessidade de 'number'.
x >= 0IP do comprador, pode ser IPv4 ou IPv6.
"200.179.10.10"
Transação do pedido.
Show child attributes
Show child attributes
"2025-07-31 23:59:59"
"2025-07-31 23:59:59"
"2025-07-31 23:59:59"
Código de rastreio do envio. O valor é sanitizado e normalizado automaticamente.
URL de rastreio do envio. O valor é sanitizado e normalizado automaticamente.
Response
Pedido criado com sucesso
Representa um pedido
ID do cliente
Número do pedido
Valor total do pedido
Valor dos produtos
Valor do desconto
Valor do frete
Valor do imposto
Método de entrega
Dias para entrega
Itens do pedido
Show child attributes
Show child attributes
Endereço de entrega
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?