Skip to main content

Create Stock for Product

POST 

/inventories/:product_uuid

Sets the inventory quantity for the specified product. When you take this action, you are choosing to manage the inventory for this product in Commerce.

Request

Path Parameters

    product_uuid stringrequired

    The unique identifier of the product.

Body

    data InventoryCreaterequired
    quantity integerrequired

    The amount of inventory available.

Responses

Success. Stock was successfully created for product

Schema
    data Inventory
    id string

    The unique identifier of the product.

    type stringrequired

    Possible values: [stock]

    Default value: stock

    The type represents the object being returned. Always stock.

    total integer

    The total amount of stock we have.

    available integer

    The amount of stock available for purchase.

    allocated integer

    The amount of paid for stock, also known as reserved.

Loading...