{
  "openapi": "3.1.0",
  "info": {
    "title": "Barcode Generator API",
    "version": "1.0.0",
    "description": "Generate Code 128, EAN, UPC, Code 39, ITF-14, Data Matrix, PDF417 and more as SVG or PNG.\n\nGenerate barcodes in all the common symbologies — Code 128, EAN-13, EAN-8, UPC-A/E, Code 39, ITF-14, ISBN, Data Matrix, PDF417 and more — as SVG or PNG, with control over scale, height, and the human-readable caption.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/barcode.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/barcode-generator"
  },
  "servers": [
    {
      "url": "https://api-barcode.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Utilities",
      "description": "Barcode Generator API belongs to the Utilities category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/barcode": {
      "get": {
        "operationId": "generateBarcode",
        "summary": "Generate Barcode",
        "description": "Generate Barcode endpoint of the Barcode Generator API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/barcode-generator/generate-barcode"
        },
        "parameters": [
          {
            "name": "data",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "ABC-12345"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "svg"
          },
          {
            "name": "height",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "10"
          },
          {
            "name": "includetext",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "3"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "code128"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/symbologies": {
      "get": {
        "operationId": "listSymbologies",
        "summary": "List Symbologies",
        "description": "List Symbologies endpoint of the Barcode Generator API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/barcode-generator/list-symbologies"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "count": 11,
                  "symbologies": [
                    "code128",
                    "code39",
                    "ean13",
                    "ean8",
                    "upca",
                    "upce",
                    "itf14",
                    "isbn",
                    "datamatrix",
                    "pdf417",
                    "qrcode"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}