Vendor Credit API
Record credits received from vendors for returns or billing adjustments.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /record/v1/vendorCredit | List vendor credits |
GET | /record/v1/vendorCredit/{id} | Get specific credit |
POST | /record/v1/vendorCredit | Create credit |
PATCH | /record/v1/vendorCredit/{id} | Update credit |
DELETE | /record/v1/vendorCredit/{id} | Delete credit |
Key Fields
| Field | Type | Description | Required |
|---|---|---|---|
id | string | Internal ID | - |
tranId | string | Credit number | Auto-generated |
entity | object | Vendor | Yes |
tranDate | string | Credit date | Yes |
subsidiary | object | Subsidiary | Yes (OneWorld) |
currency | object | Currency | Yes |
exchangeRate | number | Exchange rate | Auto-calculated |
total | number | Credit amount (read-only) | - |
amountRemaining | number | Unapplied credit (read-only) | - |
memo | string | Credit memo | No |
location | object | Location | No |
department | object | Department | No |
class | object | Class | No |
createdFrom | object | Source transaction (VRA) | No |
item | collection | Item line items | Conditional |
expense | collection | Expense lines | Conditional |
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
| Field | Type | Description | Required |
|---|---|---|---|
item | object | Item being credited | Yes |
quantity | number | Credit quantity | Yes |
rate | number | Unit price | Yes |
amount | number | Line total (calculated) | - |
description | string | Line description | No |
location | object | Location | No |
department | object | Department | No |
class | object | Class | No |
customer | object | Customer (for job costing) | No |
inventoryDetail | object | Serial/lot numbers | No |
Expense Sublist Fields
| Field | Type | Description | Required |
|---|---|---|---|
account | object | Expense account | Yes |
amount | number | Expense amount | Yes |
memo | string | Line memo | No |
department | object | Department | No |
class | object | Class | No |
location | object | Location | No |
customer | object | Customer (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
amountRemainingtracks 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
totalfield is calculated automatically from line items - Credits can be partially applied to multiple bills
- Once fully applied,
amountRemainingbecomes 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
- Vendor Bill - Apply credits to bills
- Vendor Payment - Apply credits
- Vendor Return Authorization - Return items
- Vendor - Vendor records