Superface

Lists

crm/lists@1.0.1
2 providers

Get All Lists

Get all available contact lists

Input
Page
Result
lists
Next page

1.Choose a provider

2.Use GetLists with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('crm/lists@1.0.1');

  // Use the profile
  const result = await profile
    .getUseCase('GetLists')
    .perform({}, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

page
Pagination cursor (obtained from `nextPage`).

Example

{}

Result (object)

lists
listId
Unique ID of the contact list.
name
Name or description of the contact list.
length
Amount of contacts in the contact list.
nextPage
Next page cursor.

Example

{
  "lists": [
    {
      "listId": "foo-bar-1",
      "name": "The first list",
      "length": 42
    }
  ],
  "nextPage": "opaquenextpagetoken"
}

Implementation details

Provider
mock
Use case
GetLists
Author
@superface
Source
Verified