About VendorCredit
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"
} ]
}
}
Vendor credits for international vendors
Since the Bill.com foreign exchange rate changes periodically, a current exchangeRate
is an additional required parameter while creating vendor credits for international vendors.
See GetDynamicExchangeRateQuote for information about retrieving exchangeRate
.
In your vendor credit creation request with <API_URL_EndPoint>/Crud/Create/VendorCredit.json
, set exchangeRate
as the retrieved value and amount
as the vendor credit amount to be applied in the foreign currency.
In this example, since the retrieved exchangeRate
is for Canadian Dollar, the bill amount
in <API_URL_EndPoint>/Crud/Create/Bill.json
is also in Canadian Dollar.
Note: You must set exchangeRate
while creating a bill for an international vendor even if the Bill.com foreign exchange rate changes at the time of bill payment with PayBills.
Request
<API_URL_EndPoint>/Crud/Create/VendorCredit.json
data={
"obj" : {
"entity" : "VendorCredit",
"vendorId" : "00901FABIIZFVKV2pzsy",
"refNumber" : "1234",
"creditDate" : "2021-12-05",
"exchangeRate" : 1.23943521
"vendorCreditLineItems" : [ {
"entity" : "VendorCreditLineItem",
"amount" : 15.00
} ]
}
}