API URL
POST /api/v1/qr-code/generate
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
text
required
string
Text payload to encode constrained to 1-4296 characters
format
optional
string
Output image format png or svg
size
optional
number
Output width constrained to 64-2048 pixels
responseType
optional
string
Generate response mode json base64 or binary
Example Request
Code
POST https://datpaq.com/api/v1/qr-code/generate?api_key=your-api-keySuccessful Response
Status
HTML
200 OKBody
Code
{
"success": true,
"format": "png",
"contentType": "image/png",
"data": "iVBORw0KGgo...",
"byteLength": 1234,
"correlationId": "req_abc123"
}Field
Type
success
boolean
format
string
contentType
string
data
string
byteLength
number
found
boolean
text
string
location
object
codes
array
codeCount
number
scanMetadata
object
correlationId
string
status
string
service
string
version
string
error
string
details
array
retryAfter
number
Error Response
Example
Code
400 ValidationError - Joi validation failure for generate or decode payload: Request rejected before successful processing
400 QrServiceError - Known QR generation decode or image parsing failure: Request failed due to service-level validation or decode constraints
401 AuthenticationError - Gateway rejects missing or invalid API key: Authentication failure before business handler
404 NotFound - Unknown endpoint path: No matching route for requested path
429 RateLimitError - Rate limiter threshold exceeded: Too many requests in active window
500 InternalError - Unexpected runtime failure outside known QR service errors: Unhandled internal processing failureLast Updated: May 4, 2026