Listar notas de crédito
Lista notas de crédito, com o saldo restante de cada uma.
GET/v1/workspaces/{regionId}/credit-notes
Retorna
200 OK com o objeto mostrado na resposta.
Mais detalhes
As notas de crédito que um comprador recebeu ou que um fornecedor emitiu (entre todos os seus compradores), da mais antiga para a mais recente, cada uma com remaining: o que ainda falta aplicar, nunca armazenado.
Erros
- 401 Unauthorized - Nenhuma credencial foi apresentada, ou o token Bearer / valor de X-Api-Key está ausente, é inválido, expirou ou foi revogado.
- 403 Forbidden - O token Bearer ou a chave de API de quem chama não dá acesso a este espaço de trabalho (regionId), ou não tem a função exigida.
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"
} ]