Obtenir un terme de paiement
curl --request GET \
--url https://qwoty.app/api/payment-terms/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/payment-terms/{id}"
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/{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://qwoty.app/api/payment-terms/{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: <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/{id}"
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/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/payment-terms/{id}")
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": "crm_123",
"id_erp": "erp_456",
"id_accounting": "acc_789",
"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"
}
}
Conditions de paiement
Obtenir un terme de paiement
Récupérer un terme de paiement spécifique par ID
GET
/
api
/
payment-terms
/
{id}
Obtenir un terme de paiement
curl --request GET \
--url https://qwoty.app/api/payment-terms/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://qwoty.app/api/payment-terms/{id}"
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/{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://qwoty.app/api/payment-terms/{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: <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/{id}"
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/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/payment-terms/{id}")
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": "crm_123",
"id_erp": "erp_456",
"id_accounting": "acc_789",
"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"
}
}
Autorisation
string
requis
Jeton Bearer pour l’authentification. Format :
Bearer qwoty_your_tokenParamètres de chemin
string
requis
UUID du terme de paiement
Exemples
curl https://qwoty.app/api/payment-terms/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer qwoty_your_token"
const paymentTermId = '550e8400-e29b-41d4-a716-446655440000'
const response = await fetch(
`https://qwoty.app/api/payment-terms/${paymentTermId}`,
{
headers: {
Authorization: 'Bearer qwoty_your_token',
},
},
)
const data = await response.json()
import requests
payment_term_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.get(
f'https://qwoty.app/api/payment-terms/{payment_term_id}',
headers={
'Authorization': 'Bearer qwoty_your_token'
}
)
data = response.json()
Réponse
boolean
Indique si la requête a réussi
object
L’objet terme de paiement
Afficher Objet Terme de Paiement
Afficher Objet Terme de Paiement
string
Identifiant unique (UUID)
string
Nom du terme de paiement
string
Identifiant API
string
Référence interne
boolean
Statut actif
string
ID CRM externe
string
ID ERP externe
string
ID comptabilité externe
array
Tableau d’objets d’échéances avec id, name, percentage, term, custom_text et order_number
string
Horodatage ISO 8601
string
Horodatage ISO 8601
{
"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": "crm_123",
"id_erp": "erp_456",
"id_accounting": "acc_789",
"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"
}
}
Réponses d’erreur
{
"success": false,
"error": "Payment term not found"
}
{
"success": false,
"error": "Invalid API token"
}
{
"success": false,
"error": "Invalid payment term ID format"
}
Cette page vous a-t-elle été utile ?
⌘I

