{
    "openapi": "3.0.0",
    "info": {
        "title": "营业执照识别 - API文档",
        "version": "1.0.0",
        "description": "快速识别不同版式营业执照中的法人代表、社会信用代码、单位名称、注册地址、资本类型、成立日期、执照有效日期、经营范围等信息。当信息项不存在时，该项返回“无”。其中返回参数primary表示单位名称和社会代码是否同时存在，方便后续确认执照单位。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/ocrbusiness\/index": {
            "post": {
                "summary": "营业执照识别",
                "tags": [
                    "营业执照识别"
                ],
                "description": "OCR营业执照识别，返回详细信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "img": {
                                        "type": "string",
                                        "example": "base64",
                                        "description": "图片base64编码（与imgurl参数二选一）"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "imgurl": {
                                        "type": "string",
                                        "example": "https:\/\/www.tianapi.com\/static\/img\/ocr\/business.jpg",
                                        "description": "图片URL地址（支持jpg\/png\/bmp格式）"
                                    }
                                },
                                "required": [
                                    "img",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string",
                                            "example": "北京新浪互联信息服务有限公司",
                                            "description": "单位名称"
                                        },
                                        "docno": {
                                            "type": "string",
                                            "example": "无",
                                            "description": "证件编号"
                                        },
                                        "scope": {
                                            "type": "string",
                                            "example": "从事互联网文化活动;经营演出及经纪业务...",
                                            "description": "经营范围"
                                        },
                                        "enddate": {
                                            "type": "string",
                                            "example": "长期",
                                            "description": "有效期"
                                        },
                                        "primary": {
                                            "type": "boolean",
                                            "example": "true\/false",
                                            "description": "主要信息非无"
                                        },
                                        "regdate": {
                                            "type": "string",
                                            "example": "1999年10月28日",
                                            "description": "注册日期"
                                        },
                                        "regtype": {
                                            "type": "string",
                                            "example": "有限责任公司(自然人投资或控股)",
                                            "description": "类型"
                                        },
                                        "apprdate": {
                                            "type": "string",
                                            "example": "2019年09月19日",
                                            "description": "核准日期"
                                        },
                                        "creditno": {
                                            "type": "string",
                                            "example": "91110108700338416R",
                                            "description": "单位社会信用代码"
                                        },
                                        "regorgan": {
                                            "type": "string",
                                            "example": "北京市海淀区市场监督管理局",
                                            "description": "登记机关"
                                        },
                                        "regaddress": {
                                            "type": "string",
                                            "example": "北京市海淀区东北旺西路中关村软件园二期...",
                                            "description": "注册地址"
                                        },
                                        "regcapital": {
                                            "type": "string",
                                            "example": "82000万元",
                                            "description": "注册资本"
                                        },
                                        "legalperson": {
                                            "type": "string",
                                            "example": "杜红",
                                            "description": "法定代表人"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "name": "北京新浪互联信息服务有限公司",
                                        "docno": "无",
                                        "scope": "从事互联网文化活动;经营演出及经纪业务;设计、制作、代理、发布广告;计算机互联网技术服务;计算机技术培训(不得面向全国招生);计算机系统设计、安装、调试销售计算机、软件及辅助设备、五金交电(不含电动自行车)、机械设备;个人经纪代理服务;利用信息网络经营者乐娱乐产品、演出剧(节)目、表演、动漫。",
                                        "enddate": "长期",
                                        "primary": true,
                                        "regdate": "1999年10月28日",
                                        "regtype": "有限责任公司(自然人投资或控股)",
                                        "apprdate": "2019年09月19日",
                                        "creditno": "91110108700338416R",
                                        "regorgan": "北京市海淀区市场监督管理局",
                                        "regaddress": "北京市海淀区东北旺西路中关村软件园二期(西扩)N-1、N-2地块新浪总部科研楼5层503室",
                                        "regcapital": "82000万元",
                                        "legalperson": "杜红"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}