Я использую Почтальон для тестирования NETSUITE API. Я дал
- Ключ потребителя
- Секрет потребителя
- Токен доступа
- Секрет токена в типе авторизации OAuth1.0.
Я вызвал API "инвентарный элемент" с идентификатором элемента
**https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155**
и получил в ответ подробности об элементе инвентаря.
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155"
}
],
"assetAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/216"
}
],
"id": "216",
"refName": "1420 Inventory Asset"
},
"atpmethod": "CUMULATIVE_ATP_WITH_LOOK_AHEAD",
"autoLeadTime": false,
"autoPreferredStockLevel": false,
"autoReorderPoint": false,
"averageCost": 25.5,
"billExchRateVarianceAcct": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/324"
}
],
"id": "324",
"refName": "5017 Bill exchange variance"
},
"billPriceVarianceAcct": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/323"
}
],
"id": "323",
"refName": "5016 Bill Price Variance"
},
"billQtyVarianceAcct": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/322"
}
],
"id": "322",
"refName": "5015 Bill Quantity Variance"
},
"binNumber": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/binNumber"
}
]
},
"class": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/classification/22"
}
],
"id": "22",
"refName": "Healthcare & Nutrition"
},
"cogsAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/217"
}
],
"id": "217",
"refName": "5005 COGS : Cost of Goods Sold"
},
"copyDescription": false,
"cost": 13.4,
"costEstimateType": "AVGCOST",
"costingMethod": "FIFO",
"costingMethodDisplay": "Lot Numbered",
"costUnits": "per Box 12",
"createdDate": "2018-11-20T13:48:00Z",
"currency": {
"links": [],
"id": "British pound",
"refName": "British pound"
},
"custitem1": "511265",
"custitem3": 12,
"custitem_atlas_approved": false,
"custitem_nsts_ep_item_category": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/custitem_nsts_ep_item_category"
}
]
},
"custitem_wmsse_itemfamily": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/customrecord_wmsse_item_family/4"
}
],
"id": "4",
"refName": "Non-Refrigerated Item Family"
},
"custitem_wmsse_itemgroup": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/customrecord_wmsse_itemgroup/2"
}
],
"id": "2",
"refName": "Non-Refrigerated Item Group"
},
"custitem_wmsse_mix_item": true,
"custitem_wmsse_mix_lot": true,
"custitemcustcol4": "250ML",
"customForm": "139",
"custReturnVarianceAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/326"
}
],
"id": "326",
"refName": "4045 CUSTOMER RETURN VARIANCE"
},
"displayName": "DETTOL 12X250ML",
"dontshowprice": false,
"enforceminqtyinternally": true,
"excludefromsitemap": false,
"froogleproductfeed": false,
"handlingCostUnits": "per Box 12",
"id": "155",
"includeChildren": true,
"incomeAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/251"
}
],
"id": "251",
"refName": "4040 Sales : Income"
},
"internalid": 155,
"isdonationitem": false,
"isDropShipItem": false,
"isgcocompliant": false,
"isInactive": false,
"isonline": false,
"isSpecialOrderItem": false,
"itemId": "DETTOL 250ML",
"itemType": "InvtPart",
"itemVendor": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/itemVendor"
}
]
},
"lastModifiedDate": "2020-01-21T18:07:00Z",
"lastPurchasePrice": 24.53,
"locations": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/locations"
}
]
},
"matchBillToReceipt": true,
"minimumquantityUnits": "Box 12",
"nextagproductfeed": false,
"offerSupport": true,
"preferredLocation": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/location/20"
}
],
"id": "20",
"refName": "8905 Highway 50"
},
"productfeed": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/productfeed"
}
]
},
"purchaseDescription": "DETTOL 12X250ML",
"purchaseOrderAmount": 0.1,
"purchaseOrderQuantity": 0.1,
"purchaseUnit": "9",
"quantityReorderUnits": "Quantity On Hand, Reorder Point, Quantity On Order, and Quantity Committed are in Box 12",
"receiptAmount": 0.1,
"receiptQuantity": 0.1,
"salesDescription": "DETTOL 250ML",
"saleUnit": "9",
"seasonalDemand": false,
"shipIndividually": false,
"shippingCostUnits": "per Box 12",
"shoppingproductfeed": false,
"shopzillaproductfeed": false,
"showdefaultdonationamount": false,
"sitecategory": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/sitecategory"
}
]
},
"stockUnit": "9",
"Subsidiary": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/Subsidiary"
}
]
},
"supplyReplenishmentMethod": "TIME_PHASED",
"taxSchedule": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/"
}
],
"id": "2",
"refName": "Taxable"
},
"totalValue": 3522.66,
"trackLandedCost": true,
"transferPriceUnits": "per Box 12",
"unitsType": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/unitstype/1"
}
],
"id": "1",
"refName": "Each"
},
"upcCode": "50158072",
"useBins": true,
"useMarginalRates": false,
"vendReturnVarianceAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/325"
}
],
"id": "325",
"refName": "5020 VENDOR RETURN VARIANCE"
},
"weight": 3.0,
"weightUnit": "3",
"weightUnits": "per Box 12",
"yahooproductfeed": false
}
, но количество деталей отсутствует в этой детали. Я просто хочу получить количество товара и статус его доступности.
Я также назвал API "инвентаризация" https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/
и получил эту деталь ..
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus?limit=1000&offset=0"
}
],
"count": 2,
"hasMore": false,
"items": [
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/2"
}
],
"id": "2"
},
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/1"
}
],
"id": "1"
}
],
"offset": 0,
"totalResults": 2
}
Я вызвал API «инвентаризация» с указанием c идентификатор элемента
**https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/134**
и получил это
{
"type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",
"title": "Record does not exist.",
"status": 404,
"o:errorCode": "NONEXISTENT_ID"
}
, но запись
Пожалуйста, кто-нибудь скажет мне, какой API мне нужно использовать, чтобы получить статус доступности предмета и его доступное количество (базовые единицы).