{
    "title": "List transactions request v1",
    "description": "List all broadband transactions. Supports pagination, sorting and filtering.",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://api.nextpertise.nl/schemas/broadband/list_transactions_request_v1.json",
    "type": "object",
    "properties": {
        "pagination": {
            "description": "Used to limit the amount of transactions returned.",
            "type": "object",
            "properties": {
                "per_page": {
                    "description": "Amount of transactions per page (request).",
                    "type": "integer",
                    "maximum": 100,
                    "minimum": 1
                },
                "page": {
                    "description": "The requested page-index, starts at 1.",
                    "type": "integer",
                    "minimum": 1
                }
            },
            "required": [
                "per_page",
                "page"
            ]
        },
        "filter": {
            "description": "Filter transactions. The key is the column and the value is your search.",
            "type": "object",
            "properties": {
                "uuid": {
                    "type": "string"
                },
                "nid": {
                    "type": "string"
                },
                "action": {
                    "type": "string",
                    "enum": [
                        "offer",
                        "new",
                        "migrate",
                        "change",
                        "terminate",
                        "migrate_out"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">offer|new|migrate|change|terminate|migrate_out</pre>. undefined"
                },
                "open": {
                    "type": "boolean"
                },
                "state": {
                    "type": "string",
                    "enum": [
                        "new",
                        "processing",
                        "finished",
                        "cancelled"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">new|processing|finished|cancelled</pre>. undefined"
                },
                "last_updated": {
                    "type": "string"
                },
                "sitesurvey_plan_date": {
                    "type": "string"
                },
                "sitesurvey_date_replan": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "expected_completion_date": {
                    "type": "string"
                },
                "expected_completion_date_is_forecast": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "expected_completion_date_replan": {
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "expected_completion_date_delayed": {
                    "type": "string"
                },
                "permit": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "yes",
                        "no",
                        "n/a",
                        null
                    ]
                },
                "cancel_reason": {
                    "type": "string"
                },
                "cancelled_by": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "enum": [
                        "provider",
                        "customer",
                        null
                    ]
                },
                "ftu_count": {
                    "type": "integer"
                },
                "appointment_url": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "enduser": {
                    "type": "string"
                }
            }
        },
        "sort": {
            "description": "Sort transactions. By default, transactions are sorted in order of creation.",
            "type": "object",
            "properties": {
                "uuid": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "nid": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "action": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "open": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "state": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "last_updated": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "sitesurvey_plan_date": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "sitesurvey_date_replan": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "expected_completion_date": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "expected_completion_date_is_forecast": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "expected_completion_date_replan": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "expected_completion_date_delayed": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "permit": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "cancel_reason": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "cancelled_by": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "ftu_count": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                },
                "appointment_url": {
                    "type": "string",
                    "enum": [
                        "ASC",
                        "DESC"
                    ],
                    "description": "Enum options:<pre class=\"empty-params-pre\">ASC|DESC</pre>. undefined"
                }
            }
        },
        "document": {
            "description": "If given, adds the document. Keys added to the list will be extended in the document. Supported keys: 'enduser'",
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "additionalProperties": false
}