Skip to main content

Global Partoo

The Partoo object is available globally when you include the JS SDK in your page:
This object exposes the Partoo.init() method to embed and manage Partoo views inside an iframe.

Partoo.init(divId, options)

Initializes a Partoo App instance by inserting an iframe into the specified DOM element.

Parameters

divId
string
required
ID of the target <div> where the iframe will be rendered.
options
object
Optional configuration object. See Options for details.

Returns

Returns a Page object used to interact with the embedded iframe.

Page

The Page object returned by Partoo.init() provides methods for navigation, authentication, event handling, and more.

Methods

setOptions(options)

Updates the iframe configuration after initialization.
options
object
required
Options object to update the view behavior. See Options.

login(connectionToken)

Authenticates the user and navigates to the defined startPage.
connectionToken
string
required
One-time connection token generated from the Partoo API.

Navigates to a specific page in the Partoo App.
route
string
required
Target page identifier. See Supported Pages.
seedData
object
Deprecated.
additionalParams
object
Page-specific parameters (e.g. businessId, status, etc.).

back()

Navigates to the previous page in iframe history.

forward()

Navigates forward in iframe history (opposite of back()).

on(eventId, callback)

Registers a callback function for a specific event triggered in the Partoo App.
eventId
string
required
ID of the event. See Available callback events.
callback
function
required
Function triggered when the event occurs. Receives event-specific data.

Options

The options parameter is accepted by both Partoo.init() and setOptions():

Configuration Fields

Use setOptions() if you need to update configuration dynamically after initialization.