LeadSquared Developer Centre

ON THIS PAGE

Get Landing Pages


Returns landing pages based on the following parameters –

  • “SearchText”
  • “StatusCode”
  • “StatusReason”
  • “CreatedBy”

You must pass at least one search parameter in the JSON body. If you pass the “StatusCode” you must pass “StatusReason” as well (as explained in the parameter description below).

Note: You can pass the optional parameter “Type” as “-1” to retrieve all landing pages, “1” to retrieve normal landing pages and “2” to retrieve responsive landing pages. If you don’t pass this parameter, the API will return responsive landing pages only.

API URL

URL
Icon
POST https://{host}/v2/LandingPage.svc/Retrieve?accessKey=AccessKey&secretKey=SecretKey

Request

Content-Type: application/json
JSON Body/Payload Icon
{
    "SearchParameters": {
        "SearchText": "",
        "StatusCode": 1,
        "StatusReason": 1,
        "CreatedBy": "d2022121-6670-11e4-a56d-22000b5382a8",
        "ShowHidden": "true"
    },
    "Sorting": {
        "ColumnName": "ModifiedOn",
        "Direction": "1"
    },
    "Paging": {
        "PageIndex": "0",
        "PageSize": "100"
    }
}

Request Parameters

Parameter Description
SearchText

Search for one or more landing pages using “SearchText” keywords.

StatusCode

Use a combination of status code and status reason to retrieve landing pages –

Landing Page StatusCode StatusReason
All -1 -1
Only Published 1 1
Published with changes only 1 2
Draft 0 0
Published with or without changes 1 -1
StatusReason

Use a combination of status code and status reason to retrieve landing pages as shown in the table above.

CreatedBy

The user Id of the user who created the landing page.

ShowHidden

Pass “true” to display the landing page if its hidden. Pass “false” if you don’t want it displayed.

ColumnName

The column on which results will be sorted. For example, if you want results to be shown based on modified date, pass “ModifiedOn”.

Direction

Direction “1” means descending order and “0” means ascending order.

PageIndex

The results matching your criteria may be large. You can fetch the result in blocks of “PageSize” and make multiple calls to the API with increasing values of “PageIndex”.  For example, you can specify “PageIndex”: 1, “PageSize”: 100 for the first call and specify “PageIndex”: 2, “PageSize”: 100 for second call.

PageSize

The results matching your criteria may be large. You can fetch the result in blocks of “PageSize” and make multiple calls to the API with increasing values of “PageIndex”.  For example, you can specify “PageIndex”: 1, “PageSize”: 100 for the first call and specify “PageIndex”: 2, “PageSize”: 100 for second call.

Response

200 OK
Content-Type: application/json
{
    "RecordCount": 1,
    "List": [
        {
            "LandingPageId": "45af12a0-8e1d-11e7-b0ab-02e89b2fb8f4",
            "Name": "Landing Page 01",
            "Description": "",
            "PublishedURL": "http://leadsquared59.viewpage.co/Landing-Page-01"
        }
    ]
}

HTTP Response Codes

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.

On this page

© 2022 by MarketXpander Services Pvt Ltd. All Rights Reserved.