Difference between revisions of "Groups"

From Advice Local Wiki
Jump to: navigation, search
Line 1: Line 1:
 +
== Get All Groups ==
 +
Get a list of all the groups created for this partner dashboard.
 +
 +
=== API Endpoint ===
 +
<syntaxhighlight lang="html">
 +
https://p.lssdev.com/legacygroups
 +
</syntaxhighlight>
 +
 +
=== Example Request ===
 +
<syntaxhighlight lang="php">
 +
POST /legacygroups HTTP/1.1
 +
Host: p.lssdev.com
 +
x-api-token: YOUR_API_KEY
 +
Content-Type: application/json
 +
 +
 +
{"name":"Test Group"}
 +
</syntaxhighlight>
 +
 +
 +
 +
=== Example Response ===
 +
<syntaxhighlight lang="json">
 +
{
 +
    "status": 200,
 +
    "success": true,
 +
    "error": null,
 +
    "data": [
 +
        {
 +
            "partner": 760,
 +
            "id": 1,
 +
            "name": "Test Group",
 +
            "count": 0,
 +
            "createdAt": "2024-04-08T19:41:00.000Z",
 +
            "updatedAt": "2024-04-08T19:41:00.000Z"
 +
        }
 +
    ],
 +
    "total": 1
 +
}
 +
</syntaxhighlight>
 +
 
== Create a Group ==
 
== Create a Group ==
 
This allows you to start grouping client locations into groups that you manage.
 
This allows you to start grouping client locations into groups that you manage.
Line 19: Line 60:
  
 
"name" is the name of the group you want to create
 
"name" is the name of the group you want to create
 +
 +
=== Example Response ===
 +
<syntaxhighlight lang="json">
 +
{
 +
    "status": 200,
 +
    "success": true,
 +
    "error": null,
 +
    "data": {
 +
        "name": "Test Group",
 +
        "createdAt": "2024-04-08T19:41:00.474Z",
 +
        "updatedAt": "2024-04-08T19:41:00.474Z",
 +
        "partner": 760
 +
    }
 +
}
 +
</syntaxhighlight>
 +
 +
 +
== Updating a Group ==
 +
This allows you to update a group or add location ids to a group.
 +
 +
=== API Endpoint ===
 +
<syntaxhighlight lang="html">
 +
https://p.lssdev.com/legacygroups
 +
</syntaxhighlight>
 +
 +
=== Example Request ===
 +
<syntaxhighlight lang="php">
 +
POST /legacygroups/:id HTTP/1.1
 +
Host: p.lssdev.com
 +
x-api-token: YOUR_API_KEY
 +
Content-Type: application/json
 +
 +
 +
{"name":"Test Group"}
 +
</syntaxhighlight>
 +
 +
"name" is the desired updated name you want to chnage to
  
 
=== Example Response ===
 
=== Example Response ===

Revision as of 12:46, 8 April 2024

Get All Groups

Get a list of all the groups created for this partner dashboard.

API Endpoint

https://p.lssdev.com/legacygroups

Example Request

POST /legacygroups HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json


{"name":"Test Group"}


Example Response

{
    "status": 200,
    "success": true,
    "error": null,
    "data": [
        {
            "partner": 760,
            "id": 1,
            "name": "Test Group",
            "count": 0,
            "createdAt": "2024-04-08T19:41:00.000Z",
            "updatedAt": "2024-04-08T19:41:00.000Z"
        }
    ],
    "total": 1
}

Create a Group

This allows you to start grouping client locations into groups that you manage.

API Endpoint

https://p.lssdev.com/legacygroups

Example Request

POST /legacygroups HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json


{"name":"Test Group"}

"name" is the name of the group you want to create

Example Response

{
    "status": 200,
    "success": true,
    "error": null,
    "data": {
        "name": "Test Group",
        "createdAt": "2024-04-08T19:41:00.474Z",
        "updatedAt": "2024-04-08T19:41:00.474Z",
        "partner": 760
    }
}


Updating a Group

This allows you to update a group or add location ids to a group.

API Endpoint

https://p.lssdev.com/legacygroups

Example Request

POST /legacygroups/:id HTTP/1.1
Host: p.lssdev.com
x-api-token: YOUR_API_KEY
Content-Type: application/json


{"name":"Test Group"}

"name" is the desired updated name you want to chnage to

Example Response

{
    "status": 200,
    "success": true,
    "error": null,
    "data": {
        "name": "Test Group",
        "createdAt": "2024-04-08T19:41:00.474Z",
        "updatedAt": "2024-04-08T19:41:00.474Z",
        "partner": 760
    }
}