GET Get Available Products

This API retrieves information about all available products and the active plan for the company.

Request URL

GET products/getAvailableProducts

Warning

Make sure to add your API key in Header of the request

Headers

Header

Type

Description

apiKey

string

Your API key for authentication. Required for all requests.

Response

  • A JSON response containing information about available products and the active plan.

{
    "products": {
        "product_name": {
            "added_via": "string",
            "added_via_plan_id": "integer|null",
            "available_limit": "integer",
            "company_id": "integer",
            "expiry_date": "string",
            "last_updated": "string",
            "limit_id": "integer",
            "limit_type": "string",
            "overall_usage": "integer",
            "product_id": "integer",
            "product_name": "string",
            "status": "integer",
            "used_under_limit": "integer"
        }
    },
    "plan": "string"
}

Response Fields

Field

Type

Description

products

object

A dictionary of product names and their details. Products that are active and within limits will contain product information. Products that are inactive or over limit will be null.

products.*

object|null

Product details including product ID, name, limit type, usage counts, and limits. Returns null if the product is not active or over the limit. When not null, contains: added_via, added_via_plan_id, available_limit, company_id, expiry_date, last_updated, limit_id, limit_type, overall_usage, product_id, product_name, status, used_under_limit.

plan

string

The name of the active plan template for the company. Returns "Custom" if no plan template is associated.

Error Responses

In case of an error, the API returns a JSON response with an error message and appropriate HTTP status code.

{
    "error": "Error message"
}

Status Code

Description

500

Internal server error - An unexpected error occurred while processing the request.