Credit memos

Use credit memos to provide a customer with store credit. A common use case for using a credit memo is to provide a customer with store credit, rather than a refund, if the customer pays more than they owe or returns a product. For information on the credit memo resource, see Resources.

Retrieve credit memos

Request

Retrieves a list of credit memos.
Security
SecretApiKey or JWT or ApplicationJWT
Query
filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

limitinteger, [ 0 .. 1000 ]

Limit the number of collection items to be returned. Use 0 to return an empty collection and still receive the count of matching items in Pagination-Total.

offsetinteger, [ 0 .. 1000 ]
Specifies the starting point within the collection of items to be returned.
qstring
Use this field to perform a partial search of text fields.
expandstring

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Embedded resources.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/credit-memos?filter=string&sort=string&limit=0&offset=0&q=string&expand=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

List of credit memos retrieved.
Headers
Pagination-Totalinteger

Total number of items that match the request. The value is independent of limit, including when limit is 0.

Example:332
Pagination-Limitinteger
Maximum number of items per page.
Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 charactersread-only
ID of the credit memo.
Example:"crmm_0YVCNN22TWC3G8H82QNPNVZCHG"
numberintegerread-only
Auto-incrementing number based on the sequence of credit memos for any particular customer.
allocationsobject
Allocations reduce the unused amount of a credit memo.
itemsArray of objects
Items of the credit memo.
statusstringread-only
Status of the credit memo.
Enum ValueDescription
draft
Credit memo is in process of being created. The full amount of the credit memo is unused, and the customer has not seen it yet.
quotation

Credit memo is associated with a quote. If the customer approves the quotation, the credit memo changes to the issued state.

issued
Credit memo is available with a full amount to be applied.
applied
The full amount of the credit memo has been applied. No more credit can be created from it.
partially-applied
A partial amount of the credit memo has been applied. A credit can be created from the remaining amount.
voided
Credit memo has been voided and cannot be used anymore.
reasonstring
Reason for the credit memo.
Enum:"return""product-unsatisfactory""order-change""order-cancellation""chargeback""write-off""waiver""customer-credit""prepayment""other"
descriptionstring
Public description, that is visible to customers, which describes the purpose of the credit memo.
shippingAmountnumber, (double)
Shipping amount of an invoice to credit.
Default:0
taxAmountnumber, (double)read-only
Sum of items tax amount of an invoice to credit.
Default:0
totalAmountnumber, (double)read-only
Total amount of all credits in the credit memo, including items, shipping, and tax.
Default:0
unusedAmountnumber, (double)read-only
Unused credit memo amount that has not been allocated.
Default:0
revisionintegerread-only
Number of times the credit memo has been modified.
customerIdstring, <= 50 characters(CustomerId)required
ID of the customer resource.
Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
currencystring, = 3 characters(CurrencyCode)required
Currency code in ISO 4217 format.
Example:"USD"
invoiceIdstring or null, <= 50 characters
ID of the invoice to which the credit memo is issued.
Example:"in_0YVF9605RKC62BP14NE2R7V2XT"
quoteIdstring or null, <= 50 charactersread-only
ID of the related quote.
Example:"qt_0YVF9605RKC62BP14NE2R7V2XT"
transactionIdstring or null, <= 50 characters

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 and customerId is not changed, this field retains its current value. If this field is omitted and customerId is changed, the transaction is removed from the credit memo. To remove the transaction from the credit memo, set this field to null.

Example:"txn_0YVDTQJ8YKC82BP14NE2R7V2XT"
createdTimestring, (date-time)(CreatedTime)read-only
Date and time when the resource is created. This value is set automatically when the resource is created.
updatedTimestring, (date-time)(UpdatedTime)read-only
Date and time when the resource is updated. This value is set automatically when the resource is updated.
_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

]
Response
[ { "id": "crmm_0YVCNN22TWC3G8H82QNPNVZCHG", "number": 0, "allocations": { … }, "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": { … } } ]