Issue Summary
I'm encountering a persistent HTTP 400 error when attempting to create an Assembly Build via REST API v1 for a lotnumberedassemblyitem. The error message is:
"Invalid value for the resource or sub-resource field 'item'. Provide a valid value."
However, manual creation of the same Assembly Build through the NetSuite UI succeeds without any issues.
Environment
- NetSuite Account: Sandbox (XXXXXX_SB1)
- API: REST API v1
- Authentication: OAuth 1.0 (HMAC-SHA256)
- Item Type: lotnumberedassemblyitem
- Item ID: 1234 (masked for security)
- Component Item ID: 5678 (masked for security)
Request Details
Endpoint: POST /services/rest/record/v1/assemblybuild
Request Body (with all required fields based on documentation):
{ "customForm": {"id": "100"}, "subsidiary": {"id": "1"}, "location": {"id": "10"}, "item": {"id": "1234"}, "quantity": 10, "tranDate": "2024-01-15", "department": {"id": "5"}, "class": {"id": "3"}, "inventoryDetail": { "inventoryAssignment": { "items": [ { "receiptInventoryNumber": "LOT-2024-001", "quantity": 10 } ] } }, "component": { "items": [ { "item": {"id": "5678"}, "quantity": 10 } ] }}
Error Response:
{ "type": "https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.1", "title": "Bad Request", "status": 400, "o:errorDetails": [ { "detail": "Invalid value for the resource or sub-resource field 'item'. Provide a valid value.", "o:errorPath": "item", "o:errorCode": "INVALID_VALUE" } ]}
What Works
✅ Manual UI Creation: Successfully created Assembly Build (ID: XXXXXXXX, Tran ID: BDXXXXXXXX) using the same item through NetSuite UI
✅ REST API GET: Can successfully retrieve:
- Item 1234:
GET /record/v1/assemblyItem/1234 → 200 OK - BOM components:
GET /record/v1/assemblyItem/1234/member → 200 OK - Manually created Assembly Build:
GET /record/v1/assemblybuild/XXXXXXXX → 200 OK
Item Verification
I've verified the following about the assembly item:
- ✅ Status: Active (not inactive)
- ✅ Type: lotnumberedassemblyitem
- ✅ Subsidiary: Includes required subsidiary
- ✅ BOM Components: 1 component exists (Item 5678)
- ✅ Location: Available at specified location
- ✅ REST API Access: Item is accessible via REST API GET requests
Attempted Solutions (All Failed)
Attempt | Fields Included | Result |
|---|
1 | Minimal fields only (subsidiary, location, item, quantity) | Error: "department/class/component required" |
2 | Added department, class | Error: "component required" |
3 | Added component (no inventoryDetail) | Error: "Invalid value for 'item'" |
4 | Added inventoryDetail (no component) | Error: "component required" |
5 | inventoryDetail + component | Error: "Invalid value for 'item'" |
6 | Added customForm | Error: "Invalid value for 'item'" |
7 | All fields (complete request above) | Error: "Invalid value for 'item'" |
Documentation References
According to Oracle documentation:
lotnumberedassemblyitem is supported in REST API v1inventoryDetail with receiptInventoryNumber is required for lot-numbered itemscomponent subrecord is required for Assembly Buildssubsidiary, location, item, quantity are mandatory fields
I've included all these fields, yet the error persists.
Questions
- Is creating Assembly Builds with
lotnumberedassemblyitem fully supported in REST API v1? - Are there additional fields or settings required for
lotnumberedassemblyitem that aren't documented? - Could this be an item-specific configuration issue? (Despite manual creation working fine)
- Is there a known limitation or bug with REST API v1 and lot-numbered assembly items?
Comparison: UI vs REST API
Via NetSuite UI:
- ✅ Assembly Build created successfully
- Using lotnumberedassemblyitem with specific subsidiary and location
- Works without any errors
Via REST API:
- ❌ "Invalid value for field 'item'" error
- Exact same item, subsidiary, location
- Includes all required fields per documentation
This inconsistency suggests either:
- A REST API limitation with
lotnumberedassemblyitem - Missing undocumented configuration requirements
- A potential bug in REST API v1
What I Need
Primary Goal: Successfully create Assembly Builds for lotnumberedassemblyitem via REST API v1
Alternative Solutions (if REST API v1 doesn't support this):
- Guidance on using SOAP API (SuiteTalk) instead
- Recommendations for implementing a SuiteScript Restlet
- Information about REST API v2 (Beta) support
Additional Context
- This is blocking our production release for an automated assembly build system
- Manual workaround is not feasible due to high volume (hundreds of builds per day)
- SOAP API migration is possible but would require significant rework
Has anyone successfully created Assembly Builds via REST API v1 with lot-numbered assembly items? Any insights or workarounds would be greatly appreciated!