Solved

Cannot request LotSerialNbr and Expiry date from SalesOrder Webservice endpoint


 

Hey All, 

I’ve been attempting to fetch the contents of this Generic Inquiry (screenshot 1) to no avail.

I have the columns I require in the Generic Inquiry but not in the Webservice Endpoint.

I modified the Generic Inquiry to left join SOOrder to SOShipline (screenshot 2) and was able to successfully request the two additional columns (LotSerialNbr, ExpiryDate) via the “View Inquiry” button. (screenshot 1)

Attempting to retrieve the content via the Webservice endpoint has yielded no answer however. Here is my raw get request and here is the modifications i’ve made via the Webservice endpoint GUI (screenshot 3) :

/SalesOrder?$expand=Shipments&$select=Shipments/InvoiceType,Shipments/InvoiceNbr,Shipments/ShippedQty,Shipments/ExpiryDate,Shipments/LotSerialNumber

The moment I modify the select statement to include Shipments/LotSerialNbr and Shipments/ExpiryDate, the shipment section returns the default state 

 "OrderNbr": {
            "value": "015263"
        },
        "Shipments": [
            {
                "id": "afe97e3d-0289-46ec-85ca-7ab877bf0002",
                "rowNumber": 1,
                "note": null,
                "LotSerialNbr": {},
                "custom": {}
            }
        ],
        "custom": {}


How do i access this information from inside of a /SalesOrder route,

Thanks for your time,

Chris

icon

Best answer by rosenjon 4 April 2023, 23:48

View original

5 replies

Userlevel 7
Badge +11

Hi @ChrisHaddy ,

To retrieve all shipment details, you should use the Shipment entity as we cannot obtain the Shipment Lot serial number and expiration date from the Sales Order entity. Only shipment summary details can be obtained at the Sales Order level.

Hey @jinin 

Thanks your your response. Much appreciated. Attempting to fetch these parameters from an ulterior method has had its own challenges.

 Attempting a put request to:

/Shipment/Details/Allocations

Has the following error (screenshot 1). This endpoint is untouched and extended from the 18.000.000 series endpoints. Have you been able to request these fields?

Chris

 

Userlevel 6
Badge +5

This might be helpful to you: A Look at the REST-based API in Shipment Related Development Activities | Acumatica Cloud ERP

Userlevel 6
Badge +5

Try making a REST request to this endpoint please. It works for me.

http://10.10.80.1/xxxtenantnamexxx/entity/Default/18.200.001/Shipment/000046?$expand=Details/Allocations

**Quick Addition**: You mention above that you are making a PUT request. No...if you are trying to retrieve allocation details, that requires a GET request. PUT would be used to create a new record.

 

Output:

{
"id": "57bae688-1cd3-ed11-9887-000c29859e68",
"rowNumber": 1,
"note": "",
"BaseCurrencyID": {
"value": "USD"
},
"ControlQty": {
"value": 263.300000
},
"CreatedDateTime": {
"value": "2023-04-04T12:11:53.777-07:00"
},
"CurrencyID": {
"value": "USD"
},
"CurrencyRate": {
"value": 1.00000000
},
"CurrencyRateTypeID": {},
"CurrencyViewState": {
"value": false
},
"CustomerID": {
"value": "10084"
},
"Details": [
{
"id": "5cbae688-1cd3-ed11-9887-000c29859e68",
"rowNumber": 1,
"note": "",
"Allocations": [
{
"id": "d25759bf-f4a4-4ad6-aac1-dbf1650741cd",
"rowNumber": 1,
"note": null,
"Description": {
"value": "some test product"
},
"ExpirationDate": {},
"InventoryID": {
"value": "134134"
},
"LocationID": {
"value": "TESTLOC"
},
"LotSerialNbr": {
"value": "bhsjcnx"
},
"OrderNbr": {},
"OrderType": {
"value": "SO"
},
"Qty": {
"value": 263.300000
},
"UOM": {
"value": "LB"
},
"custom": {},
"files": []
}
],
"Description": {
"value": "some test product"
},
"ExpirationDate": {},
"FreeItem": {
"value": false
},
"InventoryID": {
"value": "134134"
},
"LineNbr": {
"value": 1
},
"LocationID": {
"value": "TESTLOC"
},
"LotSerialNbr": {
"value": "bhsjcnx"
},
"OpenQty": {
"value": 0.0
},
"OrderedQty": {
"value": 263.300000
},
"OrderLineNbr": {
"value": 1
},
"OrderNbr": {
"value": "000135"
},
"OrderType": {
"value": "SO"
},
"OriginalQty": {
"value": 263.30
},
"ReasonCode": {},
"ShippedQty": {
"value": 263.300000
},
"UOM": {
"value": "LB"
},
"WarehouseID": {
"value": "MYWHSE"
},
"custom": {},
"files": []
}
],
"EffectiveDate": {
"value": "2022-03-09T00:00:00-08:00"
},
"FOBPoint": {},
"FreightAmount": {
"value": 0.0000
},
"FreightCost": {
"value": 0.0000
},
"FreightCurrency": {
"value": "USD"
},
"GroundCollect": {
"value": false
},
"Hold": {
"value": false
},
"Insurance": {
"value": false
},
"LastModifiedDateTime": {
"value": "2023-04-04T12:12:06.203-07:00"
},
"Operation": {
"value": "Issue"
},
"Owner": {},
"PackageCount": {
"value": 0
},
"PackageWeight": {
"value": 0.000000
},
"ReciprocalRate": {
"value": 1.00000000
},
"ResidentialDelivery": {
"value": false
},
"SaturdayDelivery": {
"value": false
},
"ShipmentDate": {
"value": "2023-04-04T00:00:00-07:00"
},
"ShipmentNbr": {
"value": "000046"
},
"ShippedQty": {
"value": 263.300000
},
"ShippedVolume": {
"value": 0.000000
},
"ShippedWeight": {
"value": 0.000000
},
"ShippingTerms": {},
"ShippingZoneID": {},
"ShipVia": {},
"Status": {
"value": "Confirmed"
},
"ToWarehouseID": {},
"Type": {
"value": "Shipment"
},
"UseCustomersAccount": {
"value": false
},
"WarehouseID": {
"value": "MYWHSE"
},
"WorkgroupID": {},
"custom": {},
"files": []
}

 

Userlevel 7
Badge +11

Hi @ChrisHaddy ,

Can you please try the sample request shared by @rosenjon? Let us know, if still face any issues.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved