@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
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/email
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/wifi
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/contact
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/crypto
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/phone
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/sms
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode/geo
@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)
@errors {400, 415, 422, 424, 500}

@endpoint POST /qrcode
@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)
@errors {400, 415, 422, 424, 500}

@endgroup

@group batch
@endpoint POST /batch/qrcode
@required {items: [map{data!: any, image: map, style: map, size: map, output: map}]}
@optional {output: map{filename: str, format: str}}
@returns(200)
@errors {422, 424, 500}

@endgroup

@group images
@endpoint GET /images
@returns(200)
@errors {500}

@endpoint POST /images
@returns(200) {id: str(uuid4), source: str, size: int, created: str(date-time)}
@errors {422, 500}

@endpoint DELETE /images/{id}
@required {id: str(uuid4)}
@returns(204)
@errors {404, 422, 500}

@endpoint GET /images/{id}
@required {id: str(uuid4)}
@returns(200) {id: str(uuid4), source: str, size: int, created: str(date-time)}
@errors {404, 422, 500}

@endgroup

@end
