cURL
curl --request GET \
--url https://public-api.kiwify.com/v1/sales/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-kiwify-account-id: <api-key>'import requests
url = "https://public-api.kiwify.com/v1/sales/{id}"
headers = {
"x-kiwify-account-id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-kiwify-account-id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://public-api.kiwify.com/v1/sales/{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://public-api.kiwify.com/v1/sales/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-kiwify-account-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://public-api.kiwify.com/v1/sales/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-kiwify-account-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.kiwify.com/v1/sales/{id}")
.header("x-kiwify-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.kiwify.com/v1/sales/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-kiwify-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "fc96cec5-1ff1-49b3-aa22-0e131f353b62",
"reference": "iYJwhMP",
"type": "product",
"created_at": "2023-10-31T16:34:35.491Z",
"updated_at": "2023-10-31T16:36:02.005Z",
"product": {
"id": "aaa86f40-d7ae-11ed-acc6-e1c45591a30e",
"name": "My Product"
},
"shipping": {
"id": "255f7ae0-8694-40f9-b905-7507fe6bc58f",
"name": "Entrega Grátis",
"price": 0
},
"status": "paid",
"payment_method": "credit_card",
"net_amount": 8853,
"currency": "USD",
"customer": {
"id": "b17dd04e-5acc-41ae-a4b2-cba0d2436406",
"name": "my customer",
"email": "mycustomer@mail.com",
"cpf": "99999999999",
"mobile": "+5599999999999",
"instagram": "y_instagram",
"country": "BR",
"address": {
"street": "Rua Danilo",
"number": "407",
"complement": "Apt. 123",
"neighborhood": "Jardim dos Jardineiros",
"city": "Paulista",
"state": "SE",
"zipcode": "46121-175"
}
},
"approved_date": "2023-10-31T16:34:35.491Z",
"boleto_url": null,
"card_last_digits": "1115",
"card_rejection_reason": null,
"card_type": "mastercard",
"installments": 12,
"is_one_click": true,
"parent_order_id": null,
"payment": {
"charge_amount": 10388,
"charge_currency": "BRL",
"net_amount": 8853,
"product_base_price": 60037,
"product_base_currency": "BRL",
"settlement_amount": 8853,
"settlement_currency": "USD",
"fee": 984,
"fee_currency": "USD",
"sale_tax_rate": 5.6,
"sale_tax_amount": 551
},
"refunded_at": null,
"sale_type": "producer",
"tracking": {
"sck": null,
"src": null,
"utm_campaign": null,
"utm_content": null,
"utm_medium": null,
"utm_source": null,
"utm_term": null,
"s1": null,
"s2": null,
"s3": null
},
"two_cards": false,
"revenue_partners": [
{
"account_id": "RpL2PsVt7gEN50Q",
"legal_name": "My Coproducer",
"document_id": "12345678910",
"percentage": 50,
"net_amount_split": 4426,
"charge_amount_split": 5000
}
],
"affiliate_commission": {
"name": "My affiliate",
"document": "123456789",
"email": "myaffiliate@email.com",
"amount": 2849
}
}Vendas
Consultar venda
Consulte os detalhes de uma venda específica, passando o order_id.
GET
/
sales
/
{id}
cURL
curl --request GET \
--url https://public-api.kiwify.com/v1/sales/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-kiwify-account-id: <api-key>'import requests
url = "https://public-api.kiwify.com/v1/sales/{id}"
headers = {
"x-kiwify-account-id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-kiwify-account-id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://public-api.kiwify.com/v1/sales/{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://public-api.kiwify.com/v1/sales/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-kiwify-account-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://public-api.kiwify.com/v1/sales/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-kiwify-account-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api.kiwify.com/v1/sales/{id}")
.header("x-kiwify-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.kiwify.com/v1/sales/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-kiwify-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "fc96cec5-1ff1-49b3-aa22-0e131f353b62",
"reference": "iYJwhMP",
"type": "product",
"created_at": "2023-10-31T16:34:35.491Z",
"updated_at": "2023-10-31T16:36:02.005Z",
"product": {
"id": "aaa86f40-d7ae-11ed-acc6-e1c45591a30e",
"name": "My Product"
},
"shipping": {
"id": "255f7ae0-8694-40f9-b905-7507fe6bc58f",
"name": "Entrega Grátis",
"price": 0
},
"status": "paid",
"payment_method": "credit_card",
"net_amount": 8853,
"currency": "USD",
"customer": {
"id": "b17dd04e-5acc-41ae-a4b2-cba0d2436406",
"name": "my customer",
"email": "mycustomer@mail.com",
"cpf": "99999999999",
"mobile": "+5599999999999",
"instagram": "y_instagram",
"country": "BR",
"address": {
"street": "Rua Danilo",
"number": "407",
"complement": "Apt. 123",
"neighborhood": "Jardim dos Jardineiros",
"city": "Paulista",
"state": "SE",
"zipcode": "46121-175"
}
},
"approved_date": "2023-10-31T16:34:35.491Z",
"boleto_url": null,
"card_last_digits": "1115",
"card_rejection_reason": null,
"card_type": "mastercard",
"installments": 12,
"is_one_click": true,
"parent_order_id": null,
"payment": {
"charge_amount": 10388,
"charge_currency": "BRL",
"net_amount": 8853,
"product_base_price": 60037,
"product_base_currency": "BRL",
"settlement_amount": 8853,
"settlement_currency": "USD",
"fee": 984,
"fee_currency": "USD",
"sale_tax_rate": 5.6,
"sale_tax_amount": 551
},
"refunded_at": null,
"sale_type": "producer",
"tracking": {
"sck": null,
"src": null,
"utm_campaign": null,
"utm_content": null,
"utm_medium": null,
"utm_source": null,
"utm_term": null,
"s1": null,
"s2": null,
"s3": null
},
"two_cards": false,
"revenue_partners": [
{
"account_id": "RpL2PsVt7gEN50Q",
"legal_name": "My Coproducer",
"document_id": "12345678910",
"percentage": 50,
"net_amount_split": 4426,
"charge_amount_split": 5000
}
],
"affiliate_commission": {
"name": "My affiliate",
"document": "123456789",
"email": "myaffiliate@email.com",
"amount": 2849
}
}Autorizações
The access token received from the authorization server in the OAuth 2.0 flow.
Parâmetros de caminho
Resposta
Response description
Exemplo:
"588aa8f4-fb61-4d26-bf61-ad4cd6de42cd"
Exemplo:
"9dAQA5a"
Exemplo:
"product"
Exemplo:
"2023-10-31T16:53:05.119Z"
Exemplo:
"2023-10-31T16:53:05.119Z"
Show child attributes
Show child attributes
Exemplo:
"paid"
Exemplo:
"credit_card"
Exemplo:
0
Show child attributes
Show child attributes
Exemplo:
"2023-10-31T16:34:35.491Z"
Exemplo:
"1115"
Exemplo:
"mastercard"
Exemplo:
12
Exemplo:
true
Show child attributes
Show child attributes
Exemplo:
"producer"
Show child attributes
Show child attributes
Exemplo:
false
Show child attributes
Show child attributes
⌘I
