Skip to main content

Inventory Number API

Manage lot numbers and serial numbers for inventory tracking and traceability.

Endpoints

MethodEndpointDescription
GET/record/v1/inventoryNumberRetrieve list of inventory numbers
GET/record/v1/inventoryNumber/{id}Retrieve a specific inventory number
POST/record/v1/inventoryNumberCreate a new inventory number
PATCH/record/v1/inventoryNumber/{id}Update an existing inventory number
DELETE/record/v1/inventoryNumber/{id}Delete an inventory number

Key Fields

FieldTypeDescriptionRequired
inventoryNumberStringLot or serial number identifierYes
itemObjectItem reference {"id": "789"}Yes
expirationDateDateExpiration date for lot-tracked itemsNo
memoStringNotes about this lot/serial numberNo
statusStringStatus reference (custom status values)No
locationObjectLocation referenceNo
unitsObjectUnit of measure referenceNo
costNumberCost associated with this lot/serialNo

Example: Create Inventory Number

Request

POST /record/v1/inventoryNumber
Content-Type: application/json
{
"inventoryNumber": "LOT-20251225-001",
"item": {"id": "789"},
"expirationDate": "2026-12-25",
"memo": "Production batch from December 2025",
"location": {"id": "1"}
}

Response

{
"id": "45678",
"inventoryNumber": "LOT-20251225-001",
"item": {
"id": "789",
"refName": "Widget A - Lot Tracked"
},
"expirationDate": "2026-12-25",
"memo": "Production batch from December 2025",
"location": {
"id": "1",
"refName": "Main Warehouse"
},
"quantityOnHand": 0,
"quantityAvailable": 0,
"links": [
{
"rel": "self",
"href": "https://{{account}}.suitetalk.api.netsuite.com/services/rest/record/v1/inventoryNumber/45678"
}
]
}

Example: Create Serial Number

Request

POST /record/v1/inventoryNumber
Content-Type: application/json
{
"inventoryNumber": "SN-2025-12345",
"item": {"id": "790"},
"memo": "Serial number for laptop computer",
"location": {"id": "1"}
}

Response

{
"id": "45679",
"inventoryNumber": "SN-2025-12345",
"item": {
"id": "790",
"refName": "Laptop Computer - Serialized"
},
"memo": "Serial number for laptop computer",
"location": {
"id": "1",
"refName": "Main Warehouse"
},
"quantityOnHand": 0,
"quantityAvailable": 0,
"links": [
{
"rel": "self",
"href": "https://{{account}}.suitetalk.api.netsuite.com/services/rest/record/v1/inventoryNumber/45679"
}
]
}

Example: Update Inventory Number

Request

PATCH /record/v1/inventoryNumber/45678
Content-Type: application/json
{
"memo": "Production batch from December 2025 - Quality checked",
"expirationDate": "2026-11-25"
}

Response

{
"id": "45678",
"inventoryNumber": "LOT-20251225-001",
"memo": "Production batch from December 2025 - Quality checked",
"expirationDate": "2026-11-25",
"links": [
{
"rel": "self",
"href": "https://{{account}}.suitetalk.api.netsuite.com/services/rest/record/v1/inventoryNumber/45678"
}
]
}

Sublists/Line Items

Inventory numbers themselves don't have sublists, but they are referenced in sublists of other transactions:

Referenced in Inventory Adjustment

{
"item": {
"items": [
{
"item": {"id": "789"},
"adjustQtyBy": 100,
"location": {"id": "1"},
"inventoryDetail": {
"items": [
{
"inventoryNumber": {"id": "45678"},
"quantity": 100
}
]
}
}
]
}
}

Referenced in Item Fulfillment

{
"item": {
"items": [
{
"item": {"id": "790"},
"quantity": 1,
"inventoryDetail": {
"items": [
{
"inventoryNumber": {"id": "45679"},
"quantity": 1
}
]
}
}
]
}
}

Query Filters

Filter by Inventory Number

GET /record/v1/inventoryNumber?q=inventoryNumber = 'LOT-20251225-001'

Filter by Item

GET /record/v1/inventoryNumber?q=item.id = 789

Filter by Expiration Date Range

GET /record/v1/inventoryNumber?q=expirationDate BETWEEN '2025-01-01' AND '2025-12-31'

Filter by Location

GET /record/v1/inventoryNumber?q=location.id = 1

Find Expiring Soon

GET /record/v1/inventoryNumber?q=expirationDate <= '2025-12-31' AND expirationDate >= '2025-12-01'&orderby=expirationDate ASC

Filter by Item and Location

GET /record/v1/inventoryNumber?q=item.id = 789 AND location.id = 1

Search by Partial Number

GET /record/v1/inventoryNumber?q=inventoryNumber LIKE '%LOT-2025%'

Important Notes

Lot vs Serial Numbers

Lot Numbers:

  • Track groups/batches of items
  • Multiple units share the same lot number
  • Common for manufacturing, food, pharmaceuticals
  • May have expiration dates
  • Example: LOT-20251225-001 for 100 units

Serial Numbers:

  • Track individual items uniquely
  • Each unit has a unique serial number
  • Common for electronics, equipment, high-value items
  • Typically no expiration dates
  • Example: SN-2025-12345 for 1 unit

Item Configuration Required

Before creating inventory numbers, ensure:

  • Item has lot/serial tracking enabled
  • Item type supports lot/serial tracking (inventory items, assembly items)
  • Item is properly configured in NetSuite

Inventory Number Creation

  • Inventory numbers can be created manually via API
  • They are also auto-created during transactions if the number doesn't exist
  • Pre-creating numbers allows adding expiration dates and memos
  • Once created, the number is available for use in transactions

Quantity Tracking

  • quantityOnHand: Total quantity across all locations
  • quantityAvailable: Available for transactions (on hand - committed)
  • Quantities are read-only in the inventory number record
  • Quantities change via inventory transactions (adjustments, receipts, fulfillments)

Permissions Required

  • Create: Lists > Inventory Numbers > Create
  • Edit: Lists > Inventory Numbers > Edit
  • Delete: Lists > Inventory Numbers > Delete
  • View: Lists > Inventory Numbers > View

Best Practices

  1. Establish naming conventions for lot/serial numbers (e.g., prefix, date, sequence)
  2. Include expiration dates for perishable or time-sensitive items
  3. Add descriptive memos for important batch information
  4. Pre-create lot numbers for manufacturing runs with known batch details
  5. Track serial numbers for warranty and support purposes
  6. Regular audits to identify expired or low-stock lot numbers

Limitations

  • Cannot delete inventory numbers with transaction history
  • Cannot change the inventoryNumber value once created
  • Cannot change the associated item once created
  • Some fields may be read-only depending on configuration
  • Serial numbers must be unique across all items in some configurations

Expiration Date Management

For lot-tracked items with expiration dates:

  • NetSuite can enforce FEFO (First Expired, First Out) logic
  • Expired lots may be blocked from fulfillment
  • Set up alerts for lots nearing expiration
  • Run reports to identify expiring inventory

Data Validation

  • inventoryNumber must be unique for the item (or globally, depending on settings)
  • Expiration date should be in the future for new lots
  • Item must support lot/serial tracking
  • Status values (if used) must be valid status references

Common Use Cases

  1. Manufacturing: Create lot numbers for production batches
  2. Receiving: Create serial numbers when receiving serialized items
  3. Recalls: Track affected lot numbers for product recalls
  4. Warranty: Track serial numbers for warranty claims
  5. Compliance: Maintain traceability for regulated industries
  6. Inventory Planning: Monitor lot expiration dates for rotation

Integration Tips

  • Validate item supports lot/serial before creating numbers
  • Check for existing numbers before creating duplicates
  • Use batch processing for creating multiple numbers
  • Implement error handling for duplicate number scenarios
  • Store external system IDs in the memo field for reference

Reporting and Analytics

Query inventory numbers for:

  • Expiring lots report
  • Lot/serial number availability
  • Transaction history by lot/serial
  • Quality holds or quarantine status
  • Cost tracking by lot number