---
title: "Adjust stock quantity"
method: POST
path: "/api/business/{businessId}/branch/{branchId}/stock/adjustment"
tags: ["Stock"]
---

# Adjust stock quantity

`POST /api/business/{businessId}/branch/{branchId}/stock/adjustment`

## Request

- Base URL: `http://api-gateway-eu.phorest.com/third-party-api-server`
- URL: `http://api-gateway-eu.phorest.com/third-party-api-server/api/business/{businessId}/branch/{branchId}/stock/adjustment`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/phorest/apis/third-party-api/docs/api/business/:businessId/branch/:branchId/stock/adjustment/post.ts> (a function with typed inputs; its response is checked against the schema)

Adjust stock quantity for the specified business id and branch id. Currently only stock increase and deduction are supported

## Path parameters

- `businessId` string, required
- `branchId` string, required

## Request body

- StockAdjustmentRequest
  - `stocks` Stock[]: The items to be processed
    - `barcode` string, required: This represent the barcode for the product
    - `quantity` integer, required: This represent the amount to either be added or deducted from the stock
    - `operationType` 'DEDUCT' | 'INCREASE', required: Represents the type of action to be performed. Currently only increase and deduction from stock are supported
  - `barcodes` string[]

## Response `204`

Stock quantity adjusted successfully

## Other responses

- `400`: Bad Request
- `404`: Business or branch with the specified ids don't exist
- `429`: Request rate limit exceeded. Current limit set to 100 rps.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/phorest/apis/third-party-api.md) - [All operations](https://skmtc.dev/phorest/apis/third-party-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phorest/apis/third-party-api/revisions/beea6ef29634?raw)
