Skip to main content

Update Instance

PATCH 

/api/magento2/integration-instances/:magento2IntegrationInstance

Partial update — every field is sometimes. connection_settings and integration_settings are deep-merged with the existing values, so rotating just the access_token does NOT wipe the base_url. Top-level scalars like name, country, and is_automatic_sync_enabled overwrite directly.

Body parameters (all optional):

  • name (string, max 255)
  • country (string, 2 chars — nullable)
  • connection_settings.base_url (URL)
  • connection_settings.access_token (string, min 8 chars, max 255) — merchant-rotated tokens land here.
  • connection_settings.admin_path (string, max 120, regex ^[A-Za-z0-9_\-/]+$, nullable) — Magento admin URL frontname (e.g. admin_gmr1iop). Used to build deep-links into the Magento admin panel; defaults to admin server-side when null/blank. Magento installs typically randomise this in app/etc/env.phpbackend.frontName for security.
  • integration_settings (object) — merged into existing settings.
  • is_automatic_sync_enabled (boolean)

Payment-pending order policy (integration_settings.orders.payment_pending) — controls how orders that arrive from Magento 2 unpaid are imported:

  • integration_settings.orders.payment_pending.enabled (boolean) — turn the policy on/off. When off, unpaid orders import normally.
  • integration_settings.orders.payment_pending.disposition (string: open, draft, reserve) — what happens to an unpaid order: open imports it normally (no hold), draft imports it without allocating stock until approved, reserve allocates stock and holds fulfillment until payment arrives.
  • integration_settings.orders.payment_pending.reserve_expiry_days (integer 1-90, nullable) — for the reserve disposition, how many days the stock reservation is held before it auto-releases if payment never arrives; null means the reservation does not expire.
  • integration_settings.orders.payment_pending.auto_open_on_payment (boolean) — automatically open a held order as soon as its payment is confirmed.
  • Per-payment-method overrides are available via the Payment Method Mappings endpoints (unpaid_disposition).

Accounting sync trigger (integration_settings.accounting.sales_order_sync_trigger, string: always or when_paid, nullable) — when this store's sales orders are pushed to the connected accounting provider: always (default — the invoice is pushed once the order is confirmed) or when_paid (unpaid orders stay out of the ledger until payment arrives). Per-payment-method overrides are available via the Payment Method Mappings endpoints (accounting_sync).

Does not re-probe Magento — use the test-connection endpoint first if the merchant changed base_url or access_token.

Request

Responses

OK

Response Headers
    Content-Type