Load the static list from REST-API | Community
Skip to main content
May 24, 2017
Question

Load the static list from REST-API

  • May 24, 2017
  • 2 replies
  • 2524 views

Hi Team,

Could you please guide me how to load the contents of the static list created under Database Section with the help of REST-API

how the JSON for the same looks like?

From the referred documents I came to know about this API :- /rest/v1/lists/{listId}/leads.json

Is this the right approach ? If yes then what would be JSON looks like for this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
May 25, 2017

Is this the right approach ?

Yes.

If yes then what would be JSON looks like for this?

Why not GET the endpoint and see for yourself?

Adobe Employee
May 25, 2017

Here is an example that adds two leads to a list.  The listId is 3373.  The leadId's are 318594 and 31895.

==Request==

POST /rest/v1/lists/3373/leads.json

{

   "input":[

      {

         "id": "318594"

      },

      {

         "id": "31895"

      }

   ]

}

==Response==

{

    "requestId": "137a3#15c404678cd",

    "result": [

        {

            "id": 318594,

            "status": "added"

        },

        {

            "id": 31895,

            "status": "skipped",

            "reasons": [

                {

                    "code": "1004",

                    "message": "Lead not found"

                }

            ]

        }

    ],

    "success": true

}