The Vibes Platform supports migrating push tokens that have already been collected by marketers to target their customer. Performing this migration makes the customer's devices immediately addressable for push notifications via the Vibes platform.
Creating an Import Batch
The push token import is processed in batches. Each batch can contain up to and including 1000 push devices. The batch is processed asynchronously, so an immediate response is returned which includes a batch_id for checking on results of import later.
Below is the API for submitting a batch of tokens for migration.
- A 413 error is thrown if there are more than 1000 entries in the batch being imported.
- A 404 error is thrown if the batch_id or app_id is invalid.
Fetching an Import Batch
Using the batch_id in the above response, the API can be used to fetch results of devices being imported within the batch.
Below is the API for fetching the status of one batch of device imports.
Note: It is recommended that a fetch operation is performed at least 15 minutes after the initial import of a batch of devices.
Note: a 404 error is thrown if the batch_id or app_id is invalid.
Fetching a Summary of Imports
A summary of imports can be fetched, which can help in knowing the status of multiple previously submitted import batches at once.
Below is how to fetch that summary.
Note: a 404 error is thrown if the app_id is invalid.
Fetching Status of a Single Device
It is possible to find the status of import of a single device. This involves the use of the push token submitted for import into the Vibes Platform as a key to find the relevant record.
Below is how to fetch the status for a single device.
Note: a 404 is returned if no push token matches the supplied token or the app_id is not valid
Note: As a single device could be submitted as more than one import, the result set is formatted as an array.