Search Debit Memo

POST /accounting/debit-memos/search

Group: Accounting › Debit Memos · Operation ID: searchDebitMemo

Returns the debit memos that match the given filters, each in full including its lines.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "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: searchDebitMemoInput.

Field Type Required Description
filters object no The filters to apply. A debit memo must match every filter you send. Omit to return all debit memos.
filters.id string no Limits results to the debit memo with this identifier.
filters.debitMemoNumber string no Limits results to the debit memo with this number, for example 'DM-1'. The match is exact.
filters.creditMemoId string no Limits results to debit memos settling this credit memo. See id on GET accounting/credit-memos/:id.
filters.creditMemoNumber string no Limits results to debit memos settling the credit memo with this number. The match is exact.
filters.customerId string no Limits results to debit memos issued to this customer. See id on GET accounting/customers/:id.
filters.customerName string no Limits results to debit memos whose customer name contains this text. The match is case-insensitive.
filters.customerNumber string no Limits results to debit memos with this customer number. The match is exact.
filters.entityId string no Limits results to debit memos issued by this legal entity. See id on GET base/entities.
filters.entityName string no Limits results to debit memos whose legal entity name contains this text. The match is case-insensitive.
filters.approvalStatus array of string no Limits results to debit memos in any of these approval statuses. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Any other value matches no debit memo.
filters.debitMemoStatus array of string no Limits results to debit memos in any of these coverage statuses. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Any other value matches no debit memo.
filters.debitMemoType array of string no Limits results to debit memos carrying any of these reason keys, for example 'orderEntryError'. The accepted keys are configured per tenant.
filters.currency string no Limits results to debit memos in this currency. Format ISO 4217, for example 'USD'. The match is exact.
filters.paymentTerm string no Limits results to debit memos with this payment-term key. The match is exact. See code on GET accounting/payment-terms.
filters.purchaseOrder string no Limits results to debit memos whose purchase-order reference contains this text. The match is case-insensitive.
filters.customerMessage string no Limits results to debit memos whose customer message contains this text. The match is case-insensitive.
filters.externalDebitMemoId string no Limits results to the debit memo with this external system identifier. The match is exact.
filters.isMigrated boolean no Limits results by whether the debit memo was loaded from a previous system. Omit to return both.
filters.debitMemoDate object no Limits results to debit memos issued in this date range. Omit either bound to leave that side open.
filters.debitMemoDate.start string (date) no The inclusive lower bound. Format YYYY-MM-DD.
filters.debitMemoDate.end string (date) no The inclusive upper bound. Format YYYY-MM-DD.
filters.dueDate object no Limits results to debit memos falling due in this date range. Omit either bound to leave that side open.
filters.dueDate.start string (date) no The inclusive lower bound. Format YYYY-MM-DD.
filters.dueDate.end string (date) no The inclusive upper bound. Format YYYY-MM-DD.
filters.lastModifiedDate object no Limits results to debit memos last changed in this range. 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.
page object no The pagination controls. Omit for the first page.
page.cursor string no The cursor from the previous response's pagination.nextCursor. Omit for the first page.
page.size number no The number of debit memos per page. Defaults to 50. A value above 200 is treated as 200, not rejected.

Example:

{
  "filters": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "debitMemoNumber": "<debitMemoNumber>",
    "creditMemoId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "creditMemoNumber": "<creditMemoNumber>",
    "customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "customerName": "<customerName>",
    "customerNumber": "<customerNumber>",
    "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "entityName": "<entityName>",
    "approvalStatus": [
      "<approvalStatus>"
    ],
    "debitMemoStatus": [
      "<debitMemoStatus>"
    ],
    "debitMemoType": [
      "<debitMemoType>"
    ],
    "currency": "<currency>",
    "paymentTerm": "<paymentTerm>",
    "purchaseOrder": "<purchaseOrder>",
    "customerMessage": "<customerMessage>",
    "externalDebitMemoId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "isMigrated": true,
    "debitMemoDate": {
      "start": "2026-01-15",
      "end": "2026-01-15"
    },
    "dueDate": {
      "start": "2026-01-15",
      "end": "2026-01-15"
    },
    "lastModifiedDate": {
      "start": "<start>",
      "end": "<end>"
    }
  },
  "page": {
    "cursor": "<cursor>",
    "size": 0
  }
}

Response

200 Success

Under data (searchDebitMemoOutput):

Field Type Required Description
items array of object yes The debit memos on this page, most recently created first. An empty array when nothing matches.
items[].id string yes The unique identifier for the debit memo.
items[].debitMemoNumber string no The debit memo number, for example 'DM-1'. Absent while none has been assigned.
items[].creditMemoId string no The source credit memo this debit memo settles. Absent on a standalone debit memo. See id on GET accounting/credit-memos/:id.
items[].creditMemoNumber string no The number of the source credit memo. Present whenever creditMemoId is.
items[].debitMemoDate string (date) yes The date the debit memo was issued. Format YYYY-MM-DD.
items[].dueDate string (date) no The date the debit memo falls due. Format YYYY-MM-DD. Computed from debitMemoDate plus the payment term's days.
items[].taxDate string (date) no The date the debit memo's tax was determined on. Format YYYY-MM-DD. Defaults to debitMemoDate.
items[].approvalStatus string no The approval status of the debit memo. Possible values: 'draft', 'pendingApproval', 'revise', 'approved', 'rejected'. Only an approved debit memo has financial effect.
items[].debitMemoStatus string no The payment and credit coverage status. Possible values: 'unpaid', 'isOverdue', 'partiallyPaid', 'paidInFull', 'creditedInFull', 'disputed'. Absent before approval.
items[].debitMemoType string yes The reason key for the charge, for example 'orderEntryError'. The accepted keys are configured per tenant.
items[].currency string yes The currency of the debit memo. Format ISO 4217, for example 'USD'. It governs every amount on the record.
items[].customerId string yes The customer the debit memo is issued to. See id on GET accounting/customers/:id.
items[].customerName string no The display name of the customer.
items[].customerNumber string no The customer number.
items[].entityId string yes The legal entity that issued the debit memo. See id on GET base/entities.
items[].entityName string no The name of the issuing legal entity.
items[].paymentTerm string yes The payment-term key applied to the debit memo. See code on GET accounting/payment-terms.
items[].purchaseOrder string no The customer's own purchase-order reference.
items[].customerMessage string no A free-text message shown to the customer on the document.
items[].externalDebitMemoId string no The identifier of this debit memo in an external source system.
items[].isMigrated boolean no Whether the debit memo was loaded from a previous system. When true, it is excluded from dunning and its journal entries are auto-reversed.
items[].debitGlAccountId string no The header debit GL account the journal entry posts to, an Asset-type account. See id on GET accounting/accounts/:id.
items[].billToAddressId string yes The bill-to address on the document. There is no endpoint for it.
items[].soldToAddressId string yes The sold-to address on the document. There is no endpoint for it.
items[].subtotal string (decimal) no The sum of the lines' pre-discount totals, in the debit memo currency.
items[].totalAmount string (decimal) no The total including tax, in the debit memo currency.
items[].totalTax string (decimal) no The total tax across all lines, in the debit memo currency.
items[].totalAmountDebited string (decimal) no The gross amount debited, in the debit memo currency.
items[].lineDiscounts string (decimal) no The sum of the prorated discount amounts across all lines, in the debit memo currency.
items[].unappliedCreditAmount string (decimal) no The credit still unapplied on the source credit memo, in the debit memo currency. Absent on a standalone debit memo.
items[].lastModifiedDate string (date-time) yes The date and time the debit memo record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
items[].lines array of object no The lines of the debit memo, each debiting one line of the source credit memo. An empty array when the debit memo has no lines. All line amounts are in the debit memo currency.
items[].lines[].id string yes The unique identifier for the debit memo line.
items[].lines[].lineNumber string no The sequential line number within the debit memo.
items[].lines[].description string no A free-text line description, shown to the customer.
items[].lines[].productId string no The debited product. Absent on a free-text line. See id on GET accounting/products/:id.
items[].lines[].creditMemoLineId string no The source credit memo line this line debits. See lines[].id on GET accounting/credit-memos/:id.
items[].lines[].quantity string (decimal) no The quantity debited. A count, not an amount, so it has no currency.
items[].lines[].unitOfMeasure string no The unit-of-measure key, for example 'each'.
items[].lines[].unitPrice string (decimal) no The price per unit, in the debit memo currency.
items[].lines[].adjustedUnitPrice string (decimal) no The price per unit after adjustment, in the debit memo currency.
items[].lines[].listPrice string (decimal) no The list price per unit as it stood on the source credit memo line, in the debit memo currency.
items[].lines[].listPriceTotal string (decimal) no The pre-discount line total, in the debit memo currency.
items[].lines[].discountAmount string (decimal) no The discount from the source credit memo line, in the debit memo currency.
items[].lines[].discountPercentage string (decimal) no The discount as a percentage of the list price. A percentage, not an amount, so it has no currency.
items[].lines[].totalPrice string (decimal) no The line total excluding tax, in the debit memo currency.
items[].lines[].amountDebited string (decimal) no The amount debited for the line, in the debit memo currency.
items[].lines[].totalAmountDue string (decimal) no The amount of the source credit memo line still available to debit, in the debit memo currency.
items[].lines[].taxAmount string (decimal) no The tax on the line, in the debit memo currency.
items[].lines[].taxCode string no The tax code applied to the line.
items[].lines[].taxDate string (date) no The date the line's tax was determined on. Format YYYY-MM-DD.
items[].lines[].taxMode string no How the line's prices are quoted for tax. Possible values: 'TaxInclusive', 'TaxExclusive'.
items[].lines[].taxExemptCode string no The customer-level tax-exempt code applied to the line.
items[].lines[].creditGlAccountId string no The line's credit GL account, the credit side of the journal entry. See id on GET accounting/accounts/:id.
items[].lines[].serviceStartDate string (date) no The first day of the service period the line covers. Format YYYY-MM-DD.
items[].lines[].serviceEndDate string (date) no The last day of the service period the line covers, inclusive. Format YYYY-MM-DD.
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.

Errors

Code Status
INVALID_TIMESTAMP 400

Statuses