ID of the transaction associated with the credit memo. Associating a transaction does not change the unused amount of the credit memo. The transaction must be approved and associated with the same customer as the credit memo. Approved transactions of any type are accepted, including refunds and voided sales. If the transaction result changes later, the association is retained. If this field is omitted in an update request, this field retains its current value. To remove the transaction from the credit memo, set this field to null.
Creates or updates (upserts) a credit memo with a specified ID. If the credit memo has allocations, an update request cannot change the invoice or currency. If unusedAmount is 0, an update request also cannot change the shipping amount or items. To change any of these properties, void the credit memo and create a new one. If the credit memo cannot be voided, these properties are final.
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/credit-memos/{id}
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/credit-memos/{id}
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/credit-memos/{id}
curl -i -X PUT \
'https://www.rebilly.com/_mock/catalog/all/credit-memos/{id}' \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"allocations": {
"transactions": [
{
"transactionId": "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0",
"amount": 0.1
}
],
"invoices": [
{
"invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT",
"amount": 0.1
}
]
},
"items": [
{
"invoiceItemId": "ii_0YVFDEQS2KCFTBN9HXWJFY55GV",
"description": "string",
"unitPrice": 0.1,
"quantity": 0,
"productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ",
"planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X",
"tax": {
"amount": 0.1,
"description": "string",
"rate": 0,
"stateAmount": 0.94,
"countyAmount": 0.04,
"cityAmount": 0,
"specialDistrictAmount": 0.38,
"stateRate": 0,
"countyRate": 0,
"cityRate": 0,
"specialDistrictRate": 0,
"jurisdictions": {
"country": "US",
"state": "CA",
"county": "LOS ANGELES",
"city": "LOS ANGELES"
}
}
}
],
"reason": "return",
"description": "string",
"shippingAmount": 0,
"customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
"currency": "USD",
"invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT",
"transactionId": "txn_0YVDTQJ8YKC82BP14NE2R7V2XT"
}'Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.
Number of requests still available for this rate limit. For more information, see Rate limits.
| Enum Value | Description |
|---|---|
| draft | |
| quotation | Credit memo is associated with an issued quote. When the quote is accepted, the status changes to |
| issued | |
| applied | |
| partially-applied | |
| voided |
ID of the transaction associated with the credit memo. Associating a transaction does not change the unused amount of the credit memo. The transaction must be approved and associated with the same customer as the credit memo. Approved transactions of any type are accepted, including refunds and voided sales. If the transaction result changes later, the association is retained. If this field is omitted in an update request, this field retains its current value. To remove the transaction from the credit memo, set this field to null.
{ "id": "crmm_0YVCNN22TWC3G8H82QNPNVZCHG", "number": 0, "allocations": { "transactions": [ … ], "invoices": [ … ] }, "items": [ { … } ], "status": "draft", "reason": "return", "description": "string", "shippingAmount": 0, "taxAmount": 0, "totalAmount": 0, "unusedAmount": 0, "revision": 0, "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "currency": "USD", "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT", "quoteId": "qt_0YVF9605RKC62BP14NE2R7V2XT", "transactionId": "txn_0YVDTQJ8YKC82BP14NE2R7V2XT", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ { … } ], "_embedded": { "customer": {} } }