DEV Community

GuGuData
GuGuData

Posted on

通用条形码生成 API 接口

通用条形码生成 API 接口

通用条形码生成接口。

gugudata_api_cover

1. 产品功能

  • 支持 40 种条形码;
  • 支持生成自定义的条码尺寸;
  • 直接生成条码图片 CDN 链接,方便引用;
  • 全接口支持 HTTPS(TLS v1.0 / v1.1 / v1.2 / v1.3);
  • 全面兼容 Apple ATS;
  • 全国多节点 CDN 部署;
  • 接口极速响应,多台服务器构建 API 接口负载均衡。

2. API 文档

API 详情地址: https://www.gugudata.com/api/details/barcode

接口请求地址: https://api.gugudata.com/barcode/barcode

返回格式: application/json; charset=utf-8

请求方式: GET

请求协议: HTTPS

请求示例: https://api.gugudata.com/barcode/barcode?appkey=YOUR_APPKEY
&type=YOUR_VALUE
&content=YOUR_VALUE
&width=YOUR_VALUE
&height=YOUR_VALUE

接口测试: https://api.gugudata.com/barcode/barcode/demo

  1. 请求参数
参数名 参数类型 是否必须 默认值 备注
appkey string YOUR_APPKEY 付费后获取的 APPKEY
type string YOUR_VALUE 条码类型,可选项: UNSPECIFIED\
content string YOUR_VALUE 条码内容,注意对应条码的长度规范
width int YOUR_VALUE 条码宽度像素值
height int YOUR_VALUE 条码高度像素值

4. 返回参数

参数名 参数类型 备注
DataStatus.StatusCode int 接口返回状态码
DataStatus.StatusDescription string 接口返回状态说明
DataStatus.ResponseDateTime string 接口数据返回时间
DataStatus.DataTotalCount int 此条件下的总数据量,一般用于分页计算
Data.Content string 条形码类型:条形码内容
Data.Url string 生成的条形码 CDN URL 路径

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay