{
    "openapi": "3.1.0",
    "info": {
        "title": "DevEntitle Management API",
        "version": "1.0.0",
        "description": "Manage licences, customers, activations, products, releases and webhooks of one company on DevEntitle. Authenticate with an API token (de_live_\u2026) or a connected app's OAuth access token (de_oat_\u2026). Docs: https://terminal.deventitle.com/docs/api",
        "contact": {
            "email": "support@deventitle.com",
            "url": "https://deventitle.com"
        }
    },
    "servers": [
        {
            "url": "https://terminal.deventitle.com/api/manage/v1"
        }
    ],
    "security": [
        {
            "bearer": []
        }
    ],
    "paths": {
        "/me": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Who am I",
                "description": "Any valid token.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Me"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/products": {
            "get": {
                "tags": [
                    "Products"
                ],
                "summary": "List products",
                "description": "Scope: `products:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Product"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:read"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Products"
                ],
                "summary": "Create a product",
                "description": "Scope: `products:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProductFull"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ProductInput"
                            }
                        }
                    }
                }
            }
        },
        "/products/{slug}": {
            "get": {
                "tags": [
                    "Products"
                ],
                "summary": "Get a product with licence types, prices and published versions",
                "description": "Scope: `products:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/slug"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProductFull"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:read"
                        ]
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Products"
                ],
                "summary": "Update a product (the slug never changes)",
                "description": "Scope: `products:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/slug"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ProductFull"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ProductInput"
                            }
                        }
                    }
                }
            }
        },
        "/products/{slug}/license-types": {
            "get": {
                "tags": [
                    "Products"
                ],
                "summary": "List licence types with prices",
                "description": "Scope: `products:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/slug"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LicenseType"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:read"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Products"
                ],
                "summary": "Create a licence type",
                "description": "Scope: `products:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/slug"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/LicenseType"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LicenseTypeInput"
                            }
                        }
                    }
                }
            }
        },
        "/products/{slug}/license-types/{id}": {
            "patch": {
                "tags": [
                    "Products"
                ],
                "summary": "Update a licence type (existing licences keep their terms; set is_active=false instead of deleting)",
                "description": "Scope: `products:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/slug"
                    },
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/LicenseType"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "products:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LicenseTypeInput"
                            }
                        }
                    }
                }
            }
        },
        "/licenses": {
            "get": {
                "tags": [
                    "Licences"
                ],
                "summary": "List licences",
                "description": "Scope: `licenses:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Product slug"
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "customer_email",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "external_ref",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/License"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:read"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Issue a licence (the key is returned once)",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/IssuedLicense"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LicenseInput"
                            }
                        }
                    }
                }
            }
        },
        "/licenses/lookup": {
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Find a licence by key (in the body)",
                "description": "Scope: `licenses:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:read"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "license_key"
                                ],
                                "properties": {
                                    "license_key": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/licenses/{id}": {
            "get": {
                "tags": [
                    "Licences"
                ],
                "summary": "Get a licence",
                "description": "Scope: `licenses:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:read"
                        ]
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Licences"
                ],
                "summary": "Change the activation limit or notes",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "max_activations": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    },
                                    "notes": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/licenses/{id}/extend": {
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Extend support",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "months": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 120
                                    },
                                    "until": {
                                        "type": "string",
                                        "format": "date"
                                    },
                                    "lifetime": {
                                        "type": "boolean"
                                    },
                                    "reason": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/licenses/{id}/suspend": {
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Suspend (the reason is shown to the buyer)",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "reason"
                                ],
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/licenses/{id}/reinstate": {
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Reinstate",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [],
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/licenses/{id}/revoke": {
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Revoke or mark refunded",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/License"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "reason"
                                ],
                                "properties": {
                                    "reason": {
                                        "type": "string"
                                    },
                                    "refunded": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/licenses/{id}/download-link": {
            "post": {
                "tags": [
                    "Licences"
                ],
                "summary": "Short-lived link to the newest release this licence may download",
                "description": "Scope: `licenses:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/DownloadLink"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "licenses:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "minutes": {
                                        "type": "integer",
                                        "minimum": 5
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/customers": {
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "List customers",
                "description": "Scope: `customers:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Customer"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "customers:read"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Customers"
                ],
                "summary": "Create a customer",
                "description": "Scope: `customers:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Customer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "customers:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CustomerInput"
                            }
                        }
                    }
                }
            }
        },
        "/customers/{id}": {
            "get": {
                "tags": [
                    "Customers"
                ],
                "summary": "Get a customer",
                "description": "Scope: `customers:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Customer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "customers:read"
                        ]
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Customers"
                ],
                "summary": "Update a customer",
                "description": "Scope: `customers:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    },
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Customer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "customers:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CustomerInput"
                            }
                        }
                    }
                }
            }
        },
        "/activations": {
            "get": {
                "tags": [
                    "Activations"
                ],
                "summary": "List activations",
                "description": "Scope: `activations:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "name": "license_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Product slug"
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "is_development",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Activation"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "activations:read"
                        ]
                    }
                ]
            }
        },
        "/activations/{id}": {
            "delete": {
                "tags": [
                    "Activations"
                ],
                "summary": "Remove an activation (frees the slot)",
                "description": "Scope: `activations:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Done"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "activations:write"
                        ]
                    }
                ]
            }
        },
        "/releases": {
            "get": {
                "tags": [
                    "Releases"
                ],
                "summary": "List releases",
                "description": "Scope: `releases:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Product slug"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Release"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "releases:read"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Releases"
                ],
                "summary": "Upload a signed release (multipart)",
                "description": "Scope: `releases:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Release"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "releases:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "$ref": "#/components/schemas/ReleaseUpload"
                            }
                        }
                    }
                }
            }
        },
        "/releases/{id}": {
            "get": {
                "tags": [
                    "Releases"
                ],
                "summary": "Get a release",
                "description": "Scope: `releases:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Release"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "releases:read"
                        ]
                    }
                ]
            }
        },
        "/releases/{id}/publish": {
            "post": {
                "tags": [
                    "Releases"
                ],
                "summary": "Publish a release",
                "description": "Scope: `releases:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Release"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "releases:write"
                        ]
                    }
                ]
            }
        },
        "/orders": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "List storefront orders",
                "description": "Scope: `orders:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Product slug"
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": ""
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "purchase or renewal"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Order"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "orders:read"
                        ]
                    }
                ]
            }
        },
        "/orders/{id}": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "Get an order",
                "description": "Scope: `orders:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Order"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "orders:read"
                        ]
                    }
                ]
            }
        },
        "/webhook-endpoints": {
            "get": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "List webhook endpoints",
                "description": "Scope: `webhooks:read`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/limit"
                    },
                    {
                        "$ref": "#/components/parameters/cursor"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEndpoint"
                                            }
                                        },
                                        "next_cursor": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "has_more": {
                                            "type": "boolean"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "webhooks:read"
                        ]
                    }
                ]
            },
            "post": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Add a webhook endpoint (the secret is returned once)",
                "description": "Scope: `webhooks:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/idempotency"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpoint"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "webhooks:write"
                        ]
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "url",
                                    "events"
                                ],
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri"
                                    },
                                    "events": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "*",
                                                "license.created",
                                                "license.updated",
                                                "license.revoked",
                                                "activation.created",
                                                "activation.removed",
                                                "release.published",
                                                "order.paid",
                                                "order.refunded"
                                            ]
                                        }
                                    },
                                    "description": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhook-endpoints/{id}": {
            "delete": {
                "tags": [
                    "Webhooks"
                ],
                "summary": "Remove a webhook endpoint",
                "description": "Scope: `webhooks:write`",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/id"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "Done"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "security": [
                    {
                        "bearer": []
                    },
                    {
                        "oauth": [
                            "webhooks:write"
                        ]
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer",
                "description": "API token (de_live_\u2026) or OAuth access token (de_oat_\u2026)."
            },
            "oauth": {
                "type": "oauth2",
                "flows": {
                    "authorizationCode": {
                        "authorizationUrl": "https://terminal.deventitle.com/oauth/authorize",
                        "tokenUrl": "https://terminal.deventitle.com/oauth/token",
                        "refreshUrl": "https://terminal.deventitle.com/oauth/token",
                        "scopes": {
                            "products:read": "See products, licence types and prices",
                            "products:write": "Create and change products",
                            "licenses:read": "See licences and look them up by key",
                            "licenses:write": "Issue licences, extend support, suspend, reinstate and revoke them, and create download links",
                            "customers:read": "See customers",
                            "customers:write": "Create and change customers",
                            "activations:read": "See where licences are activated",
                            "activations:write": "Remove activations",
                            "releases:read": "See releases",
                            "releases:write": "Upload and publish releases",
                            "orders:read": "See orders, payments and refunds",
                            "webhooks:read": "See webhook endpoints",
                            "webhooks:write": "Add and remove webhook endpoints"
                        }
                    }
                }
            }
        },
        "parameters": {
            "id": {
                "name": "id",
                "in": "path",
                "required": true,
                "schema": {
                    "type": "integer"
                }
            },
            "slug": {
                "name": "slug",
                "in": "path",
                "required": true,
                "schema": {
                    "type": "string"
                },
                "description": "Product slug"
            },
            "limit": {
                "name": "limit",
                "in": "query",
                "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 25
                }
            },
            "cursor": {
                "name": "cursor",
                "in": "query",
                "schema": {
                    "type": "string"
                },
                "description": "next_cursor from the previous page"
            },
            "idempotency": {
                "name": "Idempotency-Key",
                "in": "header",
                "schema": {
                    "type": "string",
                    "maxLength": 100
                },
                "description": "Repeat a POST safely: the same key and body return the first answer for 24 hours."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "message": {
                                "type": "string"
                            },
                            "details": {
                                "type": "object"
                            }
                        },
                        "required": [
                            "code",
                            "message"
                        ]
                    }
                },
                "required": [
                    "error"
                ]
            },
            "Me": {
                "type": "object",
                "properties": {
                    "vendor": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "status": {
                                "type": "string"
                            }
                        }
                    },
                    "caller": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "api_token",
                                    "connected_app"
                                ]
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "scopes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "Customer": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "company": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "tax_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address": {
                        "type": [
                            "object",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "CustomerInput": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "company": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "minLength": 2,
                        "maxLength": 2
                    },
                    "tax_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "address": {
                        "type": [
                            "object",
                            "null"
                        ]
                    }
                }
            },
            "LicenseType": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "max_activations": {
                        "type": "integer",
                        "description": "0 = unlimited"
                    },
                    "support_months": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "lifetime": {
                        "type": "boolean"
                    },
                    "updates_after_support": {
                        "type": "boolean"
                    },
                    "channel": {
                        "type": "string"
                    },
                    "key_prefix": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "is_public": {
                        "type": "boolean"
                    },
                    "prices": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "purchase",
                                        "renewal"
                                    ]
                                },
                                "currency": {
                                    "type": "string"
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Minor units"
                                }
                            }
                        }
                    }
                }
            },
            "Product": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "active",
                            "retired"
                        ]
                    },
                    "instance_kind": {
                        "type": "string",
                        "enum": [
                            "domain",
                            "machine"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "docs_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "has_signing_key": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "ProductFull": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "active",
                            "retired"
                        ]
                    },
                    "instance_kind": {
                        "type": "string",
                        "enum": [
                            "domain",
                            "machine"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "docs_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "has_signing_key": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "public_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "license_types": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LicenseType"
                        }
                    },
                    "releases": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "version": {
                                    "type": "string"
                                },
                                "channel": {
                                    "type": "string"
                                },
                                "notes": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "released_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time"
                                },
                                "size": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                }
            },
            "LicenseTypeInput": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Required on create"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "key_prefix": {
                        "type": "string",
                        "description": "2\u201310 letters or digits; default: from the product slug"
                    },
                    "max_activations": {
                        "type": "integer",
                        "description": "0 = unlimited; default 1"
                    },
                    "support_months": {
                        "type": "integer",
                        "description": "1\u2013120; default 12"
                    },
                    "lifetime": {
                        "type": "boolean",
                        "description": "Lifetime support and updates (support_months becomes null)"
                    },
                    "updates_after_support": {
                        "type": "boolean"
                    },
                    "channel": {
                        "type": "string",
                        "enum": [
                            "stable",
                            "beta"
                        ]
                    },
                    "is_active": {
                        "type": "boolean",
                        "description": "Inactive types can't be issued; existing licences are not affected"
                    },
                    "is_public": {
                        "type": "boolean",
                        "description": "Shown on the DevEntitle storefront"
                    },
                    "prices": {
                        "type": "array",
                        "description": "When sent, replaces every price of the type",
                        "items": {
                            "type": "object",
                            "properties": {
                                "kind": {
                                    "type": "string",
                                    "enum": [
                                        "purchase",
                                        "renewal"
                                    ]
                                },
                                "currency": {
                                    "type": "string"
                                },
                                "amount": {
                                    "type": "integer",
                                    "description": "Minor units"
                                }
                            },
                            "required": [
                                "kind",
                                "currency",
                                "amount"
                            ]
                        }
                    }
                }
            },
            "ProductInput": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string",
                        "description": "Create only"
                    },
                    "instance_kind": {
                        "type": "string",
                        "enum": [
                            "domain",
                            "machine"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "docs_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": "string"
                    },
                    "public_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "release_emails_enabled": {
                        "type": "boolean"
                    }
                }
            },
            "License": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "key_hint": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "suspended",
                            "revoked",
                            "refunded",
                            "expired"
                        ]
                    },
                    "status_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "product": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "license_type": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "customer": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            },
                            "company": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "channel": {
                        "type": "string"
                    },
                    "max_activations": {
                        "type": "integer"
                    },
                    "max_activations_override": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "supported_until": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "null = lifetime"
                    },
                    "support_active": {
                        "type": "boolean"
                    },
                    "entitled_to_updates": {
                        "type": "boolean"
                    },
                    "source": {
                        "type": "string"
                    },
                    "sales_channel": {
                        "type": "string"
                    },
                    "external_ref": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_amount": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "external_currency": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "issued_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "IssuedLicense": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "key_hint": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "suspended",
                            "revoked",
                            "refunded",
                            "expired"
                        ]
                    },
                    "status_reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "product": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "license_type": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "customer": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            },
                            "company": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        }
                    },
                    "channel": {
                        "type": "string"
                    },
                    "max_activations": {
                        "type": "integer"
                    },
                    "max_activations_override": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "supported_until": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "null = lifetime"
                    },
                    "support_active": {
                        "type": "boolean"
                    },
                    "entitled_to_updates": {
                        "type": "boolean"
                    },
                    "source": {
                        "type": "string"
                    },
                    "sales_channel": {
                        "type": "string"
                    },
                    "external_ref": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_amount": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "external_currency": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "issued_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "revoked_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "key": {
                        "type": "string",
                        "description": "Returned only in this response"
                    }
                }
            },
            "LicenseInput": {
                "type": "object",
                "properties": {
                    "product": {
                        "type": "string",
                        "description": "Product slug"
                    },
                    "license_type_id": {
                        "type": "integer"
                    },
                    "customer_id": {
                        "type": "integer"
                    },
                    "customer": {
                        "type": "object",
                        "properties": {
                            "email": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "company": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "country": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "tax_id": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "address": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        }
                    },
                    "supported_until": {
                        "type": "string",
                        "format": "date"
                    },
                    "lifetime": {
                        "type": "boolean"
                    },
                    "max_activations": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "channel": {
                        "type": "string",
                        "enum": [
                            "stable",
                            "beta"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sales_channel": {
                        "type": "string",
                        "enum": [
                            "own_site",
                            "marketplace",
                            "manual",
                            "other"
                        ]
                    },
                    "external_ref": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_amount": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "external_currency": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "send_email": {
                        "type": "boolean",
                        "default": false
                    }
                },
                "required": [
                    "product",
                    "license_type_id"
                ]
            },
            "Activation": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "license_id": {
                        "type": "integer"
                    },
                    "product": {
                        "type": "string"
                    },
                    "domain": {
                        "type": "string"
                    },
                    "is_development": {
                        "type": "boolean"
                    },
                    "version": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "first_seen_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_seen_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "Release": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "product": {
                        "type": "string"
                    },
                    "version": {
                        "type": "string"
                    },
                    "channel": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "published"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "size": {
                        "type": "integer"
                    },
                    "sha256": {
                        "type": "string"
                    },
                    "signature": {
                        "type": "string"
                    },
                    "download_count": {
                        "type": "integer"
                    },
                    "built_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "ReleaseUpload": {
                "type": "object",
                "properties": {
                    "product": {
                        "type": "string"
                    },
                    "zip": {
                        "type": "string",
                        "contentMediaType": "application/zip"
                    },
                    "manifest": {
                        "type": "string",
                        "description": "The .json file or its text"
                    },
                    "channel": {
                        "type": "string",
                        "enum": [
                            "stable",
                            "beta"
                        ]
                    },
                    "notes": {
                        "type": "string"
                    },
                    "publish": {
                        "type": "boolean"
                    },
                    "notify_customers": {
                        "type": "boolean",
                        "description": "Email buyers who opted in to release emails when it is published (once)"
                    }
                },
                "required": [
                    "product",
                    "zip",
                    "manifest"
                ]
            },
            "DownloadLink": {
                "type": "object",
                "properties": {
                    "version": {
                        "type": "string"
                    },
                    "size": {
                        "type": "integer"
                    },
                    "sha256": {
                        "type": "string"
                    },
                    "signature": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "Order": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "reference": {
                        "type": "string"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "purchase",
                            "renewal"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "paid",
                            "failed",
                            "cancelled",
                            "partially_refunded",
                            "refunded"
                        ]
                    },
                    "product": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            }
                        }
                    },
                    "license_type_id": {
                        "type": "integer"
                    },
                    "license_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "customer_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "email": {
                        "type": "string"
                    },
                    "billing": {
                        "type": "object"
                    },
                    "description": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "subtotal": {
                        "type": "integer"
                    },
                    "discount": {
                        "type": "integer"
                    },
                    "tax": {
                        "type": "integer"
                    },
                    "tax_lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "rate": {
                                    "type": "string",
                                    "description": "e.g. \"20%\""
                                },
                                "amount": {
                                    "type": "integer"
                                }
                            }
                        }
                    },
                    "tax_inclusive": {
                        "type": "boolean",
                        "description": "true: the prices included the tax, so it is part of subtotal"
                    },
                    "reverse_charge": {
                        "type": "boolean",
                        "description": "true: no tax charged, the business buyer accounts for it"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "refunded_amount": {
                        "type": "integer"
                    },
                    "gateway": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "gateway_payment_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "receipt_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "paid_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "refunded_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "WebhookEndpoint": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "secret": {
                        "type": "string",
                        "description": "Returned only when created"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            }
        },
        "responses": {
            "Error": {
                "description": "Error",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        }
    }
}