Elencare le note di credito
Elenca le note di credito, con il residuo di ciascuna.
GET/v1/workspaces/{regionId}/credit-notes
Restituisce
200 OK con l’oggetto mostrato nella risposta.
Più dettagli
Le note di credito ricevute da un acquirente o emesse da un fornitore (verso tutti i suoi acquirenti), dalla meno recente, ciascuna con remaining: quanto resta da applicare, mai memorizzato.
Errori
- 401 Unauthorized - Non è stata presentata alcuna credenziale, oppure il token Bearer o il valore di X-Api-Key è mancante, non valido, scaduto o revocato.
- 403 Forbidden - Il token Bearer o la chiave API del chiamante non dà accesso a questo workspace (regionId), oppure non ha il ruolo richiesto.
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"
} ]