Difference between revisions of "Scores"

From Advice Local Wiki
Jump to: navigation, search
(Retrieving scores)
(Retrieving scores)
Line 1: Line 1:
 
== Retrieving scores ==
 
== Retrieving scores ==
If you want to get overview and breakdown scores of a specific client, you can use the following endpoint. It will include also results for specific scoring in Google as well. If you don't see that data you might need to trigger the [[Page Reports#Trigger_a_Report|report again]] to get the new data set.
+
If you want to get overview and breakdown scores of a specific client, you can use the following endpoint. It will include also results for specific scoring in Google as well. If you don't see that data you might need to trigger the [[http://wiki.advicelocal.com/w/Reports#Trigger_a_Report|report again]] to get the new data set.
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
GET https://p.lssdev.com/legacyscores?client=xxxxx&sort=id%20DESC&limit=1
 
GET https://p.lssdev.com/legacyscores?client=xxxxx&sort=id%20DESC&limit=1

Revision as of 14:53, 1 December 2020

Retrieving scores

If you want to get overview and breakdown scores of a specific client, you can use the following endpoint. It will include also results for specific scoring in Google as well. If you don't see that data you might need to trigger the [again] to get the new data set.

GET https://p.lssdev.com/legacyscores?client=xxxxx&sort=id%20DESC&limit=1
content-type: application/json
x-api-token: xxxxxx

By using "&sort=id%20DESC&limit=1" at the end of the URL we make sure you get the most recent score data. Remember that if you just refreshed a client report, you might need to wait a couple of minutes to get a proper score or you might end up using an older score or a partial one that haven't finished.

Example response

{
  "status": 200,
  "success": true,
  "error": null,
  "data": [
    {
      "client": 3780349,
      "partner": 37921,
      "admin": 43854,
      "batch": "5fc668e81c4852001fc05820",
      "id": 3102619,
      "directories": "",
      "data": {
        "baseline": {
          "overview": {
            "visibilityScore": 22,
            "gmbScore": 100,
            "yelpScore": 0,
            "bingScore": 56,
            "directoriesScore": 6
          },
          "scoreBreakdown": {
            "local": {
              "score": 67,
              "listingsPresent": 2,
              "listingsChecked": 3,
              "napConsistency": 52
            },
            "directories": {
              "score": 7,
              "listingsPresent": 3,
              "listingsChecked": 42,
              "napConsistency": 6
            }
          },
          "sources": {
            "google": {
              "scan": {
                "scores": {
                  "listingClaimed": 100,
                  "napConsistency": 100,
                  "reviews": 0,
                  "photos": 0,
                  "hours": 100,
                  "website": 0,
                  "googleScore": 72
                }
              }
            }
          }
        },
        "fulfillment": [],
        "client_id": 3780349,
        "partner_id": 37921
      },
      "score": 22,
      "version": "1.0.9",
      "countRequested": 45,
      "countCompleted": 45,
      "updatedAt": "2020-12-01T21:28:58.000Z",
      "createdAt": "2020-12-01T16:01:44.000Z",
      "isComplete": true
    }
  ],
  "total": 1
}