GET
/api/company/get_list获取公司列表
分页列出分销商(b2b)账户下的开票公司。参数通过 查询字符串 传递。列出的是由该分销商令牌创建的公司(公司登记时记录的分销商令牌与请求头 token 相同)。每项包含该公司专用的 token,字段含义同 /api/company/get_detail(不含税务类别)。
必需请求头
tokenstring | string | 分销商令牌(b2b — 账户必须具有 isb2b=true) |
signstring | string | MD5 签名(path 包含查询字符串) |
timestampstring | string | 秒级 Unix 时间戳 |
查询字符串
page*int | int | 页码(≥ 1) |
page_*int | int | 每页大小(1–20) |
* 必填字段。
示例
# sign = md5(token + path + body + timestamp) # 按接口路径生成的调用模板,占位符替换为实际值 curl -X GET "https://api.tffiscal.com/api/company/get_list" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN"
GET /api/company/get_list?page=1&page_size=10
{
"success": true,
"data": {
"companys": [
{
"company_id": 10234,
"invoice_type": "simples_nacional",
"token": "3f9a1c7e5b2d4f6a8c0e1b3d5f7a9c2e",
"cnpj": "12345678000199",
"name": "Empresa Exemplo LTDA",
"ie": "123456789",
"unit": "matriz",
"email": "contato@empresa.com",
"cep": "01001000",
"address": "Rua Exemplo",
"house_number": "100",
"town": "Centro",
"city": "São Paulo",
"state": "SP",
"cert_file": "",
"cert_pwd": "********",
"serie": 1,
"number": 142
}
],
"page": 1,
"total": 8,
"total_pages": 1
}
}