Skip to main content

Returns APIs

More about Returns API

Deskera - Return Service

Contact com.deskera.erp.return.service APIs.

purchase-return-controller​

Purchase Return Controller

Add Purchase return​

POST​

Summary​

Create purchase return

More about Returns API

Description​

API to create purchase return.

Parameters​
NameLocated inDescriptionRequiredSchema
purchaseReturnDtobodypurchaseReturnDtoYesPurchaseReturnDto
Responses​
CodeDescriptionSchema
200OKPurchaseReturnDto
201Purchase return created successfullyPurchaseReturnDto
400Failed to create purchase return
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

DELETE​

Summary​

Delete purchase return

Description​

API to delete purchase return.

Parameters​
NameLocated inDescriptionRequiredSchema
purchaseReturnCodequerypurchaseReturnCodeYesstring
Responses​
CodeDescription
200OK
201Purchase return deleted successfully
204No Content
400Failed to delete purchase return
401Unauthorized
403Forbidden
Security​
Security SchemaScopes
Authorizationglobal

Get Purchase return details​

GET​

Summary​

Get purchase returns for a document

Description​

API to get purchase returns for a document

Parameters​
NameLocated inDescriptionRequiredSchema
documentCodequerydocumentCodeYesstring
documentTypequerydocumentTypeYesstring
forRejectedGrqueryforRejectedGrNoboolean
Responses​
CodeDescriptionSchema
200Purchase returns fetched successfully[ PurchaseReturnDto ]
400Failed to fetch purchase return
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

Bulk Create Purchase Return​

POST​

Summary​

Create purchase return

Description​

API to bulk create purchase returns.

Parameters​
NameLocated inDescriptionRequiredSchema
purchaseReturnDtobodypurchaseReturnDtoYes[ PurchaseReturnDto ]
Responses​
CodeDescriptionSchema
201Purchase return created successfullyPurchaseReturnBulkApiResponse
400Failed to create purchase return
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

Get Purchase Return Reasons​

GET​

Summary​

Get Unique return reasons

Description​

API to get unique purchase return reasons.

Responses​
CodeDescriptionSchema
200Purchase return reasons fetched successfully[ string ]
400Failed to fetch purchase return reasons
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

sales-return-controller​

Sales Return Controller

Sales Return​

GET​

Summary​

Search sales returns.

Description​

API to search sales returns.

Parameters​
NameLocated inDescriptionRequiredSchema
customfieldquerycustomfieldNostring
limitquerylimitNointeger
pagequerypageNointeger
queryqueryqueryNostring
searchquerysearchNostring
sortquerysortNostring
sortDirquerysortDirNostring
Responses​
CodeDescriptionSchema
200Sales returns have been fetched successfully.Page«SalesReturnDto»
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

POST​

Summary​

Create sales return

Description​

API to create sales return.

Parameters​
NameLocated inDescriptionRequiredSchema
salesReturnDtobodysalesReturnDtoYesSalesReturnDto
Responses​
CodeDescriptionSchema
200OKSalesReturnDto
201Sales return created successfullySalesReturnDto
400Failed to create sales return
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

DELETE​

Summary​

Delete sales return

Description​

API to delete sales return.

Parameters​
NameLocated inDescriptionRequiredSchema
salesReturnCodequerysalesReturnCodeYesstring
Responses​
CodeDescription
200OK
201Sales return deleted successfully
204No Content
400Failed to delete sales return
401Unauthorized
403Forbidden
Security​
Security SchemaScopes
Authorizationglobal

Get Sales Return Details​

GET​

Summary​

Get sales returns for a document

Description​

API to get sales returns for a document

Parameters​
NameLocated inDescriptionRequiredSchema
documentCodequerydocumentCodeYesstring
documentTypequerydocumentTypeYesstring
checkLinkedDocsquerycheckLinkedDocsNoboolean
Responses​
CodeDescriptionSchema
200Sales returns fetched successfully[ SalesReturnDto ]
400Failed to fetch sales return
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

Get Sales Return Reasons​

GET​

Summary​

Get Unique return reasons

Description​

API to get unique sales return reasons.

Responses​
CodeDescriptionSchema
200Sales return reasons fetched successfully[ string ]
400Failed to fetch sales return reasons
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

Get Sales Return By Code​

GET​

Summary​

Get sales return by code

Description​

API to get sales return by code.

Parameters​
NameLocated inDescriptionRequiredSchema
documentCodepathdocumentCodeYesstring
Responses​
CodeDescriptionSchema
200Sales return fetched successfullySalesReturnDto
400Failed to fetch sales return
401Unauthorized
403Forbidden
404Not Found
Security​
Security SchemaScopes
Authorizationglobal

Models​

AdvancedTrackingMetaDto​

NameTypeDescriptionRequired
acquiredCostnumberAcquired cost of the entire serial or batch
Example: 1
No
advancedTrackingstringEnum: "NONE", "BATCH", "SERIAL"No
advancedTrackingReturnedAdvancedTrackingReturnedNo
availableBatchSizeForGrdoubleAvailable batch size for goods receipt
Example: 1
No
batchSizedoubleSerial Number or Batch size
Example: 1
Yes
batchSizeAvailableForReturndoubleHow much of the batch or serial is fulfilled
Example: 1
Yes
batchSizeFulfilleddoubleHow much of the batch or serial is fulfilled
Example: 1
Yes
batchSizeReturneddoubleHow much of the batch or serial is returned
Example: 1
Yes
batchSizeReturnedPurchasedoubleHow much of the batch or serial is returned
Example: 1
Yes
binCodestringbin code
Example: "BIN-00001"
Yes
binNamestringbin Name
Example: "Bin 1"
Yes
customField[ CustomFieldItem ]List of custom fieldsNo
expiryDatedateTimeExpiry date. Date Format is dd-mm-yyyy. Applicable when AdvancedTrackingType is Batch
Example: "01-01-2020"
No
idlongNo
isOpeningQtySerialBatchNumberbooleanHas the value true if this is an opening quantity serial/batch number or false otherwiseNo
localizedBatchSizedoubleLocalized batch size
Example: 1
No
manufacturingDatedateTimeManufacturing date. Date Format is dd-mm-yyyy. Applicable when AdvancedTrackingType is Batch
Example: "01-01-2020"
No
productVariantCodestringProduct code
Example: "P-001"
Yes
rackCodestringRack code
Example: "RACK-00001"
Yes
rackNamestringRack Name
Example: "Rack 1"
Yes
rawMaterialQtyToConsumedoubleRaw material quantity to consume
Example: 1
No
reservedQuantitydoubleReserved Serial Number or Batch size
Example: 1
No
reservedQuantityFulfilleddoubleFulfilled reserved serial number or batch size
Example: 1
Yes
reservedUomQuantitydoubleReserved quantity in the item's unit of measurement
Example: 1
No
rowCodestringRow code
Example: "ROW-00001"
Yes
rowNamestringRow Name
Example: "Row 1"
Yes
sequencelongSequence number
Example: 1
No
serialBatchNumberstringSerial Number or Batch Number
Example: "BATCH-001"
Yes
subSequencelongSubsequence number
Example: 1
No
transactionRefCodestringTransaction reference codeNo
warehouseCodestringPrimary Warehouse
Example: "WH-0000001"
No
warehouseNamestringPrimary Warehouse
Example: "warehouse name"
No

AdvancedTrackingReturned​

NameTypeDescriptionRequired
batchSizeReturneddoubleNo
batchSizeReturnedPurchasedoubleNo
returnsByDoc[ AdvancedTrackingReturnedByDoc ]No

AdvancedTrackingReturnedByDoc​

NameTypeDescriptionRequired
documentCodestringNo
qtyReturneddoubleNo
returnTypestringEnum: "SALES_RETURN", "PURCHASE_RETURN"No
transactionRefCodestringNo

BulkPaymentItem​

NameTypeDescriptionRequired
amountnumberNo
documentCodestringNo

ContactInfo​

NameTypeDescriptionRequired
addressstringNo
namestringNo

CustomFieldItem​

NameTypeDescriptionRequired
codestringCustom field codeNo
fieldTypestringType of the custom fieldNo
formulaIdlongIdentifier of the formula linked to this custom fieldNo
idlongDimension Id
Example: 11567
No
labelstringCustom Field Name
Example: "Label"
Yes
modulestringSupported ModulesNo
shortNamestringShort name of the custom fieldNo
valueobjectDimension Value
Example: "XYZ"
No

DocumentInfo​

NameTypeDescriptionRequired
documentCodestringDocument Code.
Example: "QO-0000001"
No
documentCreatedDatedateTimePurchase creation date
Example: "2023-01-01T00:00:00.000+0000"
No
documentReceiveByDatedateTimeDate by which the document is to be receivedNo
documentSequenceCodestringPurchase Order Code
Example: "0000001"
No
documentTypestringType of document.
Enum: "QUOTATION", "PURCHASE_ORDER", "SALES_ORDER", "PURCHASE_INVOICE", "SALES_INVOICE", "MAKE_PAYMENT", "RECEIVE_PAYMENT", "JOURNAL_ENTRY", "BANK_TRANSFER", "CREDIT_NOTE", "DEBIT_NOTE", "EXPENSE", "EXPENSE_PREPAYMENT", "DEPOSIT", "DEPOSIT_ADVPAYMENT", "CONTRA_ADJUSTMENT", "GOODS_RECEIPT", "FULFILLMENT", "PICKLIST", "PACKLIST", "SHIPLIST", "PAYSLIP", "PAYROLL_CHECK", "CHEQUE", "SALES_RETURN", "PURCHASE_RETURN", "STOCK_ADJUSTMENT", "STOCK_TRANSFER", "WORK_ORDER", "FIXED_ASSET", "E_WAY_BILL_SUMMARY", "E_WAY_BILL_DETAIL", "PURCHASE_REQUEST", "JOB_WORK_OUT_ORDER", "JOB_WORK_OUT_TRANSFER", "QC_DOCUMENT", "WIP_PRODUCTION", "STOCK_REQUEST", "STOCK_ISSUE", "FORECAST"
Example: "QUOTATION"
No
isConvertedFromWorkOrderbooleanHas the value true if the document was converted from a work order or false otherwiseNo
isGateEntryDetailsCopiedFromPObooleanHas the value true if gate entry details were copied from the purchase order or false otherwiseNo
itemCodeQuantityMapobjectMap of item code to quantityNo
lineItemDetailsobjectMap of line item detailsNo
productCodes[ string ]List of product codes on the documentNo
refundAmountnumberRefund amountNo

DocumentUOMSchemaDefinition​

NameTypeDescriptionRequired
namestringUOM Schema Name
Example: "UNIT"
No
schemaIdlongUOM Schema Id
Example: 1
No
sinkConversionFactornumber10
Example: 10
No
sinkUOMlong2
Example: 2
No
sourceConversionFactornumber1
Example: 1
No
sourceUOMlong4
Example: 4
No
uidstringUOM Schema Definition Id
Example: 1
No

KnockOffInfo​

NameTypeDescriptionRequired
accountCodePayTostringNo
amountnumberNo
bulkData[ BulkPaymentItem ]No
contraDocumentCodestringNo
currencystringNo
documentCodestringNo
documentDatedateTimeNo
documentOrderintegerNo
documentTypestringEnum: "QUOTATION", "PURCHASE_ORDER", "SALES_ORDER", "PURCHASE_INVOICE", "SALES_INVOICE", "MAKE_PAYMENT", "RECEIVE_PAYMENT", "JOURNAL_ENTRY", "BANK_TRANSFER", "CREDIT_NOTE", "DEBIT_NOTE", "EXPENSE", "EXPENSE_PREPAYMENT", "DEPOSIT", "DEPOSIT_ADVPAYMENT", "CONTRA_ADJUSTMENT", "GOODS_RECEIPT", "FULFILLMENT", "PICKLIST", "PACKLIST", "SHIPLIST", "PAYSLIP", "PAYROLL_CHECK", "CHEQUE", "SALES_RETURN", "PURCHASE_RETURN", "STOCK_ADJUSTMENT", "STOCK_TRANSFER", "WORK_ORDER", "FIXED_ASSET", "E_WAY_BILL_SUMMARY", "E_WAY_BILL_DETAIL", "PURCHASE_REQUEST", "JOB_WORK_OUT_ORDER", "JOB_WORK_OUT_TRANSFER", "QC_DOCUMENT", "WIP_PRODUCTION", "STOCK_REQUEST", "STOCK_ISSUE", "FORECAST"No
exchangeRatenumberNo
linkedDocumentSequencestringNo
linkedWhileCreatingNotebooleanNo
uidstring (uuid)No
whtAmountnumberNo

Pageable​

NameTypeDescriptionRequired
offsetlongNo
pageNumberintegerNo
pageSizeintegerNo
pagedbooleanNo
sortSortNo
unpagedbooleanNo

Page«SalesReturnDto»​

NameTypeDescriptionRequired
content[ SalesReturnDto ]No
emptybooleanNo
firstbooleanNo
lastbooleanNo
numberintegerNo
numberOfElementsintegerNo
pageablePageableNo
sizeintegerNo
sortSortNo
totalElementslongNo
totalPagesintegerNo

PurchaseReturnBulkApiResponse​

NameTypeDescriptionRequired
failure[ PurchaseReturnDto ]No
failureDetails[ PurchaseReturnFailureDetails ]No
success[ PurchaseReturnDto ]No

PurchaseReturnDto​

NameTypeDescriptionRequired
attachments[ string ]AttachmentsNo
binCodestringbin code
Example: "BIN-00001"
Yes
closedDatedateTimeClosed date
Example: "25-10-2020"
No
contactCodestringContact code
Example: "C-00001"
No
contactInfoContactInfoContact informationNo
createdBylongIdentifier of the user who created the purchase returnNo
currencystringCurrency
Example: "SGD"
No
customField[ CustomFieldItem ]List of custom fieldsNo
deletedbooleanPurchase return deleted
Example: false
No
documentSequenceCodestringDocument sequence code
Example: "0000001"
No
exchangeRatenumberExchange rate
Example: 1
No
forRejectedGrbooleanHas the value true if this return is for a rejected goods receipt or false otherwiseNo
idlongUnique identifier for the purchase returnNo
knockoffInfo[ KnockOffInfo ]Knockoff informationNo
linkedDocuments[ DocumentInfo ]Linked documentsNo
memostringMemo
Example: "Sample memo"
No
purchaseReturnCodestringPurchase return code
Example: "SL-00001"
No
purchaseReturnDatedateTimePurchase return date
Example: "25-10-2020"
No
purchaseReturnItems[ PurchaseReturnItemDto ]Purchase Return items informationNo
quantitystringQuantity
Enum: "FULL", "PARTIAL"
Example: 1
No
rackCodestringRack code
Example: "RACK-00001"
Yes
reasonToReturnstringReason to return
Example: "Sample reason"
No
receiptStatusstringReceipt status
Enum: "OPEN", "CLOSED"
Example: "OPEN"
No
receivedAmountnumberReceived amount
Example: 100
No
returnTypestringReturn type
Enum: "RETURN_ONLY", "RETURN_AND_REFUND", "REPLACEMENT"
Example: "RETURN_ONLY"
No
rowCodestringRow code
Example: "ROW-00001"
Yes
sequenceFormatstringSequence format
Example: "5e5789e7bfbb13a1976bb594"
No
tenantIdlongTenant id to whom the purchase return is associated withNo
updatedBylongIdentifier of the user who last updated the purchase returnNo
warehouseCodestringWarehouse code
Example: "WH-00001"
No

PurchaseReturnFailureDetails​

NameTypeDescriptionRequired
errorMsgstringNo
failedObjectPurchaseReturnDtoNo

PurchaseReturnItemDto​

NameTypeDescriptionRequired
advancedTrackingMetaData[ AdvancedTrackingMetaDto ]No
advancedTrackingTypestringEnum: "NONE", "BATCH", "SERIAL"No
customField[ CustomFieldItem ]List of custom fieldsNo
documentSequenceCodestringDocument seqence code
Example: "0000001"
No
documentUOMSchemaDefinitionDocumentUOMSchemaDefinitionDocument UOM Schema Definition
Example: 2
Yes
documentUomlongDocument UOM id
Example: 2
Yes
idlongUnique identifier for the purchase return itemNo
itemSequenceCodestringItem sequence code
Example: "SRI-00001"
No
productCodestringProduct code
Example: "P-00001"
No
productDescriptionstringProduct description
Example: "Sample description"
No
productNamestringNo
productOrderintegerProduct Order
Example: 1
No
quantityReceivednumberQuantity received
Example: 1
No
quantityToReturnnumberQuantity to return
Example: 1
No
tenantIdlongTenant id to whom the purchase return item is associated withNo
uomQuantityReceivednumberUOM Quantity received
Example: 2
Yes
uomQuantityToReturnnumberUOM Quantity to return
Example: 100
Yes
valuenumberReturn item value
Example: 1
No
warehouseCodestringWarehouse code
Example: "WH-00001"
No

SalesReturnDto​

NameTypeDescriptionRequired
attachments[ string ]AttachmentsNo
binCodestringbin code
Example: "BIN-00001"
Yes
closedDatedateTimeClosed Date
Example: "25-10-2020"
No
contactCodestringContact code
Example: "C-00001"
No
contactInfoContactInfoContact InformationNo
createdBylongIdentifier of the user who created the sales returnNo
currencystringCurrency
Example: "SGD"
No
customField[ CustomFieldItem ]List of custom fieldsNo
deletedbooleanSales Return Deleted
Example: false
No
documentSequenceCodestringDocument sequence code
Example: "0000001"
No
exchangeRatenumberExchange Rate
Example: 1
No
fulfillmentTypestringFulfillment type
Enum: "NONE", "DEFAULT", "PICK_PACK_SHIP", "DROP_SHIP"
Example: "PICK_PACK_SHIP"
No
idlongUnique identifier for the sales returnNo
knockoffInfo[ KnockOffInfo ]Knockoff InformationNo
linkedDocuments[ DocumentInfo ]Linked documentsNo
memostringMemo
Example: "Sample memo"
No
quantitystringQuantity
Enum: "FULL", "PARTIAL"
Example: 1
No
rackCodestringRack code
Example: "RACK-00001"
Yes
reasonToReturnstringReason to return
Example: "Sample reason"
No
refundAmountnumberRefund amount
Example: 100
No
returnStatusstringReturn status
Enum: "OPEN", "CLOSED"
Example: "OPEN"
No
returnTypestringReturn Type
Enum: "RETURN_ONLY", "RETURN_AND_REFUND", "REPLACEMENT"
Example: "RETURN_ONLY"
No
rowCodestringRow code
Example: "ROW-00001"
Yes
salesReturnCodestringSales Return Code
Example: "SL-00001"
No
salesReturnDatedateTimeSales Return Date
Example: "25-10-2020"
No
salesReturnItems[ SalesReturnItemDto ]Sales Return items informationNo
sequenceFormatstringSequence format
Example: "5e5789e7bfbb13a1976bb594"
No
tenantIdlongTenant id to whom the sales return is associated withNo
updatedBylongIdentifier of the user who last updated the sales returnNo
warehouseCodestringWarehouse code
Example: "WH-00001"
No
warehouseNamestringWarehouse nameNo

SalesReturnItemDto​

NameTypeDescriptionRequired
advancedTrackingMetaData[ AdvancedTrackingMetaDto ]No
advancedTrackingTypestringEnum: "NONE", "BATCH", "SERIAL"No
customField[ CustomFieldItem ]List of custom fieldsNo
documentSequenceCodestringDocument seqence code
Example: "0000001"
No
documentUOMSchemaDefinitionDocumentUOMSchemaDefinitionDocument UOM Schema Definition
Example: 2
Yes
documentUomlongDocument UOM id
Example: 2
Yes
idlongUnique identifier for the sales return itemNo
itemSequenceCodestringItem sequence code
Example: "SRI-00001"
No
productCodestringProduct code
Example: "P-00001"
No
productDescriptionstringProduct description
Example: "Sample description"
No
productNamestringNo
productOrderintegerProduct Order
Example: 1
No
quantityFulfillednumberQuantity fulfilled
Example: 1
No
quantityToReturnnumberQuantity to return
Example: 1
No
tenantIdlongTenant id to whom the sales return item is associated withNo
uomQuantityFulfillednumberUOM Quantity fulfilled
Example: 2
Yes
uomQuantityToReturnnumberUOM Quantity to return
Example: 100
Yes
valuenumberReturn item value
Example: 1
No

Sort​

NameTypeDescriptionRequired
emptybooleanNo
sortedbooleanNo
unsortedbooleanNo