@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api LinQR
@base https://api.linqr.app
@version 2.0
@auth OAuth2 | ApiKey X-RapidAPI-Key in header
@endpoints 14
@toc qrcode(9), batch(1), images(4)

@group qrcode
@endpoint POST /qrcode/text
@desc Text QR Code
@required {data: str}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/email
@desc Email QR Code
@required {data: map{to!: any, cc: any, bcc: any, subject: str, body: str}}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/wifi
@desc WiFi QR Code
@required {data: map{ssid!: str, password: str, security: str, hidden: bool}}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/contact
@desc Contact QR Code
@required {data: any}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/crypto
@desc Cryptocurrency payment QR Code
@required {data: map{currency!: str, address!: str, label: str, amount: any, message: str}}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/phone
@desc Telephone QR Code
@required {data: map{phone!: str}}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/sms
@desc SMS QR Code
@required {data: map{to!: any, message: str}}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode/geo
@desc Geolocation QR Code
@required {data: map{latitude!: any, longitude!: any, format: str}}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endpoint POST /qrcode
@desc Arbitrary data type QR Code
@required {data: any # `data` property allows you to specify the data stored in the QR Code.}
@optional {image: map{uri!: any, modules: bool}, style: map{module: map, inner_eye: any, outer_eye: any, background: map}, size: map{width: int, quiet_zone: int, error_correction: str}, output: map{filename: str, format: str}}
@returns(200) Return a QR Code image
@errors {400: Invalid request, 415: Request Content-Type not supported or not specified, 422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endgroup

@group batch
@endpoint POST /batch/qrcode
@desc QR Code Batch
@required {items: [map{data!: any, image: map, style: map, size: map, output: map}] # `items` property allows you to specify an array of QR Codes to generate. The elements of the array must be valid objects analogous to those required for single code generation.}
@optional {output: map{filename: str, format: str}}
@returns(200) Return an images bundle
@errors {422: Validation Error, 424: Embedded image download error, 500: Internal Server Error}

@endgroup

@group images
@endpoint GET /images
@desc List all images
@returns(200) Successful Response
@errors {500: Internal Server Error}

@endpoint POST /images
@desc Upload image
@returns(200) {id: str(uuid4), source: str, size: int, created: str(date-time)} # Successful Response
@errors {422: Validation Error, 500: Internal Server Error}

@endpoint DELETE /images/{id}
@desc Delete image
@required {id: str(uuid4)}
@returns(204) Successful Response
@errors {404: Not Found, 422: Validation Error, 500: Internal Server Error}

@endpoint GET /images/{id}
@desc List image
@required {id: str(uuid4)}
@returns(200) {id: str(uuid4), source: str, size: int, created: str(date-time)} # Successful Response
@errors {404: Not Found, 422: Validation Error, 500: Internal Server Error}

@endgroup

@end
