{
    "title": "List tickets reply v1",
    "description": "Returns a list of tickets.",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://localdev/schemas/support/list_tickets_reply_v1.json",
    "type": "object",
    "properties": {
        "ticket_count": {
            "description": "Total amount of tickets found for the user & filter.",
            "type": "integer"
        },
        "pagination": {
            "description": "Information about the pagination settings. If a '..._page' returns null, the page does not exist.",
            "type": "object",
            "properties": {
                "previous_page": {
                    "title": "Optional integer",
                    "description": "An integer or no value at all.",
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "next_page": {
                    "title": "Optional integer",
                    "description": "An integer or no value at all.",
                    "type": [
                        "integer",
                        "null"
                    ]
                },
                "per_page": {
                    "description": "Max amount of tickets per page.",
                    "type": "integer"
                }
            },
            "required": [
                "previous_page",
                "next_page",
                "per_page"
            ]
        },
        "tickets": {
            "description": "List of tickets.",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "requester": {
                        "title": "Support User",
                        "description": "Support user information.",
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "photo": {
                                "description": "Profile picture of author. Can be null.",
                                "type": [
                                    "null",
                                    "object"
                                ],
                                "properties": {
                                    "thumbnail_url": {
                                        "description": "Direct URL to a thumbnail of the file.",
                                        "type": [
                                            "null",
                                            "string"
                                        ]
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Direct url to file."
                                    }
                                }
                            }
                        },
                        "required": [
                            "name",
                            "photo"
                        ]
                    },
                    "created_at": {
                        "title": "Datetime",
                        "description": "Datetime in UTC format YYYY-MM-DDThh:mm:ssZ",
                        "type": "string",
                        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
                    },
                    "updated_at": {
                        "title": "Datetime",
                        "description": "Datetime in UTC format YYYY-MM-DDThh:mm:ssZ",
                        "type": "string",
                        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
                    },
                    "nid": {
                        "title": "Broadband NID",
                        "description": "Carrier or circuit identification. To harmonize the way ordered broadband products are identified.",
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[0-9]{4}[A-Z]{2}[0-9]{5}[0-9A-Z]{4}$"
                    },
                    "status": {
                        "title": "Support Ticket Status",
                        "description": "Enum options:<pre class=\"empty-params-pre\">new|open|pending|solved|closed</pre>. Current status of the ticket.",
                        "type": "string",
                        "enum": [
                            "new",
                            "open",
                            "pending",
                            "solved",
                            "closed"
                        ]
                    },
                    "reference": {
                        "description": "External support reference.",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "subject": {
                        "description": "The title of the ticket.",
                        "type": "string"
                    },
                    "description": {
                        "description": "Opening comment of ticket.",
                        "type": "string"
                    }
                },
                "required": [
                    "requester",
                    "created_at",
                    "updated_at",
                    "status",
                    "subject",
                    "description"
                ]
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "tickets",
        "ticket_count",
        "pagination"
    ]
}