beehexa integrationsidebar
beehexa logo

We Build HexaSync Integration Platform for Connecting ERP, POS, CRM, Accounting, and eCommerce Applications to Automate Business Processes

Magento 2 API Bulk Transfer Products

Magento 2 API (Updated 2024): Bulk Transfer Products

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"
}Code language: JSON / JSON with Comments (json)

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
    }
  ]
}Code language: JSON / JSON with Comments (json)

Response:

An empty array.

[]

The response of  Partially Transfer The Product call
The response of Partially Transfer The Product call

Step 3: Verify The Result 

In Admin, click Catalog > Products and look at Quantities per source column.

The result of  Partially Transfer The Product
The result of Partially Transfer The Product
Magento 2 API Bulk Transfer Products

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.

Table of Contents

Ready to integrate and automate at scale ?

Learn how HexaSync lets you build enterprise-grade integrations and automations without having to code.

Receive Exclusive Productivity Tips Directly in Your Inbox

We’ll email you 1-3 times per week—and never share your information.

Get started for free

You can’t add more hours to the day. Beehexa is the next best thing.