MageSmith
POSTInventorySourceSelectionApi · Magento 2.4.9 Admin · Magento_InventorySourceSelectionApi::source_selection_algorithm_post

POST /V1/inventory/source-selection-algorithm-result

POST /V1/inventory/source-selection-algorithm-result is a Magento 2 REST endpoint in the InventorySourceSelectionApi module. Executes the source selection service using the provided inventory request and algorithm code. Requires an admin Bearer token with ACL Magento_InventorySourceSelectionApi::source_selection_algorithm_post.

Last verified: against Magento 2.4.9.

Returns

Magento\InventorySourceSelectionApi\Api\Data\SourceSelectionResultInterface

Service contract

Magento\InventorySourceSelectionApi\Api\SourceSelectionServiceInterface::execute

Authorization

Admin Bearer token with ACL:

  • Magento_InventorySourceSelectionApi::source_selection_algorithm_post

Body parameters

inventoryRequest Magento\InventorySourceSelectionApi\Api\Data\InventoryRequestInterface Required
algorithmCode string Required

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_InventorySourceSelectionApi::source_selection_algorithm_post

Path

/V1/inventory/source-selection-algorithm-result

Body

{
  "algorithmCode": "",
  "inventoryRequest": {
    "extension_attributes": {},
    "items": [
      {
        "extension_attributes": {},
        "qty": 0,
        "sku": ""
      }
    ],
    "stock_id": 0
  }
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.