Skip to content

stockTransactionV1

Supported, no replacement yet

This endpoint remains fully supported. No replacement exists in the new API yet, and no action is needed. When a replacement ships you will get 12 months' notice, and this site will be updated.

Reference

/rest/stockMgmt/stockTransaction


POST
Adds a stock transaction.

  • Type represents type of stock transaction:
    • "1" - Usage
    • "2" - UsageUpdate
    • "3" - Purchase
  • fromStoreId or toStoreId may be null but not both.
  • Stock transaction record added.
  • Stock levels on from and to stores adjusted.
  • If type is Usage or UsageUpdate the apptID field must be populated.
  • If type is Usage a Materials Job Cost record is added.
  • If type is UsageUpdate the jobCostId field must be populated.
  • If type is UsageUpdate the Job Cost record is updated or, if the quantity ends up as zero, deleted.
  • Returns jobCostId where appropriate.
  • The quantity is a delta value and is +ve (selecting from/to store should avoid -ve values)

acceptable request representations:

  • application/json
{    "type" : "1"    "partId" : "32728",    "fromStoreId" : "56",    "toStoreId": "8",    "ref" : "bdbfh888",    "apptId" : "338892",    "qty" : "7",  // change in quantity
    "jobCostId" : "7574"}


available response representations:
  • 200 - application/json
{
    "result" : "success or fail",
    "result_msg" : "error message",  
    "jobCostId" : "5656"
}




See the Stock Management API matrix for the full list of endpoints in this category.