{
    "openapi": "3.1.0",
    "info": {
        "title": "PAYTAPPS Merchant API",
        "version": "1.0.0",
        "summary": "Hosted merchant checkout, payments, refunds, and signed webhooks.",
        "description": "Server-to-server API authenticated with a timestamped canonical HMAC-SHA256 signature."
    },
    "servers": [
        {
            "url": "https://paytapps.com/api/v1",
            "description": "PRODUCTION server"
        }
    ],
    "tags": [
        {
            "name": "Merchant"
        },
        {
            "name": "Checkout"
        },
        {
            "name": "Payments"
        },
        {
            "name": "Refunds"
        },
        {
            "name": "Webhooks"
        }
    ],
    "security": [
        {
            "PayOfficeKey": [],
            "PayOfficeTimestamp": [],
            "PayOfficeSignature": [],
            "PayOfficeSignatureVersion": []
        }
    ],
    "paths": {
        "/merchant": {
            "get": {
                "summary": "Read merchant account",
                "tags": [
                    "Merchant"
                ],
                "description": "Required scope: `merchant:read`.",
                "responses": {
                    "200": {
                        "description": "Merchant account state",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MerchantAccount"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout": {
            "post": {
                "summary": "Create hosted checkout",
                "tags": [
                    "Checkout"
                ],
                "description": "Required scope: `checkout:create`.",
                "responses": {
                    "201": {
                        "description": "Checkout created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payment"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "description": "Unique operation key reused only when retrying the same request.",
                        "schema": {
                            "type": "string",
                            "maxLength": 80,
                            "pattern": "^[A-Za-z0-9_-]+$"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateCheckout"
                            }
                        }
                    }
                }
            }
        },
        "/payments": {
            "get": {
                "summary": "List merchant payments",
                "tags": [
                    "Payments"
                ],
                "description": "Required scope: `payments:read`.",
                "responses": {
                    "200": {
                        "description": "Paginated payment list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/PaymentList"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter by payment status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "currency",
                        "in": "query",
                        "required": false,
                        "description": "Filter by ISO-style currency code.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search checkout, merchant, client, or transaction reference.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_from",
                        "in": "query",
                        "required": false,
                        "description": "Start date.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "created_to",
                        "in": "query",
                        "required": false,
                        "description": "End date.",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Records per page, up to 100.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ]
            }
        },
        "/payments/{checkout_token}": {
            "parameters": [
                {
                    "name": "checkout_token",
                    "in": "path",
                    "required": true,
                    "description": "Checkout UUID.",
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "get": {
                "summary": "Retrieve payment",
                "tags": [
                    "Payments"
                ],
                "description": "Required scope: `payments:read`.",
                "responses": {
                    "200": {
                        "description": "Payment details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payment"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payments/{checkout_token}/cancel": {
            "parameters": [
                {
                    "name": "checkout_token",
                    "in": "path",
                    "required": true,
                    "description": "Checkout UUID.",
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "post": {
                "summary": "Cancel pending checkout",
                "tags": [
                    "Checkout"
                ],
                "description": "Required scope: `checkout:cancel`.",
                "responses": {
                    "200": {
                        "description": "Checkout cancelled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Payment"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/payments/{checkout_token}/refund": {
            "parameters": [
                {
                    "name": "checkout_token",
                    "in": "path",
                    "required": true,
                    "description": "Checkout UUID.",
                    "schema": {
                        "type": "string"
                    }
                }
            ],
            "post": {
                "summary": "Create payment refund",
                "tags": [
                    "Refunds"
                ],
                "description": "Required scope: `refunds:create`.",
                "responses": {
                    "201": {
                        "description": "Refund created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Refund"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "required": true,
                        "description": "Unique operation key reused only when retrying the same request.",
                        "schema": {
                            "type": "string",
                            "maxLength": 80,
                            "pattern": "^[A-Za-z0-9_-]+$"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CreateRefund"
                            }
                        }
                    }
                }
            }
        },
        "/refunds/{refund_id}": {
            "parameters": [
                {
                    "name": "refund_id",
                    "in": "path",
                    "required": true,
                    "description": "Refund numeric ID.",
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "get": {
                "summary": "Retrieve refund",
                "tags": [
                    "Refunds"
                ],
                "description": "Required scope: `refunds:read`.",
                "responses": {
                    "200": {
                        "description": "Refund details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Refund"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "summary": "List webhook events",
                "tags": [
                    "Webhooks"
                ],
                "description": "Required scope: `webhooks:read`.",
                "responses": {
                    "200": {
                        "description": "Paginated webhook list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookList"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "event",
                        "in": "query",
                        "required": false,
                        "description": "Filter by event name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter by delivery status.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Records per page, up to 100.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ]
            }
        },
        "/webhooks/test": {
            "post": {
                "summary": "Queue test webhook",
                "tags": [
                    "Webhooks"
                ],
                "description": "Required scope: `webhooks:test`.",
                "responses": {
                    "201": {
                        "description": "Test webhook queued or skipped",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEvent"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/{event_id}/retry": {
            "parameters": [
                {
                    "name": "event_id",
                    "in": "path",
                    "required": true,
                    "description": "Webhook event numeric ID.",
                    "schema": {
                        "type": "integer"
                    }
                }
            ],
            "post": {
                "summary": "Retry webhook",
                "tags": [
                    "Webhooks"
                ],
                "description": "Required scope: `webhooks:retry`.",
                "responses": {
                    "200": {
                        "description": "Webhook retry result",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/WebhookEvent"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "The request was invalid or could not be authorized.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "PayOfficeKey": {
                "type": "apiKey",
                "in": "header",
                "name": "X-PayOffice-Key"
            },
            "PayOfficeTimestamp": {
                "type": "apiKey",
                "in": "header",
                "name": "X-PayOffice-Timestamp"
            },
            "PayOfficeSignature": {
                "type": "apiKey",
                "in": "header",
                "name": "X-PayOffice-Signature"
            },
            "PayOfficeSignatureVersion": {
                "type": "apiKey",
                "in": "header",
                "name": "X-PayOffice-Signature-Version"
            }
        },
        "schemas": {
            "Money": {
                "type": "string",
                "pattern": "^\\d+(\\.\\d{1,8})?$"
            },
            "Customer": {
                "type": [
                    "object",
                    "null"
                ],
                "properties": {
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email"
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            },
            "LineItem": {
                "type": "object",
                "required": [
                    "name",
                    "quantity",
                    "unit_amount"
                ],
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "sku": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "unit_amount": {
                        "$ref": "#/components/schemas/Money"
                    }
                }
            },
            "CreateCheckout": {
                "type": "object",
                "required": [
                    "amount",
                    "currency"
                ],
                "properties": {
                    "amount": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "currency": {
                        "type": "string",
                        "examples": [
                            "USD"
                        ]
                    },
                    "merchant_reference": {
                        "type": "string"
                    },
                    "client_reference_id": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "customer": {
                        "$ref": "#/components/schemas/Customer"
                    },
                    "line_items": {
                        "type": "array",
                        "maxItems": 50,
                        "items": {
                            "$ref": "#/components/schemas/LineItem"
                        }
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "return_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "cancel_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "Payment": {
                "type": "object",
                "required": [
                    "checkout_token",
                    "status",
                    "amount",
                    "currency",
                    "checkout_url"
                ],
                "properties": {
                    "object": {
                        "type": "string",
                        "const": "merchant_payment"
                    },
                    "checkout_token": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "completed",
                            "partially_refunded",
                            "refunded",
                            "cancelled",
                            "expired"
                        ]
                    },
                    "amount": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "merchant_reference": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "client_reference_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "checkout_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "receipt_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri"
                    },
                    "transaction_reference": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "payer_fee": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Money"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "processing_fee": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Money"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "net_amount": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Money"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "customer": {
                        "$ref": "#/components/schemas/Customer"
                    },
                    "line_items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/LineItem"
                        }
                    },
                    "total_refunded": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "remaining_refundable": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "PaymentList": {
                "type": "object",
                "properties": {
                    "object": {
                        "type": "string",
                        "const": "list"
                    },
                    "data": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "checkout_token",
                                "status",
                                "amount",
                                "currency",
                                "checkout_url"
                            ],
                            "properties": {
                                "object": {
                                    "type": "string",
                                    "const": "merchant_payment"
                                },
                                "checkout_token": {
                                    "type": "string",
                                    "format": "uuid"
                                },
                                "status": {
                                    "type": "string",
                                    "enum": [
                                        "pending",
                                        "completed",
                                        "partially_refunded",
                                        "refunded",
                                        "cancelled",
                                        "expired"
                                    ]
                                },
                                "amount": {
                                    "$ref": "#/components/schemas/Money"
                                },
                                "currency": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "merchant_reference": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "client_reference_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "checkout_url": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "receipt_url": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "uri"
                                },
                                "transaction_reference": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "payer_fee": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/Money"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "processing_fee": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/Money"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "net_amount": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/Money"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "customer": {
                                    "$ref": "#/components/schemas/Customer"
                                },
                                "line_items": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/LineItem"
                                    }
                                },
                                "total_refunded": {
                                    "$ref": "#/components/schemas/Money"
                                },
                                "remaining_refundable": {
                                    "$ref": "#/components/schemas/Money"
                                },
                                "expires_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time"
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/Pagination"
                    },
                    "links": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    "request_id": {
                        "type": "string",
                        "format": "uuid"
                    }
                }
            },
            "CreateRefund": {
                "type": "object",
                "properties": {
                    "amount": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "reason": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "metadata": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "Refund": {
                "type": "object",
                "required": [
                    "refund_id",
                    "checkout_token",
                    "amount",
                    "currency",
                    "status"
                ],
                "properties": {
                    "object": {
                        "type": "string",
                        "const": "merchant_refund"
                    },
                    "refund_id": {
                        "type": "integer"
                    },
                    "checkout_token": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "payment_status": {
                        "type": "string"
                    },
                    "amount": {
                        "$ref": "#/components/schemas/Money"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "reason": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "transaction_reference": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "payer_fee": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Money"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "processing_fee": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Money"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "net_amount": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Money"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "idempotency_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "MerchantAccount": {
                "type": "object",
                "properties": {
                    "object": {
                        "type": "string",
                        "const": "merchant_account"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "business_name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "mode": {
                        "type": "string",
                        "enum": [
                            "test",
                            "live"
                        ]
                    },
                    "public_key": {
                        "type": "string"
                    },
                    "integration": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "counts": {
                        "type": "object",
                        "additionalProperties": true
                    }
                }
            },
            "WebhookEvent": {
                "type": "object",
                "properties": {
                    "object": {
                        "type": "string",
                        "const": "webhook_event"
                    },
                    "id": {
                        "type": "integer"
                    },
                    "event": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "attempts": {
                        "type": "integer"
                    },
                    "max_attempts": {
                        "type": "integer"
                    },
                    "response_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "payload": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "WebhookList": {
                "type": "object",
                "properties": {
                    "object": {
                        "type": "string",
                        "const": "list"
                    },
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/WebhookEvent"
                        }
                    },
                    "meta": {
                        "$ref": "#/components/schemas/Pagination"
                    }
                }
            },
            "Pagination": {
                "type": "object",
                "properties": {
                    "current_page": {
                        "type": "integer"
                    },
                    "per_page": {
                        "type": "integer"
                    },
                    "total": {
                        "type": "integer"
                    },
                    "last_page": {
                        "type": "integer"
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "message"
                ],
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
    }
}