Skip to content

When creating an order via api, the salable quantity does not decrease

I am using the API /rest/V1/orders/create, but when creating an order, the salable quantity does not decrease. (Magento ver. 2.4.6-p3 community)
I am using this payload:

{
"entity": {
    "customer_group_id": 1,
    "applied_rule_ids": "2",
    "base_currency_code": "EUR",
    "base_discount_amount": 0,
    "base_grand_total": 96,
    "base_shipping_amount": 5.575,
    "base_shipping_incl_tax": 5.575,
    "base_shipping_tax_amount": 0,
    "base_shipping_discount_amount": 0,
    "base_subtotal": 86,
    "base_subtotal_incl_tax": 86,
    "base_total_due": 0,
    "base_total_paid": 91.15,
    "base_to_global_rate": 1,
    "base_to_order_rate": 1,
    "discount_tax_compensation_amount": 0,
    "base_discount_tax_compensation_amount": 0,
    "shipping_discount_tax_compensation_amount": 0,
    "customer_is_guest": 0,
    "customer_email": "[email protected]",
    "customer_firstname": "Danilo",
    "customer_lastname": "Duarte",
    "customer_note_notify": 1,
    "discount_amount": 0,
    "email_sent": 1,
    "global_currency_code": "EUR",
    "grand_total": 96,
    "order_currency_code": "EUR",
    "shipping_amount": 5.575,
    "shipping_tax_amount": 0,
    "shipping_description": "checkmo",
    "shipping_discount_amount": 0,
    "shipping_incl_tax": 5.575,
    "state": "new",
    "status": "pending",
    "store_currency_code": "EUR",
    "store_to_base_rate": 0,
    "store_to_order_rate": 0,
    "store_id": 1,
    "subtotal": 86,
    "subtotal_incl_tax": 86,
    "total_due": 0,
    "total_paid": 91.15,
    "total_item_count": 2,
    "total_qty_ordered": 2,
    "tax_amount": 0,
    "weight": 0,
    "items": [
        {
            "base_original_price": 43,
            "base_price": 43,
            "base_price_incl_tax": 43,
            "base_row_total": 86,
            "base_row_total_incl_tax": 86,
            "name": "Luma Analog Watch",
            "original_price": 43,
            "price": 43,
            "price_incl_tax": 43,
            "product_id": 41,
            "product_type": "simple",
            "qty_ordered": 2,
            "row_total": 86,
            "row_total_incl_tax": 86,
            "sku": "24-WG09",
            "store_id": 1,
            "weight": 0
        }
    ],
    "billing_address": {
        "address_type": "billing",
        "city": "Barueri",
        "company": "",
        "country_id": "BR",
        "customer_address_id": 4,
        "email": "[email protected]",
        "firstname": "Danilo",
        "lastname": "Duarte",
        "postcode": "06414070",
        "region": "SP",
        "street": [
            "Rua Sol"
        ],
        "telephone": "11950807198"
    },
    "payment": {
        "additional_information": [
            "Check / Money order"
        ],
        "amount_ordered": 96,
        "amount_paid": 91.15,
        "base_amount_ordered": 96,
        "base_amount_paid": 91.15,
        "base_shipping_amount": 5.575,
        "method": "checkmo",
        "cc_exp_year": "0",
        "cc_ss_start_month": "0",
        "cc_ss_start_year": "0",
        "shipping_amount": 5.575
    },
    "status_histories": [
        {
            "comment": "Order Placed by Admin Username using Admin Panel",
            "created_at": "2024-03-15 16:54:05",
            "entity_id": 11,
            "entity_name": "order",
            "is_customer_notified": 0,
            "is_visible_on_front": 0,
            "parent_id": 75,
            "status": "pending"
        },
        {
            "comment": "Order Placed by Store Administrator",
            "created_at": "2024-03-15 16:54:05",
            "entity_id": 10,
            "entity_name": "order",
            "is_customer_notified": 0,
            "is_visible_on_front": 1,
            "parent_id": 75,
            "status": "pending"
        }
    ],
    "extension_attributes": {
        "payment_additional_info": [
            {
                "key": "method_title",
                "value": "Check / Money order"
            }
        ],
        "shipping_assignments": [
            {
                "shipping": {
                    "address": {
                        "address_type": "shipping",
                        "city": "Barueri",
                        "company": "",
                        "country_id": "BR",
                        "customer_address_id": 4,
                        "email": "[email protected]",
                        "firstname": "Danilo",
                        "lastname": "Duarte",
                        "postcode": "06414070",
                        "region": "SP",
                        "street": [
                            "Rua Sol"
                        ],
                        "telephone": "11950807198"
                    },
                    "method": "flatrate_flatrate",
                    "total": {
                        "base_shipping_amount": 5.575,
                        "base_shipping_incl_tax": 5.575,
                        "shipping_amount": 5.575,
                        "shipping_incl_tax": 5.575
                    }
                },
                "items": [
                    {
                        "base_original_price": 43,
                        "base_price": 43,
                        "base_price_incl_tax": 43,
                        "base_row_total": 86,
                        "name": "Luma Analog Watch",
                        "original_price": 43,
                        "price": 43,
                        "price_incl_tax": 43,
                        "product_id": 41,
                        "product_type": "simple",
                        "qty_ordered": 2,
                        "row_total": 86,
                        "row_total_incl_tax": 86,
                        "sku": "24-WG09",
                        "store_id": 1,
                        "weight": 0
                    }
                ],
                "extension_attributes": [],
                "stock_id": 1
            }
        ],
        "applied_taxes": [],
        "item_applied_taxes": [],
        "converting_from_quote": false
    }
}

}