why when i send a request to posting a new invento...
# ask-stanley-ai
n
why when i send a request to posting a new inventory item this error is coming : { "type": "https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.1", "title": "Bad Request", "status": 400, "o:errorDetails": [ { "detail": "Error while accessing a resource. Please enter value(s) for: Tax Schedule.", "o:errorCode": "USER_ERROR" } ] }
c
AI generated answer (using internal Slack threads):
The error message you're receiving indicates that the Tax Schedule value is missing in your request. When creating an inventory item using the REST API, you need to include the Tax Schedule value. This is a reference to another record in NetSuite, so it just needs an internal id to reference the appropriate tax schedule. Here is an example of how you might include it in your payload:
Copy code
json
{
    "itemid": "Test 1",
    "displayName": "Test 1 Displayname",
    "department": {
        "id": "462"
    },
    "class": {
        "id": "4"
    },
    "cseg_acquisition": {
        "id": "25"
    },
    "cseg_platform": {
        "id": "40"
    },
    "incomeAccount": {
        "id": "1741"
    },
    "taxSchedule": {
        "id": "1"
    }
}
In this example, the "taxSchedule" field is included with an id of "1". You would replace "1" with the internal id of the tax schedule you want to use. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.895335913
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.87814045
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.874699831
Please provide your feedback on this answer.
n
i'm already add the tax schedule and the error is still coming?
this is my request payload check please what is the missing data { "itemId": "NEW-ITEM-001", "displayName": "06062025", "description": "API-created Tyre", "itemType": { "id": "InvtPart", "refName": "InvtPart" }, "subsidiary": { "items": [ { "id": "1", "refName": "Al-Jomaih Holding" } ] }, "assetAccount": { "id": "1323", "refName": "1050101000 Inventory & Inventory In Transit : Inventory : Tires Inventory" }, "cogsAccount": { "id": "822", "refName": "5010001000 Cost Of Revenue And Sales : Cost of Goods Sold : Tyres" }, "incomeAccount": { "id": "1825", "refName": "4010100000 Sales : Tyers Sales" }, "taxSchedule": { "id": "2" }, "currency": { "id": "1", "refName": "SAR" }, "costingMethod": { "id": "AVG", "refName": "AVG" }, "costEstimateType": { "id": "AVGCOST", "refName": "Average Cost" }, "autoLeadTime": true, "autoPreferredStockLevel": true, "autoReorderPoint": true, "atpMethod": { "id": "CUMULATIVE_ATP_WITH_LOOK_AHEAD", "refName": "CUMULATIVE_ATP_WITH_LOOK_AHEAD" }, "enforceminqtyinternally": true, "excludeFromSiteMap": false, "froogleProductFeed": false, "includeChildren": false, "isDropShipItem": false, "isGCoCompliant": false, "isInactive": false, "isLotItem": false, "isOnline": false, "isSerialItem": false, "isSpecialOrderItem": false, "matchBillToReceipt": false, "nexTagProductFeed": false, "seasonalDemand": false, "shipIndividually": false, "shoppingProductFeed": false, "shopzillaProductFeed": false, "supplyReplenishmentMethod": { "id": "REORDER_POINT", "refName": "REORDER_POINT" }, "trackLandedCost": false, "updateExistingTranAccounts": false, "useBins": false, "useMarginalRates": false, "yahooProductFeed": false, // Required custom fields: "custitem_aljomaih_item_description": "1", "custitem_aljomaih_item_group": "Tyres", "custitem_aljomaih_item_lifetime": 60, "custitem_aljomaih_item_origin": { "id": "114", "refName": "Japan" }, "custitem_aljomaih_subcategory": "1", "custitem_aln_1_auto_numbered": false, "custitem_atc_item_brand": { "id": "1", "refName": "Yokohama" }, "custitem_atc_item_category": { "id": "137", "refName": "YOK - OTR" }, "custitem_atc_item_pattern": "Y103", "custitem_atc_item_type": { "id": "1", "refName": "Tyre" }, "custitem_atc_load_index": "4", "custitem_atc_speed_index": "Not Available", "custitem_atc_tyre_type": { "id": "1", "refName": "TT" }, "custitem_ksa_arabic_item_name": "إطار يوكوهاما مقاس", "custitematc_item_size": "10-16.5 4 Y103N TT TWN" }