@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api doqs.dev | PDF filling API
@base https://api.doqs.dev/v1
@version 1.0
@auth ApiKey x-api-key in header
@endpoints 4
@toc pdf-filling(2), pdf-generator(2)

@group pdf-filling
@endpoint POST /pdf-filling/templates/{id}/fill
@desc Fill
@required {id: str}
@optional {data: map=[object Object]}
@returns(200) Successful Response
@errors {4XX: Client Error, 5XX: Server Error}

@endpoint GET /pdf-filling/templates
@desc List
@optional {limit: int=100, offset: int=0}
@returns(200) {results: [map]} # Successful Response
@errors {4XX: Client Error, 5XX: Server Error}

@endgroup

@group pdf-generator
@endpoint POST /pdf-generator/render
@desc Render Pdf
@required {template_html: str}
@optional {header_template: any, footer_template: any, pdf: any=[object Object], presigned_upload: any}
@returns(200) Retrieve the rendered PDF.
@errors {408: Timeout while rendering the PDF, 426: Free tier quota exceeded for the month, 4XX: Client Error, 5XX: Server Error}

@endpoint GET /pdf-generator/submissions
@desc Get Submissions
@optional {limit: int=100, offset: int=0}
@returns(200) {results: [map]} # Successful Response
@errors {4XX: Client Error, 5XX: Server Error}

@endgroup

@end
