Unltd AI logo

Getting started


Get Services

GET https://api.unltd.ai/v1/services/

This endpoint retrieves a list of Service entities. The response can be customized using the provided query parameters. Query parameters allow you to filter services by name, service directory related attributes or paginate and sort the response. Depending on the user's role, different results may be returned.

Query Parameters

name

String

The name of the service to filter by.

slug

String

The slug of the service to filter by.

serviceDirectorySlug

String

The slug of the service directory to filter by.

sortBy

String

The attribute to sort by.

limit

Integer

The maximum number of services to return.

page

Integer

The page number to return in the paginated response.

Permissions

This request requires authentication. Depending on the user's role, the API may return different results.

API Example

const fetch = require('node-fetch');

async function fetchApiData() {
  const response = await fetch('https://api.unltd.ai/v1/services/', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer ',
      'Content-Type': 'application/json',
    },
  });

  const data = await response.json();
  console.log(data);
}

fetchApiData();

Response Object

200 success

The response object contains the following properties:

  • results: An array of service entities.
  • page: The current page number.
  • limit: The maximum number of results per page.
  • totalPages: The total number of pages.
  • totalResults: The total number of service entities.
{
  "results": [
    {
      "description": "this is a service description",
      "name": "example_service",
      "slug": "example_service_slug",
      "id": "648b7ddf26014d2229722471"
    }
  ],
  "page": 1,
  "limit": 10,
  "totalPages": 1,
  "totalResults": 1
}