Generate a barcode image for an order reference, product code, or other compatible value. The response is always PNG or SVG media; there is no Base64 JSON response mode for this operation.The Playground returns an image response for both supported formats. Generated artifacts are real and can consume Development-project credits.
Live Testing Guide: Before using Try it, create a Development project, then enter its Client ID and Client Secret. Configure the relevant provider for that project before sending the request.
Number from 1 to 4; default 2. The generator converts the value to an integer, so use whole numbers when you need predictable bar width.
height
No
Height from 20 to 300 pixels; default 80.
color
No
Six-digit hex colour, with or without #; default black (000000).
privacy_mode
No
Boolean request-level privacy setting. Use X-Privacy-Mode: 1 for the shared privacy control.
C128 is the default general-purpose type. Select a retail, postal, numeric, or constrained variant only when your downstream scanner or standard requires it. AvraAPI validates the public type name, while the barcode renderer enforces any type-specific encoding constraint.
For png, the success body is the barcode image with Content-Type: image/png. For svg, it is SVG media with Content-Type: image/svg+xml. Both return Content-Length, Cache-Control: no-store, Content-Disposition: inline, and X-APIX-Request-ID headers.The response body is not JSON. Save the media response or send it into your own image workflow. If you need a Base64 string, convert the returned media in your backend rather than expecting a separate API response mode.
Error codes
HTTP
error.code
When it happens
What to do
400
http_error
The barcode renderer rejected the supplied data for the selected barcode type.
Use data compatible with the chosen type, or select a different type.
401
unauthorized
Credentials are missing, invalid, inactive, or do not match X-ENV.
Check your backend credential configuration.
402
insufficient_funds
The selected Barcode Generator integration requires credits that are unavailable.
Check the project balance and service configuration.
422
validation_failed
A field is missing or outside its documented input rules.
Correct the body using the field details in the response.
422
provider_selection_failed
No active Barcode Generator integration can be selected for the project environment.
Enable or configure the Barcode Generator integration.
429
rate_limit_exceeded
The configured request limit was reached.
Respect Retry-After when present.
500
internal_error
The generator could not complete unexpectedly.
Retain the request ID and retry only when appropriate.
503
project_paused
The project is paused.
Reactivate the project before retrying.
See the REST API guide for shared credentials, privacy, and response-handling rules.
Playground resources
The generated reference below lists this endpoint’s API standard details: request fields, authorizations, and response schema. The complete integration guide, request and response examples, and endpoint-specific error handling are above.
Authorizations
X-API-KEY
string
header
required
Your Development project's Client ID. Enter your own value in the Documentation Playground.
X-API-SECRET
string
header
required
Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.
Headers
X-ENV
enum<string>
default:development
Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.
Available options:
dev,
development
Accept
string
Requests a JSON response where the selected operation supports JSON.
Example:
"application/json"
X-Privacy-Mode
boolean
default:false
Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.
Example:
true
Body
application/json
data
string
required
Value to encode. The selected barcode type can impose additional content rules.
Required string length: 1 - 80
type
enum<string>
default:C128
Available options:
C128,
C128A,
C128B,
C128C,
EAN13,
EAN8,
UPCA,
UPCE,
C39,
C39+,
I25,
ITF14,
MSI,
POSTNET
format
enum<string>
default:png
Available options:
png,
svg
width_factor
number
default:2
Bar-width multiplier. The implementation converts this value to an integer.
Required range: 1 <= x <= 4
height
integer
default:80
Barcode height in pixels.
Required range: 20 <= x <= 300
color
string
default:000000
Pattern: ^#?[0-9a-fA-F]{6}$
privacy_mode
boolean
Optional request-level privacy setting. X-Privacy-Mode is the universal header override.
Response
Barcode image in the requested format.
The response is of type file.
Last modified on October 1, 2026
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"AvraAPI","description":"Official AvraAPI documentation for backend SDKs, microservice APIs, and Universal Payment Gateway integrations.","colors":{"primary":"#0450ff","light":"#3b82f6","dark":"#3b82f6"},"logo":{"light":"https://mintcdn.com/avraapi/m_1aZj30iaDgR5ok/logo/light.png?fit=max\u0026auto=format\u0026n=m_1aZj30iaDgR5ok\u0026q=85\u0026s=1e1ee08fd48f0cd836a53ca3afbcac7c","dark":"https://mintcdn.com/avraapi/m_1aZj30iaDgR5ok/logo/dark.svg?fit=max\u0026auto=format\u0026n=m_1aZj30iaDgR5ok\u0026q=85\u0026s=99972ab69fe3ea2a8c60fa0292dca4de"},"favicon":"https://mintcdn.com/avraapi/CI9RHnUBtfjY8Z3E/favicon.ico?fit=max\u0026auto=format\u0026n=CI9RHnUBtfjY8Z3E\u0026q=85\u0026s=06fc4ebdc219a34f50b1f571702dc728","api":{"playground":{"display":"interactive","proxy":false,"credentials":false},"examples":{"defaults":"required","languages":["curl","javascript","php"],"prefill":true}},"search":{"prompt":"Search AvraAPI documentation..."},"seo":{"metatags":{"canonical":"https://docs.avraapi.com","robots":"index, follow","googlebot":"index, follow","og:site_name":"AvraAPI","og:locale":"en_US","twitter:card":"summary_large_image","theme-color":"#0450ff"},"organization":{"id":"https://avraapi.com/#organization","name":"AvraAPI","legalName":"Fidex Developers (Pvt) Ltd","url":"https://avraapi.com","logo":"https://docs.avraapi.com/logo/light.png"},"indexing":"navigable"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"avraapi","hasAudioNarration":false,"actualSubdomain":"avraapi","customDomains":["docs.avraapi.com"],"gitSource":{"type":"github","owner":"avraapi","repo":"apix","deployBranch":"feature/universal_payment_gateway","contentDirectory":"docs/mintlify","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6abefef58bbeefc99d396eb1","clientVersion":"0.0.4277","searchFilterCounts":[{"language":"default","tag":"SDK Documentation","count":25},{"language":"default","tag":"Advanced Services","count":23},{"language":"default","tag":"Universal Payment Gateway","count":18},{"language":"default","tag":"REST API Reference","count":16},{"language":"default","tag":"Information \u0026 Guides","count":13},{"language":"default","tag":"Gateway-wise Functions","count":9},{"language":"default","tag":"Laravel SDK (v1.2.0)","count":8},{"language":"default","tag":"Node.js SDK (v1.2.0)","count":8},{"language":"default","tag":"PHP SDK (v1.5.2)","count":8},{"language":"default","tag":"Getting Started","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"info@avraapi.com"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"images/payment-elements/playground.css","href":"/_mintlify/custom/avraapi/c9c507745cea4af5/images/payment-elements/playground.css"}]}
{"page":{"pagePath":"api-reference/utilities/barcode-generate","slug":"/api-reference/utilities/barcode-generate","pageMetadata":{"title":"Generate a barcode","description":"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/barcode/generate","playground":"interactive","href":"/api-reference/utilities/barcode-generate"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Generate a barcode image for an order reference, product code, or other compatible value. The response is always PNG or SVG media; there is no Base64 JSON response mode for this operation.`}),`\n`,_jsx(_components.p,{children:`The Playground returns an image response for both supported formats. Generated artifacts are real and can consume Development-project credits.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Live Testing Guide:`}),` Before using `,_jsx(_components.strong,{children:`Try it`}),`, create a Development project, then enter its `,_jsx(_components.strong,{children:`Client ID`}),` and `,_jsx(_components.strong,{children:`Client Secret`}),`. Configure the relevant provider for that project before sending the request.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`api-endpoint`,children:`API endpoint`}),`\n`,_jsx(CodeBlock,{filename:`POST`,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://avraapi.com/api/v1/utilities/barcode/generate`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Rules`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Value to encode; 1–80 characters. The selected barcode type can impose additional character or length rules.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`C128`}),` (default), `,_jsx(_components.code,{children:`C128A`}),`, `,_jsx(_components.code,{children:`C128B`}),`, `,_jsx(_components.code,{children:`C128C`}),`, `,_jsx(_components.code,{children:`EAN13`}),`, `,_jsx(_components.code,{children:`EAN8`}),`, `,_jsx(_components.code,{children:`UPCA`}),`, `,_jsx(_components.code,{children:`UPCE`}),`, `,_jsx(_components.code,{children:`C39`}),`, `,_jsx(_components.code,{children:`C39+`}),`, `,_jsx(_components.code,{children:`I25`}),`, `,_jsx(_components.code,{children:`ITF14`}),`, `,_jsx(_components.code,{children:`MSI`}),`, or `,_jsx(_components.code,{children:`POSTNET`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`format`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`png`}),` (default) or `,_jsx(_components.code,{children:`svg`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`width_factor`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Number from 1 to 4; default `,_jsx(_components.code,{children:`2`}),`. The generator converts the value to an integer, so use whole numbers when you need predictable bar width.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`height`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Height from 20 to 300 pixels; default `,_jsx(_components.code,{children:`80`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`color`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Six-digit hex colour, with or without `,_jsx(_components.code,{children:`#`}),`; default black (`,_jsx(_components.code,{children:`000000`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`privacy_mode`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Boolean request-level privacy setting. Use `,_jsx(_components.code,{children:`X-Privacy-Mode: 1`}),` for the shared privacy control.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`C128`}),` is the default general-purpose type. Select a retail, postal, numeric, or constrained variant only when your downstream scanner or standard requires it. AvraAPI validates the public type name, while the barcode renderer enforces any type-specific encoding constraint.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-example`,children:`Request example`}),`\n`,_jsx(CodeBlock,{filename:`curl`,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://avraapi.com/api/v1/utilities/barcode/generate\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-KEY: YOUR_PROJECT_CLIENT_ID\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-SECRET: YOUR_PROJECT_CLIENT_SECRET\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-ENV: development\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: image/png\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\": \"ORDER-2026-001\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"C128\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"format\": \"png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"width_factor\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"height\": 80,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"color\": \"0450ff\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` order-barcode.png`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`media-response`,children:`Media response`}),`\n`,_jsxs(_components.p,{children:[`For `,_jsx(_components.code,{children:`png`}),`, the success body is the barcode image with `,_jsx(_components.code,{children:`Content-Type: image/png`}),`. For `,_jsx(_components.code,{children:`svg`}),`, it is SVG media with `,_jsx(_components.code,{children:`Content-Type: image/svg+xml`}),`. Both return `,_jsx(_components.code,{children:`Content-Length`}),`, `,_jsx(_components.code,{children:`Cache-Control: no-store`}),`, `,_jsx(_components.code,{children:`Content-Disposition: inline`}),`, and `,_jsx(_components.code,{children:`X-APIX-Request-ID`}),` headers.`]}),`\n`,_jsx(_components.p,{children:`The response body is not JSON. Save the media response or send it into your own image workflow. If you need a Base64 string, convert the returned media in your backend rather than expecting a separate API response mode.`}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`error.code`})}),_jsx(_components.th,{children:`When it happens`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`http_error`})})}),_jsx(_components.td,{children:`The barcode renderer rejected the supplied data for the selected barcode type.`}),_jsx(_components.td,{children:`Use data compatible with the chosen type, or select a different type.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`unauthorized`})})}),_jsxs(_components.td,{children:[`Credentials are missing, invalid, inactive, or do not match `,_jsx(_components.code,{children:`X-ENV`}),`.`]}),_jsx(_components.td,{children:`Check your backend credential configuration.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`insufficient_funds`})})}),_jsx(_components.td,{children:`The selected Barcode Generator integration requires credits that are unavailable.`}),_jsx(_components.td,{children:`Check the project balance and service configuration.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`validation_failed`})})}),_jsx(_components.td,{children:`A field is missing or outside its documented input rules.`}),_jsx(_components.td,{children:`Correct the body using the field details in the response.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`provider_selection_failed`})})}),_jsx(_components.td,{children:`No active Barcode Generator integration can be selected for the project environment.`}),_jsx(_components.td,{children:`Enable or configure the Barcode Generator integration.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`rate_limit_exceeded`})})}),_jsx(_components.td,{children:`The configured request limit was reached.`}),_jsxs(_components.td,{children:[`Respect `,_jsx(_components.code,{children:`Retry-After`}),` when present.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`internal_error`})})}),_jsx(_components.td,{children:`The generator could not complete unexpectedly.`}),_jsx(_components.td,{children:`Retain the request ID and retry only when appropriate.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`503`})}),_jsx(_components.td,{children:_jsx(`span`,{style:{whiteSpace:`nowrap`},children:_jsx(`code`,{children:`project_paused`})})}),_jsx(_components.td,{children:`The project is paused.`}),_jsx(_components.td,{children:`Reactivate the project before retrying.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/api-reference/rest-api`,children:`REST API guide`}),` for shared credentials, privacy, and response-handling rules.`]}),`\n`,_jsx(Heading,{level:`2`,id:`playground-resources`,children:`Playground resources`}),`\n`,_jsx(_components.p,{children:`The generated reference below lists this endpoint’s API standard details: request fields, authorizations, and response schema. The complete integration guide, request and response examples, and endpoint-specific error handling are above.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate a barcode","description":"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/barcode/generate","playground":"interactive","href":"/api-reference/utilities/barcode-generate"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"API endpoint","slug":"api-endpoint","depth":2,"children":[]},{"title":"Request fields","slug":"request-fields","depth":2,"children":[]},{"title":"Request example","slug":"request-example","depth":2,"children":[]},{"title":"Media response","slug":"media-response","depth":2,"children":[]},{"title":"Error codes","slug":"error-codes","depth":2,"children":[]},{"title":"Playground resources","slug":"playground-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/avraapi/ec3b4381e9d0c5d2/images/payment-elements/playground.js"],"openApiReferenceData":{"operation":{"tags":["Utilities"],"operationId":"generateBarcode","summary":"Generate a barcode","description":"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.","x-avraapi-operation-classification":"interactive-development","parameters":["12023a22-283a-4a82-a959-cfa84639101c","96635f02-496f-4d3d-ba7d-1ee9b549018a","1b339a6e-8873-4d14-85d6-25340cd90173"],"requestBody":"ab08f190-f053-49ca-9480-fad15245a7df","responses":{"200":"79ccea1f-276f-49de-a2bc-46a5a5b94f09","400":"31bee0be-7e8c-465b-a33f-fb160ef7c6d8","401":"4db13e0f-e363-4cb8-a1b6-8da2a4c82554","402":"dfdaecf7-63c9-45a7-aee1-08c15b77083b","422":"e206c841-45dd-4c2a-9134-be1ce8f021e0","429":"dad2919c-373d-4095-9610-681ff4046488","500":"87c9c600-1cfb-4e72-b383-52e97748089f","503":"30d0227b-082c-4247-86f6-8571a6da6275"},"method":"post","type":"path","servers":["13fe6015-747e-4dae-bb20-620e83109976"],"security":["dba1cf01-89ab-45f1-a005-235bcd9b3c8d"],"path":"/utilities/barcode/generate","baseUrlOptions":["https://avraapi.com/api/v1"],"title":"Generate a barcode","codeSamples":[],"requestExampleLanguages":["bash","javascript","php"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.data":"ORDER-2026-001","body.type":"C128","body.format":"png","body.width_factor":2,"body.height":80,"body.color":"0450ff"}],"disableProxy":true},"dependencies":{"parameters":{"12023a22-283a-4a82-a959-cfa84639101c":{"name":"X-ENV","in":"header","required":false,"description":"Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.","schema":{"type":"string","enum":["dev","development"],"default":"development","isRequired":false,"description":"Selects the Development credential environment. The Documentation Playground exposes Development values only; normal backend integrations may use their documented Production credentials outside this tool.","uniqueKey":"","typeLabel":"enum\u003cstring>"}},"96635f02-496f-4d3d-ba7d-1ee9b549018a":{"name":"Accept","in":"header","required":false,"description":"Requests a JSON response where the selected operation supports JSON.","schema":{"type":"string","example":"application/json","isRequired":false,"description":"Requests a JSON response where the selected operation supports JSON.","uniqueKey":"","typeLabel":"string"}},"1b339a6e-8873-4d14-85d6-25340cd90173":{"name":"X-Privacy-Mode","in":"header","required":false,"description":"Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.","schema":{"type":"boolean","default":false,"example":true,"isRequired":false,"description":"Optional privacy override. Turn this on to request that AvraAPI suppress request-payload storage in observability logs for this request.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"string","minLength":1,"maxLength":80,"description":"Value to encode. The selected barcode type can impose additional content rules.","x-default":"ORDER-2026-001","isRequired":true,"uniqueKey":"data","typeLabel":"string"},"type":{"type":"string","enum":["C128","C128A","C128B","C128C","EAN13","EAN8","UPCA","UPCE","C39","C39+","I25","ITF14","MSI","POSTNET"],"default":"C128","x-default":"C128","uniqueKey":"type","typeLabel":"enum\u003cstring>"},"format":{"type":"string","enum":["png","svg"],"default":"png","x-default":"png","uniqueKey":"format","typeLabel":"enum\u003cstring>"},"width_factor":{"type":"number","minimum":1,"maximum":4,"default":2,"x-default":2,"description":"Bar-width multiplier. The implementation converts this value to an integer.","uniqueKey":"width_factor","typeLabel":"number"},"height":{"type":"integer","minimum":20,"maximum":300,"default":80,"x-default":80,"description":"Barcode height in pixels.","uniqueKey":"height","typeLabel":"integer"},"color":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$","default":"000000","x-default":"000000","uniqueKey":"color","typeLabel":"string"},"privacy_mode":{"type":"boolean","description":"Optional request-level privacy setting. X-Privacy-Mode is the universal header override.","uniqueKey":"privacy_mode","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"code_128_png":{"title":"code_128_png","summary":"Code 128 PNG barcode","value":{"data":"ORDER-2026-001","type":"C128","format":"png","width_factor":2,"height":80,"color":"0450ff"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"79ccea1f-276f-49de-a2bc-46a5a5b94f09":{"description":"Barcode image in the requested format.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"image/png":{"schema":{"type":"string","format":"binary","uniqueKey":"","typeLabel":"file"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"},"image/svg+xml":{"schema":{"type":"string","format":"binary","uniqueKey":"","typeLabel":"file"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"}},"exampleType":"generated"},"31bee0be-7e8c-465b-a33f-fb160ef7c6d8":{"description":"The generator could not process an otherwise valid request, such as an unsupported barcode payload or an unreachable QR logo URL.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"http_error":{"title":"http_error","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000025","error":{"code":"http_error","message":"The generator could not process the supplied input."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"4db13e0f-e363-4cb8-a1b6-8da2a4c82554":{"description":"Missing, invalid, inactive, or environment-mismatched project credentials.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"unauthorized":{"title":"unauthorized","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000026","error":{"code":"unauthorized","message":"Project credentials were not accepted."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"dfdaecf7-63c9-45a7-aee1-08c15b77083b":{"description":"The selected Utility integration requires credits that are not available.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"insufficient_funds":{"title":"insufficient_funds","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000027","error":{"code":"insufficient_funds","message":"The selected Utility integration has insufficient credits."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"e206c841-45dd-4c2a-9134-be1ce8f021e0":{"description":"The request body is invalid, or the matching Utility integration cannot be resolved for the project environment.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"validation_failed":{"title":"validation_failed","summary":"Request validation error","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000022","error":{"code":"validation_failed","message":"Validation failed.","details":{"data":["The data field is required."]}}}},"unavailable_provider":{"title":"unavailable_provider","summary":"Utility provider is not available","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000023","error":{"code":"provider_selection_failed","message":"No active generator integration is available for this project environment."}}}},"exampleType":"examples"}},"exampleType":"examples"},"dad2919c-373d-4095-9610-681ff4046488":{"description":"The configured request limit has been reached.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}},"Retry-After":{"description":"Seconds to wait before retrying a rate-limited request.","schema":{"type":"integer","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rate_limit_exceeded":{"title":"rate_limit_exceeded","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000029","error":{"code":"rate_limit_exceeded","message":"The request limit has been reached."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"87c9c600-1cfb-4e72-b383-52e97748089f":{"description":"The Utility operation could not complete unexpectedly.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"internal_error":{"title":"internal_error","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000028","error":{"code":"internal_error","message":"The Utility operation could not complete."},"meta":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"30d0227b-082c-4247-86f6-8571a6da6275":{"description":"The project is paused.","headers":{"X-APIX-Request-ID":{"description":"AvraAPI request identifier for support and troubleshooting.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","required":["success","request_id","error"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"request_id":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"request_id","typeLabel":"string\u003cuuid>"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","uniqueKey":"error.details.additionalProperties.items.[INDEX]","typeLabel":"string"},"uniqueKey":"error.details.additionalProperties","typeLabel":"string[]"},"description":"Field-level validation messages when available.","uniqueKey":"error.details","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","description":"Some infrastructure errors include additional diagnostic metadata.","additionalProperties":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"project_paused":{"title":"project_paused","value":{"success":false,"request_id":"01f00000-0000-4000-8000-000000000024","error":{"code":"project_paused","message":"This project is currently paused."}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"dba1cf01-89ab-45f1-a005-235bcd9b3c8d":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Your Development project's Client ID. Enter your own value in the Documentation Playground.","scopes":[]},"ApiSecretHeader":{"type":"apiKey","in":"header","name":"X-API-SECRET","description":"Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.","scopes":[]}}},"servers":{"13fe6015-747e-4dae-bb20-620e83109976":{"url":"https://avraapi.com/api/v1","description":"AvraAPI REST API v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Your Development project's Client ID. Enter your own value in the Documentation Playground.","scopes":[]},"schema":{"title":"X-API-KEY","type":"string","description":"Your Development project's Client ID. Enter your own value in the Documentation Playground.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyHeader","name":"X-API-KEY"},{"scheme":{"type":"apiKey","in":"header","name":"X-API-SECRET","description":"Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.","scopes":[]},"schema":{"title":"X-API-SECRET","type":"string","description":"Your Development project's Client Secret. Mintlify does not proxy these requests; the browser sends them directly to AvraAPI. Never enter a Production secret in the Documentation Playground.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiSecretHeader","name":"X-API-SECRET"}],"title":"ApiKeyHeader \u0026 ApiSecretHeader"}]},"originalFileLocation":"api-reference/provider-api.openapi.yaml"},"subdomain":"avraapi","siteName":"AvraAPI","title":"Generate a barcode - AvraAPI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T13:37:07.622Z","originalFileLocation":"api-reference/utilities/barcode-generate.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AvraAPI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate a barcode - AvraAPI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AvraAPI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.avraapi.com/api-reference/utilities/barcode-generate\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://avraapi.mintlify.site/_mintlify/api/og/v2?division=Utilities\u0026amp;title=Generate+a+barcode\u0026amp;description=Create+a+PNG+or+SVG+barcode+through+your+configured+AvraAPI+Barcode+Generator.\u0026amp;theme=d9e89b2eca5511b6e2827c0b\u0026amp;signature=79679d6ae19c86923d4db61e780bacf23b432ef2939d1a2c7f71b0e05c46a59a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate a barcode - AvraAPI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://avraapi.mintlify.site/_mintlify/api/og/v2?division=Utilities\u0026amp;title=Generate+a+barcode\u0026amp;description=Create+a+PNG+or+SVG+barcode+through+your+configured+AvraAPI+Barcode+Generator.\u0026amp;theme=d9e89b2eca5511b6e2827c0b\u0026amp;signature=79679d6ae19c86923d4db61e780bacf23b432ef2939d1a2c7f71b0e05c46a59a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/avraapi/hBrlc_a6OxL2-jI-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AvraAPI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0450ff\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#0450ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.avraapi.com/api-reference/utilities/barcode-generate\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/utilities/barcode-generate.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://avraapi.com/#organization\",\"name\":\"AvraAPI\",\"legalName\":\"Fidex Developers (Pvt) Ltd\",\"url\":\"https://avraapi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://docs.avraapi.com/logo/light.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.avraapi.com#website\",\"name\":\"AvraAPI\",\"url\":\"https://docs.avraapi.com\",\"publisher\":{\"@id\":\"https://avraapi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate#webpage\",\"url\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate\",\"name\":\"Generate a barcode\",\"description\":\"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.\",\"dateModified\":\"2026-10-01T13:37:07.622Z\",\"isPartOf\":{\"@id\":\"https://docs.avraapi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Utilities\",\"item\":\"https://docs.avraapi.com/api-reference/utilities/qr-generate\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate a barcode\",\"item\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate#apireference\",\"headline\":\"Generate a barcode\",\"name\":\"Generate a barcode\",\"description\":\"Create a PNG or SVG barcode through your configured AvraAPI Barcode Generator.\",\"url\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate\",\"mainEntityOfPage\":{\"@id\":\"https://docs.avraapi.com/api-reference/utilities/barcode-generate#webpage\"},\"dateModified\":\"2026-10-01T13:37:07.622Z\",\"publisher\":{\"@id\":\"https://avraapi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.avraapi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AvraAPI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AvraAPI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/utilities/barcode-generate.md","siteName":"AvraAPI","nav":{"global":null,"tabs":[{"tab":"Information \u0026 Guides","icon":"book-open","pages":[{"title":"Information \u0026 Guides","href":"/introduction"}]},{"tab":"Advanced Services","icon":"wand-magic-sparkles","pages":[{"title":"Advanced Services","href":"/universal-payment-gateway/overview"}]},{"tab":"SDK Documentation","icon":"code","pages":[{"title":"SDK Documentation","href":"/sdk/overview"}]},{"tab":"REST API Reference","icon":"server","groups":[{"group":"Introduction","pages":[{"title":"API Reference overview","icon":"map","href":"/api-reference/overview"},{"title":"Providers \u0026 Microservices","icon":"book-open","href":"/api-reference/providers-and-microservices"},{"title":"REST API guide","icon":"terminal","href":"/api-reference/rest-api"}]},{"group":"Currencies","pages":[{"title":"CBSL Rates","icon":"landmark","href":"/api-reference/cbsl-rates"},{"title":"List supported currency codes","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/codes","playground":"interactive","href":"/api-reference/currency/list-codes"},{"title":"Get latest rates","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/latest/{base}","playground":"interactive","href":"/api-reference/currency/latest-rates"},{"title":"Get one currency-pair rate","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/pair/{base}/{target}","playground":"interactive","href":"/api-reference/currency/pair-rate"},{"title":"Convert a currency amount","openapi":"api-reference/provider-api.openapi.yaml GET /utility/currency/pair/{base}/{target}/{amount}","playground":"interactive","href":"/api-reference/currency/convert-amount"}]},{"group":"SMS","pages":[{"title":"Check SMS balance","openapi":"api-reference/provider-api.openapi.yaml POST /sms/balance","playground":"interactive","href":"/api-reference/sms/balance"},{"title":"Send an SMS","openapi":"api-reference/provider-api.openapi.yaml POST /sms/send","playground":"interactive","href":"/api-reference/sms/send"}]},{"group":"Security","pages":[{"title":"Check VPN, proxy, and IP risk","openapi":"api-reference/provider-api.openapi.yaml POST /security/vpn-shield","playground":"interactive","href":"/api-reference/security/vpn-shield"},{"title":"Check a disposable email address","openapi":"api-reference/provider-api.openapi.yaml POST /security/burner-email-shield","playground":"interactive","href":"/api-reference/security/burner-email-shield"}]},{"group":"Location","pages":[{"title":"Look up an IP address","openapi":"api-reference/provider-api.openapi.yaml POST /location/lookup","playground":"interactive","href":"/api-reference/location/lookup"}]},{"group":"Utilities","pages":[{"title":"Generate a QR code","description":"Create a PNG, SVG, or Base64 QR code through your configured AvraAPI QR Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/qr/generate","playground":"interactive","href":"/api-reference/utilities/qr-generate"},{"title":"Generate a barcode","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/barcode/generate","playground":"interactive","href":"/api-reference/utilities/barcode-generate"},{"title":"Generate a PDF","description":"Render HTML as a binary PDF or a Base64 JSON response through your configured AvraAPI PDF Generator.","openapi":"api-reference/provider-api.openapi.yaml POST /utilities/pdf/generate","playground":"interactive","href":"/api-reference/utilities/pdf-generate"}]}]}]},"basePath":"","title":"Generate a barcode - AvraAPI","deploymentId":"dpl_BzgRxZmUbhHRoPLkBx1DiVRSyQhV","buildId":"dpl_BzgRxZmUbhHRoPLkBx1DiVRSyQhV","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CtBVvVHw.js","snippetPresets-9Wdj1iJX.js","utils-C7pdn048.js","style-to-object-BY3JEAdk.js","utils-DXrrd362.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-mhMleBMB.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BAjduu_G.js","_Uint8Array-nYbT9fMe.js","isObject-FP1Yky1u.js","ApiExamples-B_rQ3sQn.js","usePlaygroundInputsStore-1axgsDkN.js","shallow-BzGYy3WT.js","isEqual-YKdP-BC9.js","CodeSnippets-Bnk9aSsZ.js","CodeSnippet-CpmxV9bB.js","getApiPlaygroundDisplay-bJKEwju4.js","Page-B3Xw2AdP.js","DynamicMarkdown-hgwwGkem.js","SectionHeading-D_cNZKTp.js","icon-Bt9132nT.js","MethodPill-bMPQiifO.js","getPastedJson-B4rstRhU.js","Check2Icon-D82b8qKN.js","axios-CsQoIw0U.js","Markdown-0sfW67Ea.js","AssistantPageLink-B0docfb1.js","dist-DAabPqRJ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}