Categories of affiliate programs

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET public_data https://api.admitad.com/categories/
  • offset**
  • limit**
  • campaign***
  • language****
  • order_by*****

Returns the list of affiliate programs categories.*

GET public_data https://api.admitad.com/categories/advcampaign/{id}/
  • offset**
  • limit**
  • language***
  • order_by*****

Returns the list of categories of an affiliate program, where id is the affiliate program identifier.*

GET public_data https://api.admitad.com/categories/{id}/
  • language****

Returns the category of an affiliate program, where id is the category identifier.*

  • * Returns the result in the JSON format.

  • ** Sets skipping and the number of records returned. For example limit=5&offset=2.

  • *** Filter by affiliate programs. For example, campaign=3&campaign=4, where the values are identifiers of affiliate programs.

  • **** The language of the response. For example, language=de, where values are two-letter codes.

  • ***** Sorting order. Possible values:
    • name

    Sign ‘-‘ before the value means inverse sort order. For example, order_by=-name.

Example of use

Example of a request with utility ``curl``:

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/categories/

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/categories/12/

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/categories/advcampaign/6/

Example of the response from the API server in the JSON format:

{
    "results": [
        {
            "name": "Browser",
            "language": "en",
            "parent": {
                "name": "Online Games",
                "language": "en",
                "parent": null,
                "id": 2
            },
            "id": 3
        },
        {
            "name": "Other",
            "language": "en",
            "parent": null,
            "id": 5
        },
        {
            "name": "Client",
            "language": "en",
            "parent": {
                "name": "Online Games",
                "language": "en",
                "parent": null,
                "id": 2
            },
            "id": 4
        }
    ],
    "_meta": {
        "count": 11,
        "limit": 3,
        "offset": 0
    }
}

Description of API server response fields

Name

Description

id

Category ID

name

Name of category

language

Response language

parent

The identifier of the parent category