> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackstarhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adjust Inventory for Product

> Adjust the inventory for the specified cart product.



## OpenAPI

````yaml put /cart/products/{product_id}/adjust-inventory
openapi: 3.1.0
info:
  description: >

    Trackstar is a Unified API that provides standard endpoints for Supply Chain
    Logistics. We currently offer an API for Warehouse Management Systems (WMS).
  title: Trackstar API
  version: 0.1.0
servers:
  - description: Trackstar API
    url: https://production.trackstarhq.com
security: []
tags: []
externalDocs:
  description: Trackstar API Documentation
  url: https://docs.trackstarhq.com
paths:
  /cart/products/{product_id}/adjust-inventory:
    put:
      tags:
        - cart
        - Products
      summary: Adjust Inventory for Product
      description: Adjust the inventory for the specified cart product.
      operationId: put_cart_adjust_inventory
      parameters:
        - in: path
          name: product_id
          schema:
            type: string
          required: true
        - in: header
          name: x-trackstar-api-key
          description: Your organization-level Trackstar API key.
          schema:
            type: string
            example: <x-trackstar-api-key>
          required: true
        - in: header
          name: x-trackstar-access-token
          description: >-
            Your user's access token for a specific integration (ShipHero,
            Extensiv, etc).
          schema:
            type: string
            example: <x-trackstar-access-token>
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdjustInventorycartProductInputSchema'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cartAdjustInventoryProductResponse'
          description: Successful response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
components:
  schemas:
    AdjustInventorycartProductInputSchema:
      type: object
      properties: {}
      additionalProperties: false
      oneOf:
        - $ref: '#/components/schemas/AdjustCartInventorySchema--Base__Schema--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Amazon--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--BigCommerce--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--eBay--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Etsy--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Faire--'
        - $ref: >-
            #/components/schemas/AdjustInventorycartProduct--Magento__-_Adobe__Commerce_---
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Mirakl--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--NuOrder--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Overstock--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Cart__Sandbox--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Shopify--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Squarespace--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--TikTok--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Walmart--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--Wix--'
        - $ref: '#/components/schemas/AdjustInventorycartProduct--WooCommerce--'
      title: AdjustInventorycartProductInputSchema
    cartAdjustInventoryProductResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CartProductApiItemSchema'
        id:
          type: string
          description: The ID of the object that has been created or modified
          example: id
        unused_fields:
          type: array
          description: Unused fields
          items:
            type: string
            description: ''
      required:
        - id
        - unused_fields
      additionalProperties: false
      title: cartAdjustInventoryProductResponse
    HTTPError:
      properties:
        error:
          type: string
        id:
          type: string
          description: The ID of the item that wasn't found.
      required:
        - error
      type: object
      title: HTTPError
    ValidationError:
      properties:
        error:
          type: string
        detail:
          type: object
          properties:
            <location>:
              type: object
              properties:
                <field_name>:
                  type: array
                  items:
                    type: string
      required:
        - error
      type: object
      title: ValidationError
    AdjustCartInventorySchema--Base__Schema--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
        - warehouse_id
      additionalProperties: true
      title: Base Schema
    AdjustInventorycartProduct--Amazon--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          enum:
            - DEFAULT
          description: >-
            ID of the warehouse to adjust inventory in. (hit authenticated to
            get full enum)
      required:
        - adjustment_type
        - quantity
        - warehouse_id
      additionalProperties: false
      title: Amazon
    AdjustInventorycartProduct--BigCommerce--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
        reason:
          type: string
          enum:
            - recount
            - received
            - sold
            - damaged
            - other
          description: The reason for the inventory adjustment.
      required:
        - adjustment_type
        - quantity
        - reason
        - warehouse_id
      additionalProperties: false
      title: BigCommerce
    AdjustInventorycartProduct--eBay--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: eBay
    AdjustInventorycartProduct--Etsy--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
          description: The type of adjustment to make to the inventory.
          example: increase
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Etsy
    AdjustInventorycartProduct--Faire--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
          description: The type of adjustment to make to the inventory.
          example: increase
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Faire
    AdjustInventorycartProduct--Magento__-_Adobe__Commerce_---:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Magento (Adobe Commerce)
    AdjustInventorycartProduct--Mirakl--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - exact
          description: The type of adjustment to make to the inventory.
          example: exact
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Mirakl
    AdjustInventorycartProduct--NuOrder--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
        future_date:
          type: string
          format: date-time
          description: >-
            The future date for the adjustment. If not provided, the adjustment
            will be applied immediately.
          example: '2030-01-01T00:00:00Z'
      required:
        - adjustment_type
        - quantity
        - warehouse_id
      additionalProperties: false
      title: NuOrder
    AdjustInventorycartProduct--Overstock--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - exact
          description: The type of adjustment to make to the inventory.
          example: exact
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
        - warehouse_id
      additionalProperties: false
      title: Overstock
    AdjustInventorycartProduct--Cart__Sandbox--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
          description: The type of adjustment to make to the inventory.
          example: increase
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Cart Sandbox
    AdjustInventorycartProduct--Shopify--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
        reason:
          type: string
          enum:
            - correction
            - cycle_count_available
            - damaged
            - movement_created
            - movement_updated
            - movement_received
            - payment_canceled
            - other
            - promotion
            - quality_control
            - received
            - reservation_created
            - reservation_updated
            - reservation_deleted
            - restock
            - safety_stock
            - shrinkage
          description: The reason for the inventory adjustment.
      required:
        - adjustment_type
        - quantity
        - reason
        - warehouse_id
      additionalProperties: false
      title: Shopify
    AdjustInventorycartProduct--Squarespace--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Squarespace
    AdjustInventorycartProduct--TikTok--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
        shop_id:
          type: string
          description: >-
            The TikTok shop ID of the product to adjust inventory for. If you
            only have one shop, we will default to it. Otherwise, you must
            provide a shop ID.
          example: shop_id
      required:
        - adjustment_type
        - quantity
        - shop_id
        - warehouse_id
      additionalProperties: false
      title: TikTok
    AdjustInventorycartProduct--Walmart--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Walmart
    AdjustInventorycartProduct--Wix--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
        warehouse_id:
          type: string
          description: ID of the warehouse to adjust inventory in.
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: Wix
    AdjustInventorycartProduct--WooCommerce--:
      type: object
      properties:
        quantity:
          type: integer
          description: >-
            The quantity to adjust the inventory by if increasing or decreasing.
            If using exact, the quantity to set the inventory to.
          example: 1
        adjustment_type:
          type: string
          enum:
            - increase
            - decrease
            - exact
          description: The type of adjustment to make to the inventory.
          example: increase
      required:
        - adjustment_type
        - quantity
      additionalProperties: false
      title: WooCommerce
    CartProductApiItemSchema:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the product.
          example: product_id
        created_date:
          type: string
          format: date-time
          description: The date the cart product was created.
          example: '2022-01-01T00:00:00Z'
        updated_date:
          type: string
          format: date-time
          description: The date the cart product was last updated.
          example: '2022-01-02T05:05:05Z'
        name:
          type: string
          description: The name of the product.
          example: product_name
        sku:
          type:
            - string
            - 'null'
          description: The SKU of the product.
          example: sku
        gtin:
          type:
            - string
            - 'null'
          description: The GTIN of the product.
          example: gtin
        parent_product_id:
          type: string
          description: >-
            If this is a variant, the ID of the parent product. If this is a
            parent product, this field should be the same as ID.
        is_kit:
          type: boolean
          description: ''
          example: true
        active:
          type: boolean
          description: Whether the product is active.
          example: true
        image_url:
          type:
            - string
            - 'null'
          description: The URL of the product's image.
          example: https://example.com/image.jpg
        price:
          type:
            - number
            - 'null'
          description: >-
            The price of the product if it is a variant. Not the source of truth
            for parent products.
          example: 10
        unit_cost:
          type:
            - number
            - 'null'
          description: >-
            The unit cost of the product if it is a variant. Not the source of
            truth for parent products.
          example: 10
        inventory:
          type:
            - integer
            - 'null'
          description: >-
            The inventory of the product if it is a variant. Not the source of
            truth for parent products.
          example: 10
        inventory_by_warehouse_id:
          type: object
          description: Inventory broken down by warehouse.
          example:
            warehouse_id_1: 6
            warehouse_id_2: 4
          additionalProperties:
            type: integer
            description: Inventory for that warehouse.
            example: 5
        measurements:
          $ref: '#/components/schemas/ProductMeasurements'
        tags:
          type: array
          description: >-
            A list of tags associated with the product. Tags that are
            represented as key-value pairs in the underlying system will be
            represented as a single string formatted as `key:value`.
          example:
            - tag_0
          items:
            type: string
            description: A tag associated with the product.
            example: tag_0
        categories:
          type: array
          description: >-
            A list of category names the product belongs to. For platforms with
            a hierarchical category tree, each level is a separate element with
            the leaf last (e.g. ["Apparel", "Shoes", "Running"]). For platforms
            with a single scalar product type, a single-element list.
          example:
            - Apparel
            - Shoes
            - Running
          items:
            type: string
            description: A category name.
            example: Apparel
        external_system_url:
          type:
            - string
            - 'null'
          description: >-
            URL link to the cart product in the external system (WMS/Freight
            etc).
          example: https://example.com/cartproduct/123
        trackstar_tags:
          type:
            - array
            - 'null'
          description: >-
            A list of custom tags associated with the resource. A tag can be
            either a string or a dictionary with one key-value pair.
          example:
            - tag1
            - tag2
            - tag3: value3
          items: {}
        additional_fields:
          type: object
          description: Integration-specific fields
          example:
            key: value
          additionalProperties: {}
        trackstar_created_date:
          type: string
          format: date-time
          description: ''
        trackstar_updated_date:
          type: string
          format: date-time
          description: ''
      required:
        - active
        - additional_fields
        - categories
        - created_date
        - external_system_url
        - gtin
        - id
        - image_url
        - inventory
        - inventory_by_warehouse_id
        - is_kit
        - measurements
        - name
        - parent_product_id
        - price
        - sku
        - tags
        - trackstar_created_date
        - trackstar_tags
        - trackstar_updated_date
        - unit_cost
        - updated_date
      additionalProperties: false
      title: CartProductApiItemSchema
    ProductMeasurements:
      type: object
      properties:
        length:
          type:
            - number
            - 'null'
          description: ''
          example: 1.5
        width:
          type:
            - number
            - 'null'
          description: ''
          example: 1.5
        height:
          type:
            - number
            - 'null'
          description: ''
          example: 1.5
        unit:
          type:
            - string
            - 'null'
          enum:
            - cm
            - in
          description: The unit of measurement for the size of the product.
          example: in
        weight:
          type:
            - number
            - 'null'
          description: ''
          example: 2.5
        weight_unit:
          type:
            - string
            - 'null'
          enum:
            - kg
            - oz
            - lb
          description: The unit of measurement for the weight of the product.
          example: lb
      required:
        - height
        - length
        - unit
        - weight
        - weight_unit
        - width
      additionalProperties: false
      title: ProductMeasurements

````