Gå til indhold
ShopentlyLearn

Opret · Lagerregulering — Lagerbeholdning

Ændre fysiske og salgbare produktmængder.

POST/api/v1/inventory/stock-adjustments

cURL-anmodning

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request POST \
  --url https://shop.onshopently.com/api/v1/inventory/stock-adjustments \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: example-create_adjustment_api_v1_inventory_stock_adjustments_post' \
  --header 'Content-Type: application/json' \
  --data-raw '{"expected_version":0,"locations":[{"location_id":"example","on_hand":1}],"reason":"Example","target_id":"example","target_type":"product","warehouse_id":"example"}'

Svar

{
  "data": {
    "deleted": false,
    "id": "stock_v1_WyJleGFtcGxlIiwicHJvZHVjdCIsImV4YW1wbGUiXQ",
    "version": 1
  },
  "meta": {
    "request_id": "example"
  }
}

Nødvendige rettigheder

Godkendelse
Adgangstoken
Tilgængelig fra
STANDARD
Nøglens tilladelse
Rediger beholdninginventory.stock:update