API warehouse_holdings $select not working correctly

SUGGESTED

When i use the $select query variable with quantity columns on warehouse_holdings the quantity columns are simply not returned

api.columbus.sage.com/.../warehouse_holdings?$expand=product&$select=id,quantity_in_stock,quantity_allocated,product

{
     id: 26674,
     product: {
       +"id": 34434,
       +"code": "103025",
       +"name": "lorum ipsum",
       +"description": "",
       +"barcode": "",
       +"allow_sales_order": true,
       +"product_group_id": 534
       +"tax_code_id": 4545,
       +"date_time_updated": "2021-05-20T10:35:12.817",
     }
}

api.columbus.sage.com/.../warehouse_holdings?$expand=product

{
     id: 26674,
     warehouse_id: 343,
     product_id: 3434,
     reorder_level: 0.0,
     minimum_level: 0.0,
     maximum_level: 0.0,
     confirmed_qty_in_stock: 262.0,
     unconfirmed_qty_in_stock: 0.0,
     quantity_in_stock: 262.0,
     quantity_allocated_stock: 0.0,
     quantity_allocated_sop: 0.0,
     quantity_allocated_bom: 0.0,
     quantity_allocated: 0.0,
     product: {
       +"id": 34434,
       +"code": "103025",
       +"name": "lorum ipsum",
       +"description": "",
       +"barcode": "",
       +"allow_sales_order": true,
       +"product_group_id": 534
       +"tax_code_id": 4545,
       +"date_time_updated": "2021-05-20T10:35:12.817",
     },
     date_time_updated: "2021-05-20T10:35:12.817"
}

  • 0

    Hi David,

    I'll email you about this directly. It looks to be an issue with the API returning that information. Once we have an answer I'll post directly back to this post.

  • 0
    SUGGESTED

    This has been logged as Known Issue 8400.

    The reason for this issue is that the API calculates the quantity_in_stock and quantity_allocated values on the fly based on other fields in this endpoint.

    Should anyone require these fields as part of their request you must include the following:

    quantity_in_stockunconfirmed_qty_in_stockconfirmed_qty_in_stock

    quantity_allocatedquantity_allocated_stockquantity_allocated_sopquantity_allocated_bom