Search credit memos
Operation ID: searchCreditMemo
Group: Accounting › Credit Memos
Open in the interactive reference
POST /accounting/credit-memos/search
Read-only: A read that takes its filters in the body. Changes nothing, and ignores Idempotency-Key.
Searches credit memos.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
Request body
Required, application/json: searchCreditMemoInput.
| Field | Type | Required | Description |
|---|---|---|---|
filters |
object | no | The filters to apply. A credit memo must match every filter you send. Omit to return all credit memos. |
filters.id |
string | no | Limits results to the credit memo with this id. |
filters.creditMemoNumber |
string | no | Limits results to the credit memo with this number, for example 'CM-1'. The match is exact. |
filters.customerId |
string | no | Limits results to credit memos issued to this customer. See id on GET accounting/customers/:id. |
filters.customerName |
string | no | Limits results to credit memos whose customer name contains this text. The match is case-insensitive. |
filters.customerNumber |
string | no | Limits results to credit memos with this customer number. The match is exact. |
filters.entityId |
string | no | Limits results to credit memos issued by this legal entity. See id on GET base/entities. |
filters.entityName |
string | no | Limits results to credit memos whose entity name contains this text. The match is case-insensitive. |
filters.creditMemoStatus |
array<string> | no | Limits results to credit memos in any of these application statuses. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'. Any other value matches no credit memo. An empty array does not constrain. |
filters.creditMemoType |
array<string> | no | Limits results to credit memos of any of these types. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn', 'trueUp'. Any other value matches no credit memo. An empty array does not constrain. |
filters.description |
string | no | Limits results to credit memos whose description contains this text. The match is case-insensitive. |
filters.externalCreditMemoId |
string | no | Limits results to the credit memo with this external source system identifier. The match is exact. |
filters.invoiceNumber |
string | no | Limits results to credit memos created from the invoice with this number. The match is exact. |
filters.creditMemoDate |
object | no | Limits results to credit memos issued between the given bounds. Omit either bound to leave that side open. |
filters.creditMemoDate.start |
date | no | The inclusive lower bound. Format YYYY-MM-DD. |
filters.creditMemoDate.end |
date | no | The inclusive upper bound. Format YYYY-MM-DD. |
filters.lastModifiedDate |
object | no | Limits results by when the credit memo last changed, the window to poll for an incremental sync. Omit either bound to leave that side open. |
filters.lastModifiedDate.start |
string | no | The inclusive lower bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
filters.lastModifiedDate.end |
string | no | The inclusive upper bound, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
filters.externalIdentifier |
object | no | Limits results to credit memos with this external identifier. Both fieldName and value are required. Several credit memos may share a value, so this returns the items array, not a single record. |
filters.externalIdentifier.fieldName |
string | yes | The configured field name of the identifier, for example 'netsuiteCreditMemoId'. It must be the fieldName of an existing credit-memo external-identifier configuration, or the request fails with UNKNOWN_EXTERNAL_IDENTIFIER. |
filters.externalIdentifier.value |
string | yes | The identifier value to match, exactly as the other system stores it. |
page |
object | no | The pagination controls. Omit on the first request. |
page.cursor |
string | no | The cursor from the previous response's pagination.nextCursor. Omit on the first request. |
page.size |
number | no | The number of credit memos per page. Defaults to 50. A value above 200 is treated as 200, not rejected. |
{}
Response
200 Success
Under data (searchCreditMemoOutput):
| Field | Type | Required | Description |
|---|---|---|---|
items |
array<object> | yes | The matching credit memos for this page, most recently created first. An empty array when nothing matches. |
items[].id |
string | yes | The unique identifier for the credit memo. |
items[].creditMemoNumber |
string | no | The credit memo number, for example 'CM-1'. Absent while none has been assigned. |
items[].creditMemoDate |
date | yes | The date the credit memo was issued. Format YYYY-MM-DD. |
items[].creditMemoStatus |
string | no | The application status of the credit memo. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull'. |
items[].creditMemoType |
string | no | How the credit memo was created. Possible values: 'manual', 'creditRebill', 'earlyRenewal', 'lateFees', 'cancellation', 'inventoryReturn', 'trueUp'. Only 'manual' credit memos are created through this API. The rest come from internal workflows. |
items[].manualCreditMemoType |
string | no | The reason for a manual credit memo, as a tenant-configured key, for example 'writeOff' or 'customerSatisfaction'. Absent when creditMemoType is not 'manual'. |
items[].currency |
string | yes | The currency of the credit memo. Every amount on the record, its lines and its application rows is in this currency. Format ISO 4217, for example 'USD'. |
items[].description |
string | no | A free-form description of the credit memo. |
items[].externalCreditMemoId |
string | no | The identifier of this credit memo in an external source system. For identifiers owned by your other systems, use externalIdentifiers below. |
items[].customerId |
string | yes | The customer the credit memo is issued to. See id on GET accounting/customers/:id. |
items[].customerName |
string | no | The name of the customer the credit memo is issued to. |
items[].customerNumber |
string | no | The customer number of the customer the credit memo is issued to. |
items[].entityId |
string | yes | The legal entity that issued the credit memo. See id on GET base/entities. |
items[].entityName |
string | no | The name of the legal entity that issued the credit memo. |
items[].invoiceId |
string | no | The invoice the credit memo was created from. Absent when it was not created from an invoice. See id on GET accounting/invoices/:id. |
items[].invoiceNumber |
string | no | The number of the invoice the credit memo was created from. Present whenever invoiceId is. |
items[].subtotal |
decimal | no | The subtotal before tax and duties, in the credit memo currency. Absent when no subtotal has been computed. |
items[].totalTax |
decimal | no | The total tax across all lines, in the credit memo currency. |
items[].totalDutiesAndCustoms |
decimal | no | The total duties and customs across all lines, in the credit memo currency. |
items[].totalAmountCredited |
decimal | no | The total credited, including tax and duties, in the credit memo currency. |
items[].appliedAmount |
decimal | no | The amount applied to invoices and debit memos so far, in the credit memo currency. This is the net of the application rows below. |
items[].unappliedAmount |
decimal | no | The amount still available to apply, in the credit memo currency. For an earlier date, take totalAmountCredited less the appliedAmount of its credit memo applications with appliedDate on or before it. |
items[].lastModifiedDate |
date-time | yes | The date and time the credit memo last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
items[].lines |
array<object> | no | The lines of the credit memo, each crediting one product or free-text item. An empty array when the credit memo has no lines. Every amount is in the credit memo currency. |
items[].lines[].id |
string | yes | The unique identifier for the credit memo line. |
items[].lines[].creditMemoLineNumber |
string | no | The line number within the credit memo. |
items[].lines[].description |
string | no | The line description, as shown to the customer. |
items[].lines[].productId |
string | no | The product credited by the line. Absent on free-text lines. See id on GET accounting/products/:id. |
items[].lines[].productCode |
string | no | The product code as it stood when the line was created. It does not follow later changes to the product. |
items[].lines[].productDescription |
string | no | The product description as it stood when the line was created. It does not follow later changes to the product. |
items[].lines[].quantity |
decimal | no | The quantity credited. |
items[].lines[].unitPrice |
decimal | no | The price per unit, in the credit memo currency. |
items[].lines[].totalPrice |
decimal | no | The line total before tax and duties, in the credit memo currency. |
items[].lines[].taxAmount |
decimal | no | The tax on the line, in the credit memo currency. |
items[].lines[].dutiesAndCustomsAmount |
decimal | no | The duties and customs on the line, in the credit memo currency. |
items[].lines[].amountCredited |
decimal | no | The total credited for the line, in the credit memo currency: totalPrice + taxAmount + dutiesAndCustomsAmount. |
items[].lines[].taxCode |
string | no | The tax code applied to the line. |
items[].lines[].taxDate |
date | no | The date the line's tax was determined. Format YYYY-MM-DD. |
items[].lines[].serviceStartDate |
date | no | The first day of the service period the line covers. Format YYYY-MM-DD. |
items[].lines[].serviceEndDate |
date | no | The last day of the service period the line covers, inclusive. Format YYYY-MM-DD. |
items[].applications |
array<object> | no | The application rows, each recording one allocation of the credit memo against an invoice or debit memo. Applying and unapplying both add a row, told apart by actionType and the sign of appliedAmount, so this is an append-only history rather than the current allocation. An empty array when the credit memo has never been applied. |
items[].applications[].id |
string | yes | The unique identifier for the application row. |
items[].applications[].appliedAmount |
decimal | no | The signed amount moved by this row, in the row's currency: positive when applying, negative when unapplying. Sum the rows to reconcile against the header appliedAmount. |
items[].applications[].appliedDate |
date | yes | The date the allocation was recorded. Format YYYY-MM-DD. |
items[].applications[].actionType |
string | no | What this row did. Possible values: 'applied', 'unapplied'. |
items[].applications[].type |
string | no | The kind of document the credit memo was allocated against. Possible values: 'invoice', 'debitMemo'. Absent when the stored target kind is not one this version recognizes. |
items[].applications[].targetId |
string | no | The target document: an invoice when type is 'invoice', a debit memo when type is 'debitMemo'. Absent when the target no longer exists or its kind is unrecognized. See id on GET accounting/invoices/:id and GET accounting/debit-memos/:id. |
items[].applications[].targetNumber |
string | no | The number of the target document. |
items[].applications[].currency |
string | yes | The currency of this row's appliedAmount. Matches the credit memo currency. Format ISO 4217, for example 'USD'. |
items[].externalIdentifiers |
array<object> | no | The credit memo's identifiers in other systems, one per configured field name. An empty array or absent when the credit memo has none. |
items[].externalIdentifiers[].fieldName |
string | yes | The configured field name of the identifier, for example 'netsuiteCreditMemoId'. |
items[].externalIdentifiers[].value |
string | yes | The identifier in the other system. |
items[].externalIdentifiers[].externalUrl |
string | no | A link to the record in the other system. Absent when none is set. |
pagination |
object | yes | The pagination cursor for this page. |
pagination.nextCursor |
string | no | The cursor for the next page. Pass it as page.cursor. Absent on the last page. |
pagination.hasMore |
boolean | yes | True when more matches remain beyond this page. |
{
"data": {
"items": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"creditMemoNumber": "<creditMemoNumber>",
"creditMemoDate": "2026-01-15",
"creditMemoStatus": "<creditMemoStatus>",
"creditMemoType": "<creditMemoType>",
"manualCreditMemoType": "<manualCreditMemoType>",
"currency": "<currency>",
"description": "<description>",
"externalCreditMemoId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"customerName": "<customerName>",
"customerNumber": "<customerNumber>",
"entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"entityName": "<entityName>",
"invoiceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoiceNumber": "<invoiceNumber>",
"subtotal": "19.99",
"totalTax": "19.99",
"totalDutiesAndCustoms": "19.99",
"totalAmountCredited": "19.99",
"appliedAmount": "19.99",
"unappliedAmount": "19.99",
"lastModifiedDate": "2026-01-15T09:30:00.000Z",
"lines": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"creditMemoLineNumber": "<creditMemoLineNumber>",
"description": "<description>",
"productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productCode": "<productCode>",
"productDescription": "<productDescription>",
"quantity": "19.99",
"unitPrice": "19.99",
"totalPrice": "19.99",
"taxAmount": "19.99",
"dutiesAndCustomsAmount": "19.99",
"amountCredited": "19.99",
"taxCode": "<taxCode>",
"taxDate": "2026-01-15",
"serviceStartDate": "2026-01-15",
"serviceEndDate": "2026-01-15"
}
],
"applications": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"appliedAmount": "19.99",
"appliedDate": "2026-01-15",
"actionType": "<actionType>",
"type": "<type>",
"targetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"targetNumber": "<targetNumber>",
"currency": "<currency>"
}
],
"externalIdentifiers": [
{
"fieldName": "<fieldName>",
"value": "<value>",
"externalUrl": "<externalUrl>"
}
]
}
],
"pagination": {
"nextCursor": "<nextCursor>",
"hasMore": true
}
},
"diagnostics": [
{
"code": "<code>",
"message": "<message>",
"severity": "error",
"path": [
"<path>"
],
"details": "<details>"
}
]
}
Errors
| Code | Status |
|---|---|
UNKNOWN_EXTERNAL_IDENTIFIER |
400 |
INVALID_TIMESTAMP |
400 |
Statuses
400— Invalid request or business failure. Codes: UNKNOWN_EXTERNAL_IDENTIFIER, INVALID_TIMESTAMP401— The request carries no valid access token.403— Not authorized404— Not found429— Too many requests from this client address. The response has no body and noRetry-Afterheader.500— Internal server error