Create Credit Note
create_credit_noteCredit a received customer return — the return receipt's Create credit note. Raises one credit note per fully received return receipt that has none yet, priced as the lines were sold (discounts prorated, the sold tax rate), reconciling the receipt first when needed. Credit notes sync to connected accounting; no refund is paid out. The preview lists each credit note's lines and totals. Two-step: preview=true, then commit with the previewReceipt.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"returnId": "<returnId>"
},
"name": "create_credit_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing is written until the commit call. | |
| clientId | No | Optional client id (GUID) for operator (unpinned) credentials on 3PL tenants. | |
| returnId | Yes | Customer return id (GUID) or number from list_returns. | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt to commit. | |
| previewReceipt | No | Step 2: the receipt returned by the preview call. Supply with a fresh idempotencyKey to commit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| number | No | ||
| status | No | ||
| preview | No | ||
| returnId | No | ||
| warnings | No | ||
| expiresAt | No | ||
| creditNotes | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| approvalRequired | No | ||
| approvalRuleName | No | ||
| idempotentReplay | No |