Lister les avoirs
Liste les avoirs, avec le solde restant de chacun.
GET/v1/workspaces/{regionId}/credit-notes
Retour
200 OK avec l’objet présenté dans la réponse.
Plus de détails
Les avoirs reçus par un acheteur ou émis par un fournisseur (pour l’ensemble de ses acheteurs), du plus ancien au plus récent, chacun avec remaining : ce qui reste à imputer, jamais stocké.
Erreurs
- 401 Unauthorized - Aucun identifiant n’a été fourni, ou la valeur du jeton Bearer / de X-Api-Key est manquante, invalide, expirée ou révoquée.
- 403 Forbidden - Le jeton Bearer ou la clé API de l’appelant ne donne pas accès à cet espace de travail (regionId), ou n’a pas le rôle requis.
curl "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/credit-notes" \
-H "X-Api-Key: $PLEAXY_API_KEY"[ {
"documentType": "credit_note",
"id": "string",
"externalCreditNoteNumber": "string",
"issueDate": "string",
"buyerOrgId": "string",
"buyerOrgName": "string",
"supplierOrgId": "string",
"supplier": "string",
"supplierConnectionId": "string",
"currency": "string",
"reason": "returned_goods" | "price_adjustment" | "service_credit" | "rebate" | "other",
"correctsBilling": true,
"note": "string",
"lineItems": [ { "description": "string", "qty": number, "unitPrice": number, "amount": number } ],
"adjustments": [ { "type": "discount" | "charge", "description": "string", "amount": number } ],
"taxAmount": number,
"amount": number,
"refunded": number,
"remaining": number,
"invoiceId": "string",
"externalInvoiceNumber": "string",
"po": "string",
"poLineNo": number,
"status": "pending_acceptance" | "accepted" | "rejected" | "void",
"autoAccepted": true,
"acceptedAt": "string",
"rejection": { "at": "string", "reason": "string" },
"poEffect": { "kind": "release", "po": "string", "poLineNo": number, "amount": number, "qty": number } | { "kind": "none", "why": "not_a_correction" | "no_po" | "po_closed" },
"applications": [ { "id": "string", "invoiceId": "string", "externalInvoiceNumber": "string", "amount": number, "appliedAt": "string", "auto": true } ],
"exports": [ { "exportId": "string", "exportedAt": "string" } ],
"source": "feed" | "cloud_sync",
"submittedFormat": "json" | "ubl" | "cxml",
"cloudProvider": "aws" | "azure",
"hasPdf": boolean,
"createdAt": "string"
} ]