List of publisher tickets

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET tickets https://api.admitad.com/tickets/ Request parameters list.

Returns the list of the publisher’s tickets.***

GET tickets https://api.admitad.com/tickets/{id}/

Returns the ticket, where id is the ticket ID.*

  • * Returns the result in the JSON format.

Request parameters list.

Name

Type

Allowed values

status integer
  • 1 (New)

  • 2 (In work)

  • 3 (Waiting)

  • 4 (Closed)

date_start date %d.%m.%Y
date_end date %d.%m.%Y
limit integer limit, offset parameters
offset integer limit, offset parameters

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/tickets/?status=1&limit=1

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

{
    "results": [
        {
            "category": {
                "id": 1,
                "name": "FAQ"
            },
            "status": 1,
            "date_modified": "2014-09-12T12:56:39",
            "text": "<br/>Your message.",
            "plain_text": "Your message.",
            "advcampaign": {},
            "priority": 2,
            "date_created": "2014-09-12T12:56:39",
            "id": 50,
            "subject": "Message theme."
        }
    ],
    "_meta": {
        "count": 4,
        "limit": 1,
        "offset": 0
    }
}

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

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

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

{
    "status": 1,
    "category": {
        "name": "FAQ",
        "id": 1
    },
    "date_modified": "2014-09-12T13:15:39",
    "text": "<br/>Your message.",
    "plain_text": "Your message.",
    "messages": [
        {
            "files": [],
            "text": "<p>Manager answer.</p>",
            "plain_text": "Manager answer.",
            "id": 38,
            "created_by": {
                "id": 124,
                "first_name": "Cersei",
                "last_name": "Lannister"
            },
            "date_created": "2014-09-12T13:16:55"
        },
        {
            "files": [],
            "text": "Your Comment.",
            "plain_text": "Your Comment.",
            "id": 39,
            "created_by": {
                "id": 125,
                "first_name": "Jon",
                "last_name": "Snow"
            },
            "date_created": "2014-09-12T13:16:44"
        },
        {
            "files": [
                {
                    "id": 1,
                    "attach_full_path": "http://admitad.com/public/tickets/files/50/comments/circum.jpeg"
                }
            ],
            "text": "<p>Manager answer.</p>",
            "plain_text": "Manager answer.",
            "id": 40,
            "created_by": {
                "id": 124,
                "first_name": "Cersei",
                "last_name": "Lannister"
            },
            "date_created": "2014-09-12T13:16:32"
        }
    ],
    "priority": 2,
    "date_created": "2014-09-12T12:56:39",
    "id": 50,
    "subject": "Your Theme."
}

Description of API server response fields

Name

Description

id

Ticket ID

subject

Ticket subject

text

Text

plain_text

Plain text

category

Category

advcampaign

Affiliate program

priority

Priority (1 - Low, 2 - Normal, 3 - Urgent)

status

Status (1 - New, 2 - Processing, 3 - Waiting, 4 - Closed)

date_created

Date and time of ticket creation

date_modified

Date and time of last ticket update

messages

Notifications