cURL
curl --request GET \
--url https://public-api.kiwify.com/v1/products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-kiwify-account-id: <api-key>'import requests
url = "https://public-api.kiwify.com/v1/products/{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/products/{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/products/{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/products/{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/products/{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/products/{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": "20072760-3699-11ee-b627-87e13b212de8",
"store_id": "XvS0qfkdzCZTg8z",
"name": "pix test",
"type": "membership",
"created_at": "2023-08-09T09:42:59.074Z",
"currency": "BRL",
"price": 500,
"affiliate_enabled": false,
"status": "active",
"payment_type": "charge",
"shipping_options": [
{
"id": "928b5935-a3d9-4f21-879d-f46c1b30d9f0",
"name": "Frete Gratis",
"price": 0
}
],
"links": [
{
"id": "KMgND1r",
"custom_name": null,
"status": "active",
"is_sales_page": false
}
],
"bumps": [
{
"id": "9811cdd9-45e9-456d-8c3b-114a7cf6fa33",
"color": "#f7f7f7",
"link": {
"id": "AbDFGi0",
"custom_name": null,
"product_id": "828b5935-a2d9-3f21-279d-146c1b30d9f0",
"status": "active",
"is_sales_page": false
}
}
],
"offers": [],
"event_settings": null,
"event_batches": [],
"subscriptions": [],
"revenue_partners": []
}{
"error": "auth_error",
"message": "Invalid token: access token is invalid"
}Produtos
Consultar produto
Obtenha os detalhes de um produto específico, passando o product_id.
GET
/
products
/
{id}
cURL
curl --request GET \
--url https://public-api.kiwify.com/v1/products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-kiwify-account-id: <api-key>'import requests
url = "https://public-api.kiwify.com/v1/products/{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/products/{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/products/{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/products/{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/products/{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/products/{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": "20072760-3699-11ee-b627-87e13b212de8",
"store_id": "XvS0qfkdzCZTg8z",
"name": "pix test",
"type": "membership",
"created_at": "2023-08-09T09:42:59.074Z",
"currency": "BRL",
"price": 500,
"affiliate_enabled": false,
"status": "active",
"payment_type": "charge",
"shipping_options": [
{
"id": "928b5935-a3d9-4f21-879d-f46c1b30d9f0",
"name": "Frete Gratis",
"price": 0
}
],
"links": [
{
"id": "KMgND1r",
"custom_name": null,
"status": "active",
"is_sales_page": false
}
],
"bumps": [
{
"id": "9811cdd9-45e9-456d-8c3b-114a7cf6fa33",
"color": "#f7f7f7",
"link": {
"id": "AbDFGi0",
"custom_name": null,
"product_id": "828b5935-a2d9-3f21-279d-146c1b30d9f0",
"status": "active",
"is_sales_page": false
}
}
],
"offers": [],
"event_settings": null,
"event_batches": [],
"subscriptions": [],
"revenue_partners": []
}{
"error": "auth_error",
"message": "Invalid token: access token is invalid"
}Autorizações
The access token received from the authorization server in the OAuth 2.0 flow.
Parâmetros de caminho
Resposta
Response description
Exemplo:
"7b5dc633-6b10-4b98-90c7-ea20a7610bd0"
Exemplo:
"Meu Produto"
Exemplo:
"membership"
Exemplo:
"2023-08-09T09:42:59.074Z"
Exemplo:
"BRL"
Exemplo:
1000
Exemplo:
true
Exemplo:
"active"
Exemplo:
"charge"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
