About VendCredit
Vendor Credits are reduced adjustments of the amount owed to a Vendor. The nested VendorCreditLineItems
record the additional credit details and are assigned against accounting objects to ensure granular tracking.
Note: Vendor Credits do not have due dates.
To apply a Vendor Credit, use PayBills or RecordAPPayments. These create a SentPay entity.
Create
Request
<API_URL_EndPoint>/Crud/Create/VendorCredit.json
data={
"obj" : {
"entity" : "VendorCredit",
"vendorId" : "00901FABIIZFVKV2pzsy",
"refNumber" : "1234",
"creditDate" : "2016-12-05",
"glPostingDate" : "2016-12-05",
"description" : "Returned musical Toys",
"poNumber" : "1234",
"applyToBankAccountId" : "bac01OOZNCHMLQNK8naj",
"applyToChartOfAccountId" : "",
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"amount" : 100.00,
"chartOfAccountId" : "0ca01AJKBYXPHRFFdgng",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"jobId" : "job01HCOSIFZPZBFczyc",
"customerId" : "job01HCOSIFZPZBFczyc",
"jobBillable" : true,
"description" : "Vocal machine",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"unitPrice" : 200.00,
"employeeId" : "emp01OVBLNBWSHBP89kw",
"actgClassId" : "cls01MBCYMNEBCGO8qb2"
} ]
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "VendorCredit",
"id" : "vcr01TJFJINXMSBGP9vn",
"isActive" : "1",
"vendorId" : "00901KLKJXRXYFFS1pn2",
"refNumber" : "2342d",
"approvalStatus" : "0",
"creditDate" : "2016-12-10",
"glPostingDate" : "2016-12-10",
"amount" : 200.00,
"appliedAmount " : 00.00,
"creditStatus" : "2",
"description" : "Returned musical toys",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2012-12-09T22:39:14.000+0000",
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"id" : "vci01JRYXAQKPRJCM9yf",
"vendorCreditId" : "vcr01TJFJINXMSBGP9vn",
"amount" : 100.00,
"chartOfAccountId" : "0ca01YIZLDUBNRQIRrkh",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"jobId" : "job01HCOSIFZPZBFczyc",
"customerId" : "job01HCOSIFZPZBFczyc",
"jobBillable" : true,
"description" : "Vocal machine",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2010-09-05T22:57:19.000+0000",
"lineType" : "1",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"unitPrice" : 200.00,
"employeeId" : "emp01OVBLNBWSHBP89kw",
"actgClassId" : "cls01MBCYMNEBCGO8qb2"
} ]
}
}
Read
Request
<API_URL_EndPoint>/Crud/Read/VendorCredit.json
data={
"id" : "vcr01TJFJINXMSBGP9vn"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "VendorCredit",
"id" : "vcr01TJFJINXMSBGP9vn",
"isActive" : "1",
"vendorId" : "00901KLKJXRXYFFS1pn2",
"refNumber" : "2342d",
"approvalStatus" : "0",
"creditDate" : "2016-12-10",
"glPostingDate" : "2016-12-10",
"amount" : 200.00,
"appliedAmount " : 00.00,
"creditStatus" : "2",
"description" : "Returned musical toys",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2012-12-09T22:39:14.000+0000",
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"id" : "vci01JRYXAQKPRJCM9yf",
"vendorCreditId" : "vcr01TJFJINXMSBGP9vn",
"amount" : 100.00,
"chartOfAccountId" : "0ca01YIZLDUBNRQIRrkh",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"jobId" : "job01HCOSIFZPZBFczyc",
"customerId" : "job01HCOSIFZPZBFczyc",
"jobBillable" : true,
"description" : "Vocal machine",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2010-09-05T22:57:19.000+0000",
"lineType" : "1",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"unitPrice" : 200.00,
"employeeId" : "emp01OVBLNBWSHBP89kw",
"actgClassId" : "cls01MBCYMNEBCGO8qb2"
} ]
}
}
Update
The details of the specified Vendor Credit are overwritten with the details you pass at the time of updating it. For example, if you want to update the details of a specific Vendor Credit line item, you need to enter all the details of the Vendor Credit and the other vendorCreditLineItems
.
Request
<API_URL_EndPoint>/Crud/Update/VendorCredit.json
data={
"obj" : {
"entity" : "VendorCredit",
"id" : "vcr01TJFJINXMSBGP9vn",
"isActive" : "1",
"vendorId" : "00901KLKJXRXYFFS1pn2",
"refNumber" : "99999xxx",
"approvalStatus" : "0",
"creditDate" : "2016-12-10",
"glPostingDate" : "2016-12-10",
"amount" : 200.00,
"appliedAmount " : 00.00,
"creditStatus" : "2",
"description" : "Returned musical toys",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2012-12-09T22:39:14.000+0000",
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"id" : "vci01JRYXAQKPRJCM9yf",
"vendorCreditId" : "vcr01TJFJINXMSBGP9vn",
"amount" : 100.00,
"chartOfAccountId" : "0ca01YIZLDUBNRQIRrkh",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"jobId" : "job01HCOSIFZPZBFczyc",
"customerId" : "job01HCOSIFZPZBFczyc",
"jobBillable" : true,
"description" : "Vocal machine",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2010-09-05T22:57:19.000+0000",
"lineType" : "1",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"unitPrice" : 200.00,
"employeeId" : "emp01OVBLNBWSHBP89kw",
"actgClassId" : "cls01MBCYMNEBCGO8qb2"
} ]
}
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "VendorCredit",
"id" : "vcr01TJFJINXMSBGP9vn",
"isActive" : "1",
"vendorId" : "00901KLKJXRXYFFS1pn2",
"refNumber" : "99999xxx",
"approvalStatus" : "0",
"creditDate" : "2016-12-10",
"glPostingDate" : "2016-12-10",
"amount" : 200.00,
"appliedAmount " : 00.00,
"creditStatus" : "2",
"description" : "Returned musical toys",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2012-12-09T22:39:14.000+0000",
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"id" : "vci01JRYXAQKPRJCM9yf",
"vendorCreditId" : "vcr01TJFJINXMSBGP9vn",
"amount" : 100.00,
"chartOfAccountId" : "0ca01YIZLDUBNRQIRrkh",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"jobId" : "job01HCOSIFZPZBFczyc",
"customerId" : "job01HCOSIFZPZBFczyc",
"jobBillable" : true,
"description" : "Vocal machine",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2010-09-05T22:57:19.000+0000",
"lineType" : "1",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"unitPrice" : 200.00,
"employeeId" : "emp01OVBLNBWSHBP89kw",
"actgClassId" : "cls01MBCYMNEBCGO8qb2"
} ]
}
}
Delete
Once the Vendor Credit is deleted, it is marked as inactive ["isActive" : "2"
].
Request
<API_URL_EndPoint>/Crud/Delete/VendorCredit.json
data={
"id" : "vcr01TJFJINXMSBGP9vn"
}
Response
{
"response_status" : 0,
"response_message" : "Success",
"response_data" : {
"entity" : "VendorCredit",
"id" : "vcr01TJFJINXMSBGP9vn",
"isActive" : "2",
"vendorId" : "00901KLKJXRXYFFS1pn2",
"refNumber" : "2342d",
"approvalStatus" : "0",
"creditDate" : "2016-12-10",
"glPostingDate" : "2016-12-10",
"amount" : 200.00,
"appliedAmount " : 00.00,
"creditStatus" : "2",
"description" : "Returned musical toys",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2012-12-09T22:39:14.000+0000",
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"id" : "vci01JRYXAQKPRJCM9yf",
"vendorCreditId" : "vcr01TJFJINXMSBGP9vn",
"amount" : 100.00,
"chartOfAccountId" : "0ca01YIZLDUBNRQIRrkh",
"departmentId" : "0de01ORPHXZXIHFPazci",
"locationId" : "loc01ZCLEVLXDQRB9z1o",
"jobId" : "job01HCOSIFZPZBFczyc",
"customerId" : "job01HCOSIFZPZBFczyc",
"jobBillable" : true,
"description" : "Vocal machine",
"createdTime" : "2016-12-05T22:57:19.000+0000",
"updatedTime" : "2010-09-05T22:57:19.000+0000",
"lineType" : "1",
"itemId" : "0ii01YCDSBIDTPTJbhcb",
"quantity" : 1,
"unitPrice" : 200.00,
"employeeId" : "emp01OVBLNBWSHBP89kw",
"actgClassId" : "cls01MBCYMNEBCGO8qb2"
} ]
}
}