Edit Stock

  1. Request Instruction
    HTTPS Method POST
    URL http://subdomain.supersuite.my/api/stock/edit
    Content Type  application/json
    Response Type JSON
    Parameter Description

    token : string, is required.

    stock_group_id : int.

    stock_item_type_id" : int.

    item_code : string, is required.

    status : char (1), is required.

    description : string, is required.

    description_2 : string

    duty_rate : decimal.

    discontinued : char (1), is required.

    lead_time : string.

    has_promoter : char (1),is required.

    supply_tax_code_ref_id : string.

    purchase_tax_code_ref_id : string.

    tariff_code_ref_id : string.

    stock_control : char (1),is required.

    costing_method : char (2).

    config_uom_id : int.

    standard_selling_price : decimal.

    standard_selling_price_2 : decimal.

    min_selling_price : decimal.

    max_selling_price : decimal.

    min_purchase_price : decimal.

    max_purchase_price : decimal.

    standard_cost : decimal.

    min_qty : int.

    re_order_level : int.

    re_order_qty : int.

    normal_level : int.

    max_qty : int.

    weight : int.

    weight_uom : string.

    volume : int.

    volume_uom : string.

    shelf : string.

    barcode : string.

    redeem_bonus_point : int.

    image : string.

    remark : string.

    Request Headers

    {

        "Content-Type":"application/json"

    }

    Request Body

    {

       "token" : "B7ABD5DEEC6588997DE41B0FE0665",

       "stock_group_id" : "1",

       "stock_item_type_id" : "2",

       "item_code" : "B0001",

       "status" : "A",

       "description" : "English Book",

       "description_2" : "Text Book",

       "duty_rate" : "1.00",

       "discontinued" : "N",

       "lead_time" : "",

       "has_promoter" : "N",

       "supply_tax_code_ref_id" : "SS31CD0066F81E3C27674B1BB8BC7FB1",

       "purchase_tax_code_ref_id" : "PP31CD0066F81E3C27674B1BB8BC7FB1",

       "tariff_code_ref_id" : "TT31CD0066F81E3C27674B1BB8BC7FB1",

       "stock_control" : "Y",

       "costing_method" : "WA",

       "config_uom_id" : "1",

       "standard_selling_price" : "10.00",

       "standard_selling_price_2" : "11.00",

       "min_selling_price" : "10.00",

       "max_selling_price" : "11.00",

       "min_purchase_price" : "5.00",

       "max_purchase_price" : "8.00",

       "standard_cost" : "7.00",

       "min_qty" : "100",

       "re_order_level" : "50",

       "re_order_qty" : "100",

       "normal_level" : "70",

       "max_qty" : "200",

       "weight" : "100",

       "weight_uom" : "g",

       "volume" : "100",

       "volume_uom" : "",

       "shelf" : "",

       "barcode" : "123456789",

       "redeem_bonus_point" : "100",

       "image" : "",

       "remark" : "",

    }

  2. Response JSON Format
    Successful Example

    {

        "status" : true,

        "item_code" : "B001",

        "ref_id" : "SSBD5DEEC6588997DE41B0FE0665",

    }

    Fail Example

    {

        "status" : false,

        "error" : "Token invalid. /  Stock save fail."

    }

  3. Remark Property
    Status

    Only Accept : A, I

     

    A = Active,

    I = Inactive

    Discontinued / Has Promoter / Stock Control

    Only Accept : Y, N

     

    Y = Yes,

    N = No

    Costing Method

    Only Accept : FC, WA, FI, LI, MR

     

    FC = Fixed Cost,

    WA = Weighted Average,

    FI = FIFO,

    LI = LIFO,

    MR = Most Recently