Lister les produits
curl --request GET \
--url https://qwoty.app/api/products \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/products"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://qwoty.app/api/products', 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://qwoty.app/api/products",
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: <authorization>"
],
]);
$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://qwoty.app/api/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qwoty.app/api/products")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total": 42,
"next": "https://qwoty.app/api/products?limit=30&page=2",
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"product_parent_id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "880e8400-e29b-41d4-a716-446655440003",
"name": "Consulting Services - Senior",
"api_name": "consulting_services_senior",
"reference": "SERV-001",
"description": "Senior consultant hourly rate",
"description_inherit_from_product": true,
"primary_image_inherit_from_product": true,
"is_active": true,
"is_default": true,
"catalog_ids": ["770e8400-e29b-41d4-a716-446655440002"],
"category_ids": [],
"settings": {
"unit_per_pack": 1,
"product_type": "service",
"language_id": "990e8400-e29b-41d4-a716-446655440004",
"unit_of_measure": "hour",
"recurrence_type": "recurring"
},
"shipping": {
"weight": null,
"weight_unit": null,
"height": null,
"length": null,
"width": null,
"length_unit": null,
"country_of_origin": null,
"harmonized_system_code": null
},
"inventory": {
"sku": "CONS-SEN-001"
},
"identifiers": {
"crm": null,
"accounting": null,
"erp": null
},
"accounting": {
"ledger_account": null
},
"options": [
{
"option_id": "opt-001",
"option_name": "Seniority",
"option_api_name": "seniority",
"value_id": "val-001",
"value_name": "Senior",
"value_api_name": "senior"
}
],
"prices": [
{
"id": "price-001",
"pricebook_id": "pb-001",
"pricebook_api_name": "standard"
}
],
"primary_image_id": null,
"parent_primary_image_id": null,
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T10:30:00Z"
}
]
}
Produits
Lister les produits
Récupérer les produits de votre espace de travail avec pagination et filtres
GET
/
api
/
products
Lister les produits
curl --request GET \
--url https://qwoty.app/api/products \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/products"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://qwoty.app/api/products', 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://qwoty.app/api/products",
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: <authorization>"
],
]);
$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://qwoty.app/api/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://qwoty.app/api/products")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total": 42,
"next": "https://qwoty.app/api/products?limit=30&page=2",
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"product_parent_id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "880e8400-e29b-41d4-a716-446655440003",
"name": "Consulting Services - Senior",
"api_name": "consulting_services_senior",
"reference": "SERV-001",
"description": "Senior consultant hourly rate",
"description_inherit_from_product": true,
"primary_image_inherit_from_product": true,
"is_active": true,
"is_default": true,
"catalog_ids": ["770e8400-e29b-41d4-a716-446655440002"],
"category_ids": [],
"settings": {
"unit_per_pack": 1,
"product_type": "service",
"language_id": "990e8400-e29b-41d4-a716-446655440004",
"unit_of_measure": "hour",
"recurrence_type": "recurring"
},
"shipping": {
"weight": null,
"weight_unit": null,
"height": null,
"length": null,
"width": null,
"length_unit": null,
"country_of_origin": null,
"harmonized_system_code": null
},
"inventory": {
"sku": "CONS-SEN-001"
},
"identifiers": {
"crm": null,
"accounting": null,
"erp": null
},
"accounting": {
"ledger_account": null
},
"options": [
{
"option_id": "opt-001",
"option_name": "Seniority",
"option_api_name": "seniority",
"value_id": "val-001",
"value_name": "Senior",
"value_api_name": "senior"
}
],
"prices": [
{
"id": "price-001",
"pricebook_id": "pb-001",
"pricebook_api_name": "standard"
}
],
"primary_image_id": null,
"parent_primary_image_id": null,
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T10:30:00Z"
}
]
}
Autorisation
string
requis
Token Bearer pour l’authentification. Format :
Bearer qwoty_your_tokenParamètres de requête
integer
défaut:"30"
Nombre de résultats par page (max 200)
integer
défaut:"1"
Numéro de page (base 1)
string
Filtrer par identifiant externe. Correspond à
identifiers[erp],
identifiers[crm] et identifiers[accounting].string
Filtrer par nom d’API exact
string
Filtrer par SKU (
inventory[sku])string
Filtrer par référence interne
Exemples
curl https://qwoty.app/api/products \
-H "Authorization: Bearer qwoty_your_token"
curl "https://qwoty.app/api/products?limit=30&sku=CONS-SEN-001" \
-H "Authorization: Bearer qwoty_your_token"
const response = await fetch('https://qwoty.app/api/products?limit=30', {
headers: {
Authorization: 'Bearer qwoty_your_token',
},
})
const data = await response.json()
import requests
response = requests.get(
'https://qwoty.app/api/products',
params={'limit': 30},
headers={
'Authorization': 'Bearer qwoty_your_token'
}
)
data = response.json()
Réponse
integer
Nombre total de produits correspondant à la requête (sur toutes les pages)
string | null
URL pour récupérer la page suivante, ou
null s’il s’agit de la dernière pagearray
Tableau d’objets produit pour la page courante
Afficher Objet Produit
Afficher Objet Produit
string
Identifiant unique (UUID)
string
ID du produit parent (UUID)
string
ID de l’espace de travail (UUID)
string
Nom du produit (nom d’affichage combinant les options parent + variante)
string
Identifiant API
string
Référence interne
string
Description du produit
boolean
Indique si la description est héritée du produit parent
boolean
Indique si l’image principale est héritée du produit parent
boolean
Statut actif
boolean
Indique si ce produit est le produit par défaut sous son parent
array
IDs de catalogues (UUIDs) liés au produit parent
array
IDs de catégories (UUIDs) liés au produit parent
object
Paramètres et configuration du produit
object
Informations d’expédition
object
Informations d’inventaire
object
Identifiants des systèmes externes
object
Informations comptables
array
array
string
UUID du média principal de ce produit. Null si aucun n’est défini.
string
UUID du média principal du produit parent. Lecture seule.
{
"total": 42,
"next": "https://qwoty.app/api/products?limit=30&page=2",
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"product_parent_id": "660e8400-e29b-41d4-a716-446655440001",
"workspace_id": "880e8400-e29b-41d4-a716-446655440003",
"name": "Consulting Services - Senior",
"api_name": "consulting_services_senior",
"reference": "SERV-001",
"description": "Senior consultant hourly rate",
"description_inherit_from_product": true,
"primary_image_inherit_from_product": true,
"is_active": true,
"is_default": true,
"catalog_ids": ["770e8400-e29b-41d4-a716-446655440002"],
"category_ids": [],
"settings": {
"unit_per_pack": 1,
"product_type": "service",
"language_id": "990e8400-e29b-41d4-a716-446655440004",
"unit_of_measure": "hour",
"recurrence_type": "recurring"
},
"shipping": {
"weight": null,
"weight_unit": null,
"height": null,
"length": null,
"width": null,
"length_unit": null,
"country_of_origin": null,
"harmonized_system_code": null
},
"inventory": {
"sku": "CONS-SEN-001"
},
"identifiers": {
"crm": null,
"accounting": null,
"erp": null
},
"accounting": {
"ledger_account": null
},
"options": [
{
"option_id": "opt-001",
"option_name": "Seniority",
"option_api_name": "seniority",
"value_id": "val-001",
"value_name": "Senior",
"value_api_name": "senior"
}
],
"prices": [
{
"id": "price-001",
"pricebook_id": "pb-001",
"pricebook_api_name": "standard"
}
],
"primary_image_id": null,
"parent_primary_image_id": null,
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T10:30:00Z"
}
]
}
Réponses d’erreur
{
"error": "Invalid API token"
}
Cette page vous a-t-elle été utile ?
⌘I

