inboundReturnOrderLines resource type
Represents an inbound return order line in Business Central.
Note
For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.
Methods
| Method | Return Type | Description |
|---|---|---|
| GET inboundReturnOrderLine | inbound return order line | Gets an inbound return order line object. |
Navigation
| Navigation | Return Type | Description |
|---|---|---|
| inboundReturnOrderCommentsWebCon | inboundReturnOrderComments | Gets the inboundReturnOrderComments for the inbound return order line |
Properties
| Property | Type | Description | Max Length |
|---|---|---|---|
| 🔑 id | GUID | The unique ID of the inbound return order line. Non-editable. | |
| documentId | GUID | The ID of the parent inbound return order. | |
| documentNumber | String | The document number of the parent inbound return order. | 20 |
| sequence | Integer | The line sequence number. | |
| externalLineId | String | The external line id for this inbound return order line. | 50 |
| itemId | GUID | The ID of the item in the inbound return order line. | |
| itemNumber | String | The number of the item in the inbound return order line. | 20 |
| itemReferenceNumber | String | Specifies a reference to the item number defined by the vendor or customer or the barcode of the item. | 50 |
| accountId | GUID | The ID of the account in the inbound return order line. | |
| accountNumber | String | The number of the account in the inbound return order line. | 20 |
| resourceId | GUID | The ID of the resource in the inbound return order line. | |
| resourceNumber | String | The number of the resource in the inbound return order line. | 20 |
| lineType | NAV.invoiceLineAggLineType | The type of the inbound return order line. It can be "Comment", "Account", "Item", "Resource" Value", "Fixed Asset" or "Charge". | |
| lineObjectNumber | String | The number of the object (account, item or resource) of the inbound return order line. | 20 |
| description | String | Specifies the description of the inbound return order line. | 100 |
| description2 | String | Specifies the description 2 of the inbound return order line. | 50 |
| unitOfMeasureId | GUID | The ID of unit of measure for the inbound return order line. | |
| unitOfMeasureCode | String | The code of unit of measure for the inbound return order line. | 10 |
| quantity | Decimal | The quantity of the item in the inbound return order line. | |
| unitPrice | Decimal | Specifies the price for one unit of the item in the specified inbound return order line. | |
| discountAmount | Decimal | The inbound return order line discount amount. | |
| discountPercent | Decimal | The line discount percent. | |
| taxPercent | Decimal | The tax percent for the line. | |
| netAmount | Decimal | The net amount is the amount including all discounts (taken from the inbound return order line). | |
| netAmountIncludingTax | Decimal | The net amount including tax represents the full amount payable, inclusive of all applicable taxes. | |
| itemVariantId | GUID | The ID of the item variant in the inbound return order line. | |
| itemVariantCode | String | The code of the item variant in the inbound return order line. | 10 |
| locationCode | String | The ID of the item location in the inbound return order line. | 10 |
| locationId | GUID | The code of the item location in the inbound return order line. | |
| returnReasonCode | String | Specifies the reason code for the return. This code categorizes the reason for returning the item (e.g., defective, wrong item, customer changed mind). | 10 |
| appliesToInvoiceLineNumber | Integer | Specifies the invoice line number to which this return line applies. Used when the return references a specific line from the original invoice. | |
| appliesToInvoiceLineId | GUID | Specifies the invoice line ID to which this return line applies. Used when the return references a specific line from the original invoice. |
Best practice
How to handle return orders
Inbound return order lines allow you to explicitly reference the original invoice line to which the return applies. The referenced invoice line must exist and match the return line in key aspects: same line type (Item, Resource, Account, etc.), same asset number (item/resource/account), same unit of measure and the return quantity must not exceed the quantity available to return from the original invoice line.
Important:
- You may omit appliesToInvoiceLineNumber and appliesToInvoiceLineId when you do not know the exact line or when there is only one suitable candidate. Even if the invoice is provided on the return order header, these fields are optional.
- If no explicit line is provided, the system will attempt to find a corresponding invoice line based on line type, asset number (item/resource/account), unit of measure, and quantity. If multiple lines are suitable, one of them will be chosen automatically. To avoid incorrect assignment in case of doubt, we recommend that you provide the invoice line number or ID whenever possible.
- When a return order line references an invoice line (explicitly or implicitly), the system uses a "Copy Invoice Line" method to prefill the return line with data from the original invoice line (for example, description, unit of measure, quantity, unit price, etc.). You may omit fields in your request if they are identical to the invoice values. However, to ensure accuracy, we recommend supplying all known values and explicitly overriding any prefilled fields that should differ.