[英]Netsuite REST Web Services API GET Request, Outside of Postman
[英]NetSuite Rest API to get An Items Price
我正在尝试使用 postman 来获取商品价格/价格矩阵。 如果我向以下位置执行获取请求,我可以获得商品价格水平: https://{{accountid}}.suitetalk.api.netsuite.com/services/rest/record/v1/itemgroup/{{item_number}}?expandSubResources=真的
但它不会提供每个级别的项目价格,只提供级别的名称。 奇怪的是,如果我向其他产品类型(在我的情况下为折扣和非库存商品)发送类似的请求,我什至不会获得价格水平信息。 有谁知道我如何从 netsuite 中提取产品定价信息。 我试过浏览文档,但什么也没找到。
这是对 noninventoryitems 模块的请求的 cURL
curl --location --request GET 'https://5195388-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/noninventoryitem/284/' \
--header 'Authorization: Bearer {{{accesstoken}}}"' \
--header 'Cookie: NS_ROUTING_VERSION=LAGGING'
您可以执行 SuiteQL 查询。
POST https://{{accountid}}.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql
Header: Prefer: transient
Body:
{
"q": "SELECT i.item, i.pricelevelname, i.price, c.name as currency FROM itemprice i, currency c WHERE i.currencypage = c.id and item=967"
}
样品 output:
{
"links": [
{
"rel": "self",
"href": "https://[accountid].suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=1000&offset=0"
}
],
"count": 2,
"hasMore": false,
"items": [
{
"links": [],
"currency": "USD",
"item": "967",
"price": "100000",
"pricelevelname": "Base Price"
},
{
"links": [],
"currency": "USD",
"item": "967",
"price": "100000",
"pricelevelname": "Partner Pricing"
}
],
"offset": 0,
"totalResults": 2
}
记录和字段 ID 位于分析浏览器中: https://[accountid].app.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/analytics/record/itemPrice.html 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.