Today I will show you how to partially bulk transfer products from one source to another using Magento 2 API.
If The Northeast warehouse is out of stock of the Gaiam Body Balance Ball Kit, this post I will partially transfer stocks from the West warehouse to the Northeast warehouse.
Step 1: Generate Admin Access Token
Endpoint: POST <host>/rest/V1/integration/admin/token
Enter your admin username and password in the Body sections, then click Send.
{
"username": "string",
"password": "string"
}
Response: access token
Step 2: Partially Transfer The Product
Create a new request and enter the admin access token
Authorization: Bearer token
Endpoint: POST <host>/rest/default/V1/inventory/bulk-partial-source-transfer
Scope: Default store view
Payload:
{
"originSourceCode": "west_wh",
"destinationSourceCode": "ne_wh",
"items": [
{
"sku": "CONBALBALL",
"qty": 5
}
]
}
Response:
An empty array.
[]
Step 3: Verify The Result
In Admin, click Catalog > Products and look at Quantities per source column.
I have shown you how to partially transfer products from the West warehouse to Northeast Warehouse using Magento API. For more information, please refer to Magento DevDocs. If you have any questions or new ideas, feel free to leave a comment below.