Update Sku Stock

Introduction

THis method is used to update just the stock of one sku, you can choose between:

  1. Increase: If you send the action "increase" will add the quantity send to the product. Ie. If you send 3 as quantity and the product already has 4, the product will ends with 7 of stock. The common use for this action is when you need to return a item to the stock

  2. Decrease: If you send the action "decrease" will decrease the quantity send to the product. Ie. If you send 1 as quantity and the product has 4, the product will ends with 3 of stock. The common use for this action is when you have a sale.

  3. Update: If you send the action "update" this quantity will overwrite the actual product stock, so if you send 5 not matter how quantity the sku has, will ends with 5, the common use for that is in a stock balance moment.

Example Request

{"action":"update","quantity":2,"sku":"MAX-MUDEI"}

Returned exemple

{
    "Product": {
        "inspected_fields": {
            "name": {
                "valid": true
            },
            "description": {
                "valid": true
            },
            "real_dimension": {
                "valid": true,
                "weight": true,
                "length": true,
                "height": true
            },
            "ean": {
                "valid": true
            },
            "categories": {
                "valid": true,
                "levels": 5
            },
            "link": {
                "valid": true
            },
            "price": {
                "valid": true
            },
            "special_price": {
                "valid": true
            },
            "brand": {
                "valid": true
            },
            "dimensions": {
                "valid": true,
                "weight": true,
                "length": true,
                "height": true,
                "width": true
            }
        },
        "real_dimension": {
            "height": 2,
            "length": 2,
            "weight": 1,
            "width": 2
        },
        "dimension": {
            "weight": 1,
            "height": 1,
            "width": 11,
            "length": 8
        },
        "suppliers_table": [],
        "stock_table": [],
        "price_table": [],
        "price_history": [],
        "specialprice_history": [],
        "package_skus": [],
        "grouped_skus": [],
        "categories": [
            {
                "name": "Joias e Relógios > Joias, Bijuterias e Semi Joias > Brincos > Outros Materiais > Outros Tipos",
                "id": "5ed47d072851597e9455b52e"
            },
            {
                "name": "Joias e Relógios",
                "id": "5ed47d072851597e9455b52f"
            },
            {
                "name": "Joias, Bijuterias e Semi Joias",
                "id": "5ed47d072851597e9455b530"
            }
        ],
        "log_history": [],
        "photos": [
            {
                "url": "https://s3-sa-east-1.amazonaws.com/pluggto/3498/3498_b5a5d62c-77f6-4add-8b64-3523e9c90c0e.jpg",
                "order": 0,
                "external": {
                    "NTJhYTI3MTc4MDYyZjNk": "https://s3-sa-east-1.amazonaws.com/pluggto/3498/3498_b5a5d62c-77f6-4add-8b64-3523e9c90c0e.jpg"
                },
                "savelocal": true,
                "name": null,
                "title": null,
                "width": null,
                "height": null,
                "hd": null,
                "format": null,
                "valid": null,
                "allowed_channels": null,
                "white_bg": null,
                "inspected": null,
                "id": "5ed47d072851597e9455b52c"
            }
        ],
        "attributes": [
            {
                "value": {
                    "code": "Vermelho",
                    "label": "Vermelho"
                },
                "label": "Cor",
                "code": "Cor",
                "attribute_diff": null,
                "id": "5ed47d072851597e9455b531"
            },
            {
                "value": {
                    "code": "Unico",
                    "label": "Unico"
                },
                "label": "Tamanho",
                "code": "Tamanho",
                "attribute_diff": null,
                "id": "5ed47d072851597e9455b532"
            }
        ],
        "variations": [],
        "stock_history": [],
        "type": "simple",
        "sku": "MAX-MUDEI",
        "name": "Conjunto Brinco 1 23 Colar Banhado a Ródio Negro com Zircônia Rubi Graci Plugg.to",
        "quantity": 2,
        "price": 1000,
        "special_price": 999.99,
        "description": "<p>As Joias são elaboradas por designers formados pela Le Art Orafe Jewellery de Firenze na Itália. Utilizam matérias primas nobres e processos de alta tecnologia em joalheria, que resultam em semijoias exclusivas com pedras naturais, zircônias, cristais e acabamento fino folheado a ouro, ouro rosa, ródio e ródio negro. Cada peça passa por um controle de qualidade minucioso, para garantir que sua experiência seja única. Banhados, Acabamento de jóia, Produto Hipoalergênico, com garantia , uma Embalagem personalizada, transforma o produto em um desejo de consumo.</p>",
        "brand": "Carolina Alcaide",
        "link": "https://pluggto1.xtechcommerce.com//Conjunto-Brinco-e-Colar-Banhado-a-Rodio-Negro-com-Zirconia-Rubi-Graci-Pluggto",
        "ean": "7899716817407",
        "user_id": "5387",
        "created": "2020-06-01T03:59:03.572Z",
        "created_by": "NTJhYTI3MTc4MDYyZjNk",
        "timestamp": 1617837239,
        "modified": "2021-04-07T23:13:59.302Z",
        "modified_by": "NTJhYTI3MTc4MDYyZjNk",
        "pending_stock_sync": true,
        "inspected": false,
        "inspected_last_time": "2020-12-18T14:59:00.832Z",
        "quality": "good",
        "daysToEnd": 60,
        "recentSales": 1,
        "handling_time": 1,
        "stock_code": "Minha Tabela",
        "isbn": "",
        "manufacture_time": null,
        "model": "",
        "nbm": "",
        "ncm": "",
        "warranty_message": "",
        "warranty_time": null,
        "cest": "",
        "reserved": 0,
        "variations_photos": [],
        "available": {
            "23766b43296950bf276c94d891890521": 2
        },
        "log_permanent": [],
        "photo_index_done": false,
        "archived": false,
        "supplier_id": null,
        "department": null,
        "short_description": null,
        "ean_not_mandatory": null,
        "cost": null,
        "keywords": null,
        "origin": null,
        "delivery_type": null,
        "checkStock": null,
        "tax_segment": null,
        "score": null,
        "location": null,
        "inspected_photos_last_time": null,
        "deleted": null,
        "minimum_price": null,
        "raw": null,
        "id": "5ed47d072851597e9455b528"
    }
}
Language
Click Try It! to start a request and see the response here!