Creates or updates (upserts) a credit memo with a specified ID.
Credit memo updated.
Credit memo created.
Location | string <uri> Location of the related resource. Example: "https://api.rebilly.com/example" |
id | string <= 50 characters ID of the credit memo. | ||||||||||
number | integer Auto-incrementing number based on the sequence of credit memos for any particular customer. | ||||||||||
object Allocations reduce the unused amount of a credit memo. | |||||||||||
Array of objects Items of the credit memo. | |||||||||||
status | string Status of the credit memo.
| ||||||||||
reason | string Reason for the credit memo. | ||||||||||
description | string Public description, that is visible to customers, which describes the purpose of the credit memo. | ||||||||||
shippingAmount | number <double> Default: 0 Shipping amount of an invoice to credit. | ||||||||||
taxAmount | number <double> Default: 0 Sum of items tax amount of an invoice to credit. | ||||||||||
totalAmount | number <double> Default: 0 Total amount of all credits in the credit memo, including items, shipping, and tax. | ||||||||||
unusedAmount | number <double> Default: 0 Unused credit memo amount that has not been allocated. | ||||||||||
revision | integer Number of times the credit memo has been modified. | ||||||||||
createdTime | string <date-time> (CreatedTime) Date and time which is set automatically when the resource is created. | ||||||||||
updatedTime | string <date-time> (UpdatedTime) Date and time which updates automatically when the resource is updated. | ||||||||||
Array of objects Related links. | |||||||||||
customerId required | string (CustomerId) <= 50 characters ID of the customer resource. | ||||||||||
currency required | string (CurrencyCode) = 3 characters Currency code in ISO 4217 format. | ||||||||||
invoiceId | string or null <= 50 characters ID of the invoice to which the credit memo is issued. |
Unauthorized access. Invalid credentials used.
Access forbidden.
Resource not found.
Invalid data sent.
{- "allocations": {
- "transactions": [
- {
- "transactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "amount": 0
}
], - "invoices": [
- {
- "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT",
- "amount": 0
}
]
}, - "items": [
- {
- "invoiceItemId": "ii_0YVFDEQS2KCFTBN9HXWJFY55GV",
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ",
- "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X",
- "tax": {
- "amount": 0,
- "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"
}
{- "id": "crmm_0YVCNN22TWC3G8H82QNPNVZCHG",
- "number": 0,
- "allocations": {
- "transactions": [
- {
- "transactionId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "amount": 0,
- "currency": "USD",
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
], - "invoices": [
- {
- "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT",
- "amount": 0,
- "currency": "USD",
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z"
}
]
}, - "items": [
- {
- "id": "crmm_itm_0YVCNN22TWC3G8H82QNPNVZCHG",
- "invoiceItemId": "ii_0YVFDEQS2KCFTBN9HXWJFY55GV",
- "description": "string",
- "unitPrice": 0,
- "quantity": 0,
- "price": 0,
- "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ",
- "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X",
- "tax": {
- "amount": 0,
- "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"
}
}
}
], - "status": "issued",
- "reason": "return",
- "description": "string",
- "shippingAmount": 0,
- "taxAmount": 0,
- "totalAmount": 0,
- "unusedAmount": 0,
- "revision": 0,
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "href": "string",
- "rel": "self"
}
], - "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
- "currency": "USD",
- "invoiceId": "in_0YVF9605RKC62BP14NE2R7V2XT"
}