Acumatica Rest API获取带有订单项详细信息的销售订单 [英] Acumatica Rest API to get sales order with line item detail

查看:41
本文介绍了Acumatica Rest API获取带有订单项详细信息的销售订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个演示,可以轻松创建和检索订单,但是无法使expand参数起作用

I was doing a demo and could easily create and retrieve orders but was not able to get the expand parameter to work

例如

我用以下命令创建了订单SO003615

I created order SO003615 with:

URI http://localhost/Acumatica6/entity/Default/6.00.001/SalesOrder

{
  "OrderType": { value: "SO" },
  "CustomerID" : { value : "ACTIVESTAF" } ,
  "LocationID" : { value : "MAIN" },
  "Description" : { value : "Sample Order"},
   "Details" : 
   [
      {
        "InventoryID" : {value: "AACOMPUT01"},
        "Quantity" : {value: 2},
        "UOM" : {value: "EA"},
        "UnitPrice" : {value: 1000.99}
      },
      {
        "InventoryID" : {value: "AALEGO500"},
        "Quantity" : {value: 1}
      }
   ]
}

然后我尝试d获取订单

URI http://localhost/Acumatica6/entity/Default/6.00.001/SalesOrder/SO/SO003615?expand =详细信息

但订单项不在结果中。我缺少什么?

But the line items are not in the result. What am I missing?

{
  "id": "37c15980-f71d-4496-882d-6e05e4a50061",
  "rowNumber": 1,
  "note": "",
  "BillingAddressOverride": {
    "value": false
  },
  "BillingContactOverride": {
    "value": false
  },
  "CreditHold": {
    "value": false
  },
  "Currency": {
    "value": "USD"
  },
  "CustomerID": {
    "value": "ACTIVESTAF"
  },
  "CustomerOrder": {},
  "Date": {
    "value": "2017-03-16T00:00:00-04:00"
  },
  "Description": {
    "value": "Sample Order 6"
  },
  "DestinationWarehouseID": {},
  "ExternalReference": {},
  "Hold": {
    "value": false
  },
  "IsTaxValid": {
    "value": false
  },
  "LastModified": {
    "value": "2017-03-17T01:05:56.74-04:00"
  },
  "LocationID": {
    "value": "MAIN"
  },
  "NewCard": {
    "value": false
  },
  "OrderedQty": {
    "value": 3
  },
  "OrderNbr": {
    "value": "SO003615"
  },
  "OrderTotal": {
    "value": 2101.98
  },
  "OrderType": {
    "value": "SO"
  },
  "PaymentCardIdentifier": {},
  "PaymentMethod": {
    "value": "CHECK"
  },
  "PaymentRef": {},
  "PreferredWarehouseID": {},
  "Project": {
    "value": "X"
  },
  "RequestedOn": {
    "value": "2017-03-16T00:00:00-04:00"
  },
  "ShippingAddressOverride": {
    "value": false
  },
  "ShippingContactOverride": {
    "value": false
  },
  "ShipVia": {},
  "Status": {
    "value": "Open"
  },
  "TaxTotal": {
    "value": 0
  },
  "custom": {},
  "files": []
}


推荐答案

它是 $ expand ,而不是 expand 。尝试使用以下
http://localhost/Acumatica6/entity/Default/6.00.001/SalesOrder/SO/003615?$ expand = Details

It is $expand, not expand. Try using the following http://localhost/Acumatica6/entity/Default/6.00.001/SalesOrder/SO/003615?$expand=Details

这篇关于Acumatica Rest API获取带有订单项详细信息的销售订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆