N-Cloud OCR API Docs

CLOVA OCR Document API

명세서 상세 정리

⚠️ Client와 원활한 소통을 위해 개인적으로 정리했습니다. ⚠️

영수증 버전.png

영수증 요청.png

영수증 요청 헤더.png

이미지 인식 요청 (multipart/from-data)

영수증 이미지 인식 요청.png

{
  "version": "V2",
  "requestId": "string",
  "timestamp": 0,
  "images": [
    {
      "format": "jpg",
      "name": "test 1",
      "data": "data"
    }
  ]
}

영수증 응답

영수증 응답 1.png

영수증 응답 2.png

{
	"version": "V2",
	"requestId": "string",
	"timestamp": 1613984672273,
	"images": [{
		"receipt": {
			"meta": {
				"estimatedLanguage": "ko"
			},
			"result": {
				"storeInfo": {
					"name": {
						"text": "emart everyday",
						"formatted": {
							"value": "emart everyday"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 263.0,
									"y": 96.0
								},
								{
									"x": 390.0,
									"y": 100.0
								},
								{
									"x": 389.0,
									"y": 141.0
								},
								{
									"x": 262.0,
									"y": 137.0
								}
							]
						}]
					},
					"subName": {
						"text": "분당정지2점",
						"formatted": {
							"value": "분당정지2점"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 530.0,
									"y": 102.0
								},
								{
									"x": 611.0,
									"y": 102.0
								},
								{
									"x": 611.0,
									"y": 122.0
								},
								{
									"x": 530.0,
									"y": 122.0
								}
							]
						}]
					},
					"bizNum": {
						"text": "212-81-25544",
						"formatted": {
							"value": "212-81-25544"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 402.0,
									"y": 125.0
								},
								{
									"x": 515.0,
									"y": 124.0
								},
								{
									"x": 515.0,
									"y": 141.0
								},
								{
									"x": 402.0,
									"y": 142.0
								}
							]
						}]
					},
					"addresses": [{
						"text": "경기 성남시분당구 정자일로 120",
						"formatted": {
							"value": "경기 성남시분당구 정자일로 120"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 401.0,
									"y": 144.0
								},
								{
									"x": 432.0,
									"y": 144.0
								},
								{
									"x": 432.0,
									"y": 165.0
								},
								{
									"x": 401.0,
									"y": 165.0
								}
							]
						}]
					}],
					"tel": [{
						"text": "(031)786-1171",
						"formatted": {
							"value": "0317861171"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 569.0,
									"y": 122.0
								},
								{
									"x": 716.0,
									"y": 118.0
								},
								{
									"x": 716.0,
									"y": 140.0
								},
								{
									"x": 570.0,
									"y": 144.0
								}
							]
						}]
					}]
				},
				"paymentInfo": {
					"date": {
						"text": "2020-04-16",
						"formatted": {
							"year": "2020",
							"month": "04",
							"day": "16"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 261.0,
									"y": 256.0
								},
								{
									"x": 432.0,
									"y": 260.0
								},
								{
									"x": 431.0,
									"y": 284.0
								},
								{
									"x": 260.0,
									"y": 280.0
								}
							]
						}]
					},
					"time": {
						"text": "20: 11",
						"formatted": {
							"hour": "20",
							"minute": "11",
							"second": "00"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 437.0,
									"y": 261.0
								},
								{
									"x": 468.0,
									"y": 261.0
								},
								{
									"x": 468.0,
									"y": 279.0
								},
								{
									"x": 437.0,
									"y": 279.0
								}
							]
						}]
					},
					"cardInfo": {
						"company": {
							"text": "신 한",
							"formatted": {
								"value": "신한"
							},
							"boundingPolys": [{
								"vertices": [{
										"x": 309.0,
										"y": 585.0
									},
									{
										"x": 334.0,
										"y": 585.0
									},
									{
										"x": 334.0,
										"y": 610.0
									},
									{
										"x": 309.0,
										"y": 610.0
									}
								]
							}]
						},
						"number": {
							"text": "4221**8666",
							"formatted": {
								"value": "4221**8666"
							},
							"boundingPolys": [{
								"vertices": [{
										"x": 522.0,
										"y": 586.0
									},
									{
										"x": 716.0,
										"y": 592.0
									},
									{
										"x": 716.0,
										"y": 612.0
									},
									{
										"x": 522.0,
										"y": 606.0
									}
								]
							}]
						}
					},
					"confirmNum": {
						"text": "28672931",
						"boundingPolys": [{
							"vertices": [{
									"x": 522.0,
									"y": 586.0
								},
								{
									"x": 716.0,
									"y": 592.0
								},
								{
									"x": 716.0,
									"y": 612.0
								},
								{
									"x": 522.0,
									"y": 606.0
								}
							]
						}]
					}
				},
				"subResults": [{
					"items": [{
						"name": {
							"text": "씨그램 레몬350ml",
							"formatted": {
								"value": "씨그램 레몬350ml"
							},
							"boundingPolys": [{
								"vertices": [{
										"x": 310.0,
										"y": 345.0
									},
									{
										"x": 372.0,
										"y": 345.0
									},
									{
										"x": 372.0,
										"y": 369.0
									},
									{
										"x": 310.0,
										"y": 369.0
									}
								]
							}]
						},
						"count": {
							"text": "2",
							"formatted": {
								"value": "2"
							},
							"boundingPolys": [{
								"vertices": [{
										"x": 601.0,
										"y": 348.0
									},
									{
										"x": 615.0,
										"y": 348.0
									},
									{
										"x": 615.0,
										"y": 365.0
									},
									{
										"x": 601.0,
										"y": 365.0
									}
								]
							}]
						},
						"price": {
							"price": {
								"text": "1,600",
								"formatted": {
									"value": "1600"
								},
								"boundingPolys": [{
									"vertices": [{
											"x": 662.0,
											"y": 347.0
										},
										{
											"x": 716.0,
											"y": 347.0
										},
										{
											"x": 716.0,
											"y": 367.0
										},
										{
											"x": 662.0,
											"y": 367.0
										}
									]
								}]
							},
							"unitPrice": {
								"text": "800",
								"formatted": {
									"value": "800"
								},
								"boundingPolys": [{
									"vertices": [{
											"x": 541.0,
											"y": 347.0
										},
										{
											"x": 577.0,
											"y": 347.0
										},
										{
											"x": 577.0,
											"y": 368.0
										},
										{
											"x": 541.0,
											"y": 368.0
										}
									]
								}]
							}
						}
					}]
				}],
				"totalPrice": {
					"price": {
						"text": "1,600",
						"formatted": {
							"value": "1600"
						},
						"boundingPolys": [{
							"vertices": [{
									"x": 651.0,
									"y": 546.0
								},
								{
									"x": 717.0,
									"y": 548.0
								},
								{
									"x": 717.0,
									"y": 569.0
								},
								{
									"x": 651.0,
									"y": 567.0
								}
							]
						}]
					}
				}
			}
		},
		"uid": "5b9de1f9765448eca574efc1a4231bbe",
		"name": "testV2Demo",
		"inferResult": "SUCCESS",
		"message": "SUCCESS",
		"validationResult": {
			"result": "NO_REQUESTED"
		}
	}]
}