Skip to main content

Vendor Credit API

Record credits received from vendors for returns or billing adjustments.


Endpoints

MethodEndpointDescription
GET/record/v1/vendorCreditList vendor credits
GET/record/v1/vendorCredit/{id}Get specific credit
POST/record/v1/vendorCreditCreate credit
PATCH/record/v1/vendorCredit/{id}Update credit
DELETE/record/v1/vendorCredit/{id}Delete credit

Key Fields

FieldTypeDescriptionRequired
idstringInternal ID-
tranIdstringCredit numberAuto-generated
entityobjectVendorYes
tranDatestringCredit dateYes
subsidiaryobjectSubsidiaryYes (OneWorld)
currencyobjectCurrencyYes
exchangeRatenumberExchange rateAuto-calculated
totalnumberCredit amount (read-only)-
amountRemainingnumberUnapplied credit (read-only)-
memostringCredit memoNo
locationobjectLocationNo
departmentobjectDepartmentNo
classobjectClassNo
createdFromobjectSource transaction (VRA)No
itemcollectionItem line itemsConditional
expensecollectionExpense linesConditional

Example: Create Vendor Credit (Item-Based)

POST /record/v1/vendorCredit
Content-Type: application/json

Request Body

{
"entity": {
"id": "789"
},
"tranDate": "2025-12-25",
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"location": {
"id": "1"
},
"department": {
"id": "10"
},
"memo": "Credit for defective items - RMA #12345",
"item": {
"items": [
{
"item": { "id": "789" },
"quantity": 10,
"rate": 25.00,
"amount": 250.00,
"description": "Defective units returned"
},
{
"item": { "id": "790" },
"quantity": 5,
"rate": 50.00,
"amount": 250.00,
"description": "Damaged in shipping"
}
]
}
}

Response

{
"id": "6001",
"tranId": "VC-2025-001",
"entity": {
"id": "789",
"refName": "Acme Suppliers Inc"
},
"tranDate": "2025-12-25",
"subsidiary": {
"id": "1",
"refName": "Parent Company"
},
"currency": {
"id": "1",
"refName": "USD"
},
"exchangeRate": 1.0,
"location": {
"id": "1",
"refName": "Main Warehouse"
},
"department": {
"id": "10",
"refName": "Operations"
},
"memo": "Credit for defective items - RMA #12345",
"total": 500.00,
"amountRemaining": 500.00,
"item": {
"items": [
{
"item": { "id": "789", "refName": "Widget A - Standard" },
"quantity": 10,
"rate": 25.00,
"amount": 250.00,
"description": "Defective units returned"
},
{
"item": { "id": "790", "refName": "Widget B - Premium" },
"quantity": 5,
"rate": 50.00,
"amount": 250.00,
"description": "Damaged in shipping"
}
]
},
"links": [
{
"rel": "self",
"href": "https://account.suitetalk.api.netsuite.com/services/rest/record/v1/vendorCredit/6001"
}
]
}

Example: Create Vendor Credit (Expense-Based)

POST /record/v1/vendorCredit
Content-Type: application/json

Request Body

{
"entity": {
"id": "789"
},
"tranDate": "2025-12-25",
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"memo": "Billing adjustment - overcharged on invoice INV-5678",
"expense": {
"items": [
{
"account": { "id": "200" },
"amount": 150.00,
"memo": "Freight charge adjustment",
"department": { "id": "10" }
},
{
"account": { "id": "150" },
"amount": 50.00,
"memo": "Price adjustment"
}
]
}
}

Example: Update Vendor Credit

PATCH /record/v1/vendorCredit/6001
Content-Type: application/json

Request Body

{
"memo": "Credit for defective items - RMA #12345 - Approved by vendor",
"item": {
"items": [
{
"item": { "id": "789" },
"quantity": 15,
"rate": 25.00,
"amount": 375.00,
"description": "Defective units returned - additional units found"
},
{
"item": { "id": "790" },
"quantity": 5,
"rate": 50.00,
"amount": 250.00,
"description": "Damaged in shipping"
}
]
}
}

Line Items

Item Sublist Fields

FieldTypeDescriptionRequired
itemobjectItem being creditedYes
quantitynumberCredit quantityYes
ratenumberUnit priceYes
amountnumberLine total (calculated)-
descriptionstringLine descriptionNo
locationobjectLocationNo
departmentobjectDepartmentNo
classobjectClassNo
customerobjectCustomer (for job costing)No
inventoryDetailobjectSerial/lot numbersNo

Expense Sublist Fields

FieldTypeDescriptionRequired
accountobjectExpense accountYes
amountnumberExpense amountYes
memostringLine memoNo
departmentobjectDepartmentNo
classobjectClassNo
locationobjectLocationNo
customerobjectCustomer (for job costing)No

Query Filters

Find Unapplied Credits

GET /record/v1/vendorCredit?q=amountRemaining > 0

Find by Vendor

GET /record/v1/vendorCredit?q=entity='789'

Find by Date Range

GET /record/v1/vendorCredit?q=tranDate BETWEEN '2025-01-01' AND '2025-12-31'

Find Credits Over Amount

GET /record/v1/vendorCredit?q=total > 1000

Find by Department

GET /record/v1/vendorCredit?q=department='10'

Apply to Vendor Bill

Credits are applied via Vendor Payment:

POST /record/v1/vendorPayment
Content-Type: application/json
{
"entity": {
"id": "789"
},
"tranDate": "2025-12-26",
"account": {
"id": "10"
},
"subsidiary": {
"id": "1"
},
"currency": {
"id": "1"
},
"credit": {
"items": [
{
"doc": { "id": "6001" },
"apply": true,
"amount": 500.00
}
]
},
"apply": {
"items": [
{
"doc": { "id": "4001" },
"apply": true,
"amount": 2500.00
}
]
}
}

Important Notes

  • Vendor credits reduce accounts payable and can be applied to open bills
  • Item-based credits affect inventory quantities (returned items)
  • Expense-based credits are for billing adjustments or service credits
  • The amountRemaining tracks unapplied credit balance
  • Credits can be created from Vendor Return Authorizations using createdFrom
  • Multi-currency credits use the exchange rate from the credit date
  • Credits cannot be applied to bills in different currencies
  • Item credits require valid item IDs and affect inventory on hand
  • The total field is calculated automatically from line items
  • Credits can be partially applied to multiple bills
  • Once fully applied, amountRemaining becomes zero
  • Credits older than the accounting period may require period reopening
  • Serial/lot tracked items require inventory detail on line items
  • Department, class, and location can be set at header or line level

See Also