# Generated by ShowAPI OpenAPI generator
# source: market/1129
# generated-at: 2026-06-26T06:07:46.543Z
openapi: 3.0.3
info:
  title: 条码生成与识别
  description: 生成各种类型的条码，返回条码生成的图片链接。广泛应用于数据自动录入、零售业结算、图书馆借还书、仓储管理与物流跟踪、质量跟踪管理等业务场景。极大降低运营成本，避免人工出错。
  termsOfService: https://www.showapi.com/helpcenter/view#/4019/2
  version: 1.0.0
servers:
  - url: https://route.showapi.com
paths:
  /1129-4:
    x-pointCode: 4
    x-mode: mapping
    x-read-timeout: 15
    x-connect-timeout: 15
    post:
      summary: 条码识别(Base64)
      description: 根据图片的Base64信息,识别图片中的信息
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ret_code:
                            type: string
                            description: 错误码 0为成功 其他为失败
                          retText:
                            type: string
                            description: 识别后的数据
                        description: 业务返回体
      operationId: 1129_4_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                imgData:
                  type: string
                  minLength: 0
                  maxLength: 10000000
                  description: 图片的base64编码
              required:
                - imgData
  /1129-3:
    x-pointCode: 3
    x-mode: mapping
    x-read-timeout: 25
    x-connect-timeout: 25
    post:
      summary: 条码识别(图片链接)
      description: 根据提供的图片链接地址来识别条码图片中的文字
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          retText:
                            type: string
                            description: 识别后的数据
                          ret_code:
                            type: string
                            description: 错误码:0为成功,其他为失败
                        description: 业务返回体
      operationId: 1129_3_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                imgUrl:
                  type: string
                  description: 图片的链接地址
              required:
                - imgUrl
  /1129-2:
    x-pointCode: 2
    x-mode: mapping
    x-read-timeout: 15
    x-connect-timeout: 15
    post:
      summary: 条码识别(上传图片)
      description: 上传条码查询的图片,返回识别后的文字。可以实现商品信息查询、库存管理、图书管理、医疗药品管理、物流跟踪、食品安全追溯、企业内部管理、会员卡管理、学生管理以及票务管理等多个应用场景的便捷操作。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ret_code:
                            type: string
                            description: 接口调用错误码:0为成功,其他值为失败
                          retText:
                            type: string
                            description: 返回的结果
                        description: 业务返回体
      operationId: 1129_2_POST
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                imgFile:
                  type: string
                  format: binary
                  description: 上传的图片
              required:
                - imgFile
  /1129-1:
    x-pointCode: 1
    x-mode: mapping
    x-read-timeout: 10
    x-connect-timeout: 10
    post:
      summary: 条码生成
      description: 生成各种类型的条码，返回条码生成的图片链接
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          imgUrl:
                            type: string
                            description: 生成的条码链接地址
                          ret_code:
                            type: string
                            description: 接口调用是否成功,0为成功,其他为失败
                        description: 业务返回体
      operationId: 1129_1_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: 需要生成条码的数据
                width:
                  type: string
                  description: 生成图片的宽度(单位为像素),在95-500之间
                height:
                  type: string
                  description: 生成的图片高度(单位为像素),在20-120之间
                formatType:
                  type: string
                  description: 条码的类型,请输入对应的数字:1.EAN_8、2.EAN_13、3.CODE_39、4.CODE_93、5.CODE_128、6.ITF、7.PDF_417、8.RSS_14、9.RSS_EXPANDED、10.UPC_A、11.UPC_E、12.UPC_EAN_EXTENSION、13.CODABAR
              required:
                - content
components:
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: appKey
      description: 从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp
  schemas:
    ShowapiResEnvelope:
      type: object
      description: ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）
      properties:
        showapi_res_code:
          type: integer
          description: API 返回的状态码
        showapi_res_error:
          type: string
          description: API 返回的错误信息
        showapi_res_id:
          type: string
          description: API 请求的唯一标识
        showapi_fee_num:
          type: integer
          description: API 调用计费次数
security:
  - AppKeyAuth: []
externalDocs:
  url: https://www.showapi.com/apiGateway/view/1129?tab=book
x-apiCode: "1129"
x-is-own: false
x-is-op: true
