diff --git a/shared/models/qr_code.yml b/shared/models/qr_code.yml index 038c6332..bb846536 100644 --- a/shared/models/qr_code.yml +++ b/shared/models/qr_code.yml @@ -13,19 +13,19 @@ properties: description: Sets how a QR code is being positioned in the document. Together with this, you should provide one of 'top' or 'bottom', and one of 'left' or 'right'. top: - type: string + type: number description: Vertical distance (in inches) to place QR code from the top. Only allowed if "bottom" isn't provided. right: - type: string + type: number description: Horizontal distance (in inches) to place QR code from the right. Only allowed if "left" isn't provided. left: - type: string + type: number description: Horizontal distance (in inches) to place QR code from the left. Only allowed if "right" isn't provided. bottom: - type: string + type: number description: Vertical distance (in inches) to place QR code from the bottom. Only allowed if "top" isn't provided. redirect_url: @@ -33,9 +33,32 @@ properties: description: The url to redirect the user when a QR code is scanned. The url must start with `https://` width: - type: string + type: number description: The size (in inches) of the QR code with a minimum of 1 inch. All QR codes are generated as a square. pages: type: string description: Specify the pages where the QR code should be stamped in a comma separated format. Your QR code can be printed in the same position on multiple pages. For postcards, the values should either be "front", "back" (for either front or back) or "front,back" (for the QR code to be printed on both sides). For self-mailers, the values should either be "inside", "outside" (for either inside or outside) or "inside,outside" (for the QR code to be printed on both sides). For letters, the values can be specific page numbers ("1", "3"), page number ranges such as "1-3", or a comma separated combination of both ("1,3,5-7"). + + logo: + type: object + description: Allows specifying a logo to be placed over the center of the QR code. Logos must be in PNG or JPEG format and have a maximum file size of 1 MB. + properties: + url: + type: string + description: The public URL of the logo image to be retrieved and placed over the center of the QR code. + pattern: "^https://[-a-zA-Z0-9@:%._+~#=/]{1,256}.(png|jpe?g)$" + + style: + type: object + description: Customizes the appearance of the QR code. + properties: + background_color: + type: string + description: The background color of the QR code in hexadecimal format. For example, `#000000` is black and `#FFFFFF` is white. + pattern: "^#[A-Fa-f0-9]{6}$" + + foreground_color: + type: string + description: The foreground color of the QR code in hexadecimal format. For example, `#000000` is black and `#FFFFFF` is white. + pattern: "^#[A-Fa-f0-9]{6}$"