Skip to content

import_migration_balances

Bring members’ passes, memberships and credit over from the old platform.

Authentication required

Endpoint

endpoint
https://business.sessions.website/@<handle>/api/mcp

When to use it

  • After import_migration_members, with the old platform’s balances export: preview first, map any unmatched product, then import.

  • Again before the switch-over, with a fresher export: it updates what the first run wrote.

Parameters

platformstringrequired

One of: mindbody, marianatek

csvstringrequired

The old platform's balances or memberships export, as CSV text.

productsarrayoptional

Mappings for source products, as the preview lists them: {sourceProduct: "<name>", sourceProductId?: "<id>", product: "<Sessions product id>"}. Saved only when the import writes, so pass the same mappings again with preview: false.

previewbooleanoptional

Default true. Pass false to write the balances.

Returns

Whether it is ready, each source product with its live balances and the Sessions product it maps to, members it couldn’t match, row errors, and on import how many balances were created or updated.

Example

POST this to the endpoint above.

JSON-RPC
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "import_migration_balances",
    "arguments": {
      "platform": "mindbody",
      "csv": "<export>",
      "preview": true
    }
  }
}
content
Preview: nothing written.
Ready to import: no. Unmatched rows: 2. Nothing left to carry: 14.
Source products:
- 10 Class Pack · creditPack · 48/60 live · 212 credit(s), 0 unlimited → NO PRODUCT

What the agent is told

The description the model reads when deciding whether to call this. It is the only thing that decides whether the tool fires at the right moment, so it is worth knowing what it says.

import_migration_balances
Carry members' passes (credits and expiry left), memberships (price and next bill date), gift cards and account credit over from the old platform's export. Previews by default: it matches members and lists each source product with a live balance and the Sessions product it maps to. Nothing is written until every such product has one (map the rest with products) and you call with preview: false. Nothing is charged, and re-running updates instead of granting twice. Import the members first (import_migration_members).

See also