Skip to main content
POST
/
api
/
v1
/
inventory_levels
/
adjust.json
Adjust Inventory
curl --request POST \
  --url https://api.launchmystore.io/api/v1/inventory_levels/adjust.json \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inventory_item_id": "<string>",
  "location_id": "<string>",
  "available_adjustment": 123,
  "reason": "<string>"
}
'
{
  "success": true,
  "data": {
    "inventory_item_id": "<string>",
    "location_id": "<string>",
    "available": 123,
    "on_hand": 123,
    "updated_at": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Adjust Inventory

Adjusts the inventory level for an inventory item at a location by a relative amount. Use positive numbers to increase inventory and negative numbers to decrease.

Request

curl -X POST "https://api.launchmystore.io/api/v1/inventory_levels/adjust" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inventory_item_id": "inv_abc123",
    "location_id": "loc_main",
    "available_adjustment": -5,
    "reason": "Damaged items removed from stock"
  }'

Body Parameters

inventory_item_id
string
required
The inventory item ID to adjust
location_id
string
required
The location ID where the adjustment should be made
available_adjustment
integer
required
The amount to adjust by (positive to increase, negative to decrease)
reason
string
Reason for the adjustment (for audit trail)

Response

success
boolean
Whether the request succeeded
data
object
The updated inventory level

Example Response

{
  "success": true,
  "data": {
    "inventory_item_id": "inv_abc123",
    "location_id": "loc_main",
    "variant_id": "var_xyz789",
    "sku": "TSHIRT-S-BLK",
    "available": 40,
    "incoming": 100,
    "committed": 5,
    "on_hand": 45,
    "updated_at": "2024-01-25T10:00:00Z"
  }
}

Batch Adjustments

For adjusting multiple inventory items at once, use the batch endpoint:
curl -X POST "https://api.launchmystore.io/api/v1/inventory_levels/adjust_batch" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "adjustments": [
      {
        "inventory_item_id": "inv_abc123",
        "location_id": "loc_main",
        "available_adjustment": -5
      },
      {
        "inventory_item_id": "inv_def456",
        "location_id": "loc_main",
        "available_adjustment": 10
      }
    ],
    "reason": "Inventory reconciliation"
  }'

Common Adjustment Reasons

ReasonUse Case
receivedNew inventory received from supplier
correctionFixing inventory count discrepancy
damagedRemoving damaged items
returnedProcessing customer returns
shrinkageTheft or unexplained loss
transferMoving between locations
recountPhysical inventory count adjustment

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have write_inventory scope
NOT_FOUNDInventory item or location not found
INSUFFICIENT_INVENTORYAdjustment would result in negative inventory
VALIDATION_ERRORInvalid request body