Skip to main content

Refresh MSI Sources from Magento

POST 

/api/magento2/integration-instances/:magento2IntegrationInstance/inventory-sources/refresh

Synchronously fetches MSI sources from Magento via GET /rest/V1/inventory/sources and upserts them into the local cache.

Authenticated. Requires a Bearer token. Empty JSON body ({}).

Side effects:

  • Issues one Saloon request to Magento (no tracked job, no queue).
  • Upserts each returned source by (integration_instance_id, source_code).
  • Updates the row's updated_at so the UI can render "last refreshed at".

When Magento has MSI disabled, it returns HTTP 400. The connector translates this into an empty result — the endpoint still returns 200 with fetched: 0, written: 0 so the UI can surface a friendly message instead of an error.

Request

Responses

OK

Response Headers
    Content-Type