About CreditMemo
Invoices record the amount owed by the customer for goods/services provided. A credit memo is a reduction of the amount owed. When a credit memo is applied to an invoice, the amount due is reduced. Reasons for this reduction can be not enough stock, returned merchandise, and more. The nested creditMemoLineItem
array records more information on the credit memo.
Note: Credit memo templates are different from email templates. To customize appearances, edit the default credit memo template.
Important: Currently, you can only apply a credit memo via the UI.
Create
Request
<API_URL_EndPoint>/Crud/Create/CreditMemo.json
data={
"obj" : {
"entity" : "CreditMemo",
"isActive" : "1",
"customerId" : "0cu01WIMZDDXALNZhm7p",
"refNumber" : "7890",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"amount" : 862562.90,
"availableAmount" : 200.00,
"appliedAmount" : 50.00,
"status" : "1",
"description" : "",
"poNumber" : "",
"isToBePrinted" : true,
"isToBeEmailed" : true,
"itemSalesTax" : "",
"salesRep" : "",
"FOB" : "",
"shipDate" : "2016-12-05",
"shipMethod" : "",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"creditMemoLineItems" : [ {
"entity" : "CreditMemoLineItem",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"amount" : 20.00,
"price" : 1120.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : "",
"taxable" : true
}, {
"entity" : "CreditMemoLineItem",
"itemId" : "0ii01WBHUZZJGNDTbv0o",
"quantity" : 1,
"amount" : 15.00,
"price" : 175.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : "",
"taxable" : true
} ]
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "CreditMemo",
"id" : "ccr01FFPNXUJVYVX5e0p",
"isActive" : "1",
"customerId" : "0cu01WIMZDDXALNZhm7p",
"refNumber" : "7890",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"amount" : 1295.00,
"availableAmount" : 1295.00,
"appliedAmount" : 0.00,
"status" : "1",
"description" : null,
"poNumber" : null,
"isToBePrinted" : true,
"isToBeEmailed" : true,
"itemSalesTax" : "00000000000000000000",
"salesTaxPercentage" : 0,
"salesTaxTotal" : 0.00,
"salesRep" : null,
"FOB" : null,
"shipDate" : "2016-12-05",
"shipMethod" : null,
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"payToBankAccountId" : "00000000000000000000",
"payToChartOfAccountId" : "00000000000000000000",
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000",
"creditMemoLineItems" : [ {
"entity" : "CreditMemoLineItem",
"id" : "cci01LDYFKPXWGAFOzfj",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"amount" : 1120.00,
"price" : 1120.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000"
}, {
"entity" : "CreditMemoLineItem",
"id" : "cci01SCCHSUWPAQRGzfk",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01WBHUZZJGNDTbv0o",
"quantity" : 1,
"amount" : 175.00,
"price" : 175.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000"
} ]
}
}
Read
Request
<API_URL_EndPoint>/Crud/Read/CreditMemo.json
data={
"id" : "ccr01FFPNXUJVYVX5e0p"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "CreditMemo",
"id" : "ccr01FFPNXUJVYVX5e0p",
"isActive" : "1",
"customerId" : "0cu01WIMZDDXALNZhm7p",
"refNumber" : "7890",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"amount" : 1295.00,
"availableAmount" : 1295.00,
"appliedAmount" : 0.00,
"status" : "1",
"description" : null,
"poNumber" : null,
"isToBePrinted" : true,
"isToBeEmailed" : true,
"itemSalesTax" : "00000000000000000000",
"salesTaxPercentage" : 0,
"salesTaxTotal" : 0.00,
"salesRep" : null,
"FOB" : null,
"shipDate" : "2016-12-05",
"shipMethod" : null,
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"payToBankAccountId" : "00000000000000000000",
"payToChartOfAccountId" : "00000000000000000000",
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000",
"creditMemoLineItems" : [ {
"entity" : "CreditMemoLineItem",
"id" : "cci01LDYFKPXWGAFOzfj",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"amount" : 1120.00,
"price" : 1120.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000"
}, {
"entity" : "CreditMemoLineItem",
"id" : "cci01SCCHSUWPAQRGzfk",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01WBHUZZJGNDTbv0o",
"quantity" : 1,
"amount" : 175.00,
"price" : 175.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000"
} ]
}
}
Update
Request
<API_URL_EndPoint>/Crud/Update/CreditMemo.json
The fields which differ from the Credit Memo are overwritten. For example, if you want to update the details of one Credit Memo line item, you need to enter all the details of the other creditMemoLineItems
too. Else, the Credit Memo is overwritten with the details you pass when updating it.
data={
"obj" : {
"entity" : "CreditMemo",
"id" : "ccr01FFPNXUJVYVX5e0p",
"isActive" : "1",
"customerId" : "0cu01WIMZDDXALNZhm7p",
"refNumber" : "7890",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"amount" : 1295.00,
"availableAmount" : 1295.00,
"appliedAmount" : 0.00,
"status" : "1",
"description" : null,
"poNumber" : null,
"isToBePrinted" : true,
"isToBeEmailed" : true,
"itemSalesTax" : "00000000000000000000",
"salesTaxPercentage" : 0,
"salesTaxTotal" : 0.00,
"salesRep" : null,
"FOB" : null,
"shipDate" : "2016-12-05",
"shipMethod" : null,
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"creditMemoLineItems" : [ {
"entity" : "CreditMemoLineItem",
"id" : "cci01LDYFKPXWGAFOzfj",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 2,
"amount" : 1120.00,
"price" : 1120.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true
}, {
"entity" : "CreditMemoLineItem",
"id" : "cci01SCCHSUWPAQRGzfk",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01WBHUZZJGNDTbv0o",
"quantity" : 1,
"amount" : 175.00,
"price" : 175.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true
} ]
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "CreditMemo",
"id" : "ccr01FFPNXUJVYVX5e0p",
"isActive" : "1",
"customerId" : "0cu01WIMZDDXALNZhm7p",
"refNumber" : "7890",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"amount" : 2415.00,
"availableAmount" : 2415.00,
"appliedAmount" : 0.00,
"status" : "1",
"description" : null,
"poNumber" : null,
"isToBePrinted" : true,
"isToBeEmailed" : true,
"itemSalesTax" : "00000000000000000000",
"salesTaxPercentage" : 0,
"salesTaxTotal" : 0.00,
"salesRep" : null,
"FOB" : null,
"shipDate" : "2016-12-05",
"shipMethod" : null,
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"payToBankAccountId" : "00000000000000000000",
"payToChartOfAccountId" : "00000000000000000000",
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T20:34:34.000+0000",
"creditMemoLineItems" : [ {
"entity" : "CreditMemoLineItem",
"id" : "cci01LDYFKPXWGAFOzfj",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 2,
"amount" : 2240.00,
"price" : 1120.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T20:34:34.000+0000"
}, {
"entity" : "CreditMemoLineItem",
"id" : "cci01SCCHSUWPAQRGzfk",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01WBHUZZJGNDTbv0o",
"quantity" : 1,
"amount" : 175.00,
"price" : 175.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T20:34:34.000+0000"
} ]
}
}
Delete
Request
<API_URL_EndPoint>/Crud/Delete/CreditMemo.json
Once the Credit Memo is deleted, it is marked as inactive ["isActive" :
"2"
].
data={
"id" : "ccr01FFPNXUJVYVX5e0p"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "CreditMemo",
"id" : "ccr01FFPNXUJVYVX5e0p",
"isActive" : "2",
"customerId" : "0cu01WIMZDDXALNZhm7p",
"refNumber" : "7890",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"amount" : 1295.00,
"availableAmount" : 1295.00,
"appliedAmount" : 0.00,
"status" : "1",
"description" : null,
"poNumber" : null,
"isToBePrinted" : true,
"isToBeEmailed" : true,
"itemSalesTax" : "00000000000000000000",
"salesTaxPercentage" : 0,
"salesTaxTotal" : 0.00,
"salesRep" : null,
"FOB" : null,
"shipDate" : "2016-12-05",
"shipMethod" : null,
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"payToBankAccountId" : "00000000000000000000",
"payToChartOfAccountId" : "00000000000000000000",
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T20:21:52.000+0000",
"creditMemoLineItems" : [ {
"entity" : "CreditMemoLineItem",
"id" : "cci01LDYFKPXWGAFOzfj",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"amount" : 1120.00,
"price" : 1120.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000"
}, {
"entity" : "CreditMemoLineItem",
"id" : "cci01SCCHSUWPAQRGzfk",
"creditMemoId" : "ccr01FFPNXUJVYVX5e0p",
"itemId" : "0ii01WBHUZZJGNDTbv0o",
"quantity" : 1,
"amount" : 175.00,
"price" : 175.00,
"serviceDate" : "2016-12-05",
"ratePercent" : 1,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"actgClassId" : "cls01OMKZQISYJBD8qc4",
"jobId" : "job01HCOSIFZPZBFczyc",
"description" : null,
"taxable" : true,
"createdTime" : "2016-12-09T18:44:51.000+0000",
"updatedTime" : "2016-12-09T18:44:51.000+0000"
} ]
}
}
Resources
Parameters