Lister les conditions de paiement
curl --request GET \
--url https://qwoty.app/api/payment-terms \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/payment-terms"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://qwoty.app/api/payment-terms', 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/payment-terms",
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/payment-terms"
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/payment-terms")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/payment-terms")
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{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Net 30 Days",
"api_name": "net_30_days",
"reference": "PT001",
"is_active": true,
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Full Payment",
"percentage": 100,
"term": "net30",
"custom_text": null,
"order_number": 1
}
],
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "30% Deposit + 70% on Delivery",
"api_name": "30_deposit_70_delivery",
"reference": "PT002",
"is_active": true,
"id_crm": "crm_123",
"id_erp": null,
"id_accounting": null,
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440003",
"name": "Deposit",
"percentage": 30,
"term": "due_now",
"custom_text": null,
"order_number": 1
},
{
"id": "660e8400-e29b-41d4-a716-446655440004",
"name": "Balance",
"percentage": 70,
"term": "due_on_receipt",
"custom_text": null,
"order_number": 2
}
],
"created_at": "2024-12-21T11:00:00Z",
"updated_at": "2024-12-21T11:00:00Z"
}
]
}
Conditions de paiement
Lister les conditions de paiement
Récupérer toutes les conditions de paiement de votre espace de travail
GET
/
api
/
payment-terms
Lister les conditions de paiement
curl --request GET \
--url https://qwoty.app/api/payment-terms \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/payment-terms"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://qwoty.app/api/payment-terms', 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/payment-terms",
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/payment-terms"
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/payment-terms")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/payment-terms")
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{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Net 30 Days",
"api_name": "net_30_days",
"reference": "PT001",
"is_active": true,
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Full Payment",
"percentage": 100,
"term": "net30",
"custom_text": null,
"order_number": 1
}
],
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "30% Deposit + 70% on Delivery",
"api_name": "30_deposit_70_delivery",
"reference": "PT002",
"is_active": true,
"id_crm": "crm_123",
"id_erp": null,
"id_accounting": null,
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440003",
"name": "Deposit",
"percentage": 30,
"term": "due_now",
"custom_text": null,
"order_number": 1
},
{
"id": "660e8400-e29b-41d4-a716-446655440004",
"name": "Balance",
"percentage": 70,
"term": "due_on_receipt",
"custom_text": null,
"order_number": 2
}
],
"created_at": "2024-12-21T11:00:00Z",
"updated_at": "2024-12-21T11:00:00Z"
}
]
}
Autorisation
string
requis
Jeton Bearer pour l’authentification. Format :
Bearer qwoty_your_tokenParamètres de requête
boolean
Filtrer par statut actif. Omettre pour retourner toutes les conditions de paiement.
string
Rechercher par nom ou api_name
Exemples
curl https://qwoty.app/api/payment-terms \
-H "Authorization: Bearer qwoty_your_token"
curl "https://qwoty.app/api/payment-terms?is_active=true" \
-H "Authorization: Bearer qwoty_your_token"
const response = await fetch('https://qwoty.app/api/payment-terms', {
headers: {
Authorization: 'Bearer qwoty_your_token',
},
})
const data = await response.json()
import requests
response = requests.get(
'https://qwoty.app/api/payment-terms',
headers={
'Authorization': 'Bearer qwoty_your_token'
}
)
data = response.json()
Réponse
boolean
Indique si la requête a réussi
array
Tableau d’objets de conditions de paiement
Afficher Objet Condition de paiement
Afficher Objet Condition de paiement
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Net 30 Days",
"api_name": "net_30_days",
"reference": "PT001",
"is_active": true,
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Full Payment",
"percentage": 100,
"term": "net30",
"custom_text": null,
"order_number": 1
}
],
"created_at": "2024-12-21T10:30:00Z",
"updated_at": "2024-12-21T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "30% Deposit + 70% on Delivery",
"api_name": "30_deposit_70_delivery",
"reference": "PT002",
"is_active": true,
"id_crm": "crm_123",
"id_erp": null,
"id_accounting": null,
"installments": [
{
"id": "660e8400-e29b-41d4-a716-446655440003",
"name": "Deposit",
"percentage": 30,
"term": "due_now",
"custom_text": null,
"order_number": 1
},
{
"id": "660e8400-e29b-41d4-a716-446655440004",
"name": "Balance",
"percentage": 70,
"term": "due_on_receipt",
"custom_text": null,
"order_number": 2
}
],
"created_at": "2024-12-21T11:00:00Z",
"updated_at": "2024-12-21T11:00:00Z"
}
]
}
Réponses d’erreur
{
"success": false,
"error": "Invalid API token"
}
Cette page vous a-t-elle été utile ?
⌘I

