List Sales Credit Memo Lines

Prev Next
Get
/softera/softeraEInvoice/v2.0/companies({companyId})/salesCreditMemoLines

Lists sales credit memo lines across documents. A filter on documentId (or id) is mandatory, e.g. $filter=documentId eq d73cb715-0a0e-f011-9346-002248a0b478; without it the request fails with "You must specify an Id or a Document Id to get the lines."

Security
OAuth
FlowClient Credentials
Token URLhttps://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
Scopes:
https://api.businesscentral.dynamics.com/.defaultGrants the permissions assigned to the Microsoft Entra ID application in Business Central
Path parameters
companyId
string (uuid) Required

GUID for targeted Company

Example54c4066e-2b2b-4118-ac75-7dfea25be205
Query parameters
$top
integer

Maximum number of records to return. Without $top, Business Central returns the records page by page and adds @odata.nextLink to the response.

Minimum1
$skip
integer

Number of records to skip.

Minimum0
Default0
$orderby
string

Sort order, e.g. lastModifiedDateTime desc.

$filter
string

OData filter expression, e.g. number eq '10000'. See Using filtering in API calls.

$select
string

Comma-separated list of properties to return.

$count
boolean

When true, the response includes @odata.count with the total number of matching records.

Defaultfalse
$expand
string

OData $expand for sales credit memo lines. Supported navigations: dimensionSetLines, location.

ExampledimensionSetLines
Responses
200

OK

Expand All
object
@odata.context
string (uri)

OData context URL of the collection

@odata.count
integer

Total number of matching records, returned when $count=true

@odata.nextLink
string (uri)

URL of the next page, present when more records are available

value
Array of object (salesCreditMemoLine)
object
id
string (uuid)
documentId
string (uuid)

SystemId of the sales credit memo. Cannot be changed.

sequence
integer

Line No. Cannot be changed, delete and insert the line again.

Example10000
itemId
string (uuid)
accountId
string (uuid)
lineType
string
Valid values[ "Comment", "Account", "Item", "Resource", "Fixed_x0020_Asset", "Charge", "Allocation_x0020_Account" ]
ExampleItem
lineObjectNumber
string

Item or G/L account number, depending on lineType. Cannot be changed once set.

Max length20
ExampleZ0000001
description
string
Max length100
ExampleSulankstoma kėdė
unitOfMeasureId
string (uuid)
unitOfMeasureCode
string
Max length10
ExampleVNT
quantity
number
Example20
unitPrice
number
Example100.1234
discountAmount
number
Example0
discountPercent
number
Example0
discountAppliedBeforeTax
boolean
amountExcludingTax
number
taxCode
string
Max length50
ExampleA PREK21
taxPercent
number
Example21
totalTaxAmount
number
amountIncludingTax
number
invoiceDiscountAllocation
number
netAmount
number
netTaxAmount
number
netAmountIncludingTax
number
shipmentDate
string (date)
Example2025-04-02
itemVariantId
string (uuid)
locationId
string (uuid)
shortcutDimension1Code
string
ExamplePARD
shortcutDimension2Code
string
Example333
dimensionSetLines
Array of object (dimensionSetLine)
object

Dimension set line (standard page "APIV2 - Dimension Set Lines"). If the customer, vendor, G/L account or item has default dimensions, overriding them on a document line needs additional PATCH requests; without default dimensions, send the dimensions with the line in the same request. For documents with hundreds of lines, post dimensions in a separate $batch request.

id
string (uuid)

SystemId of the dimension (not of the line)

code
string
ExamplePADALINYS
consolidationCode
string
Example
parentId
string (uuid)
parentType
string
Valid values[ "_x0020_", "Journal_x0020_Line", "Sales_x0020_Order", "Sales_x0020_Order_x0020_Line", "Sales_x0020_Quote", "Sales_x0020_Quote_x0020_Line", "Sales_x0020_Credit_x0020_Memo", "Sales_x0020_Credit_x0020_Memo_x0020_Line", "Sales_x0020_Invoice", "Sales_x0020_Invoice_x0020_Line", "Purchase_x0020_Invoice", "Purchase_x0020_Invoice_x0020_Line", "General_x0020_Ledger_x0020_Entry", "Time_x0020_Registration_x0020_Entry", "Sales_x0020_Shipment", "Sales_x0020_Shipment_x0020_Line", "Purchase_x0020_Receipt", "Purchase_x0020_Receipt_x0020_Line", "Purchase_x0020_Order", "Purchase_x0020_Order_x0020_Line", "Purchase_x0020_Credit_x0020_Memo", "Purchase_x0020_Credit_x0020_Memo_x0020_Line" ]
ExampleSales_x0020_Invoice
displayName
string
ExamplePadalinys
valueId
string (uuid)
valueCode
string
ExampleADM
valueConsolidationCode
string
Example
valueDisplayName
string
ExampleAdministracija
location
object (location)

Location (standard page "APIV2 - Locations").

id
string (uuid)
code
string
ExampleCENTRINIS
displayName
string
ExampleCentrinis sandėlis
contact
string
ExampleVardas Pavarde
addressLine1
string
ExampleSavanorių pr. 1
addressLine2
string
Example
city
string
ExampleVilnius
state
string
Example
country
string
ExampleLT
postalCode
string
ExampleLT-03116
phoneNumber
string
Example+370 5 2000000
email
string (email)
website
string
Example
lastModifiedDateTime
string (date-time)
400

Bad Request

Expand All
object
error
object
code
string
ExampleBadRequest
message
string
ExampleThe field Customer No. of table Sales Header contains a value (P9999999) that cannot be found in the related table (Customer). CorrelationId: fc7b9039-73d9-48d2-a9d3-9a8e0f8b91da.
401

Unauthorized

Headers
WWW-Authenticate
string
Expand All
object
error
object
code
string
Default"Unauthorized"
message
string
Default"The credentials provided are incorrect"