BackEnd๐ŸŒฑ

๊ธฐ์—… ์ •๋ณด๋ฅผ ์ˆ˜์ง‘ํ•˜๋Š” ๋ฐฉ๋ฒ•

dkswnkk 2023. 12. 28. 00:58

๊ณต๊ณต API ์กฐ์‚ฌ

๋จผ์ € ๋‹ค๋ฅธ ์ฑ„์šฉ ํ”Œ๋žซํผ๋“ค์€ ์–ด๋–ค ๋ฐฉ๋ฒ•์œผ๋กœ ๊ธฐ์—… ์ •๋ณด๋ฅผ ์ˆ˜์ง‘ํ•˜๊ณ  ์žˆ๋Š”์ง€ ์กฐ์‚ฌ๋ฅผ ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋Œ€๋ถ€๋ถ„์˜ ํ”Œ๋žซํผ๋“ค์ด ๋ฐ์ดํ„ฐ์˜ ์ถœ์ฒ˜๋ฅผ ๋ช…์‹œํ•ด ๋†“์•„ ์กฐ์‚ฌํ•˜๊ธฐ๋Š” ์ˆ˜์›”ํ–ˆ๋Š”๋ฐ, ์•ฝ 6๊ฐœ์˜ ํ”Œ๋žซํผ์„ ์‚ดํŽด๋ณธ ๊ฒฐ๊ณผ ๋Œ€ํ‘œ์ ์œผ๋กœ ๋‚˜์ด์Šค(NICE), ๊ธˆ์œต๊ฐ๋…์›(FSS), ๊ธˆ์œต์œ„์›ํšŒ(FSC), ๊ทธ๋ฆฌ๊ณ  ๊ตญ๋ฏผ์—ฐ๊ธˆ๊ณต๋‹จ(NPS) ๋“ฑ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ œ๊ณต๋ฐ›๊ณ  ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋” ๋‚˜์•„๊ฐ€ ์ค‘์†Œ๋ฒค์ฒ˜ 24, ์•Œ๋ฆฌ์˜ค, ํด๋ฆฐ์•„์ด ๋“ฑ์—์„œ๋„ ๋ฐ์ดํ„ฐ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.

๊ฐ ๋ฐ์ดํ„ฐ ์ถœ์ฒ˜์˜ ์›น์‚ฌ์ดํŠธ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๊ฐ ๊ณต๊ณต ๋ฐ์ดํ„ฐ๋งˆ๋‹ค ์ œ๊ณตํ•˜๋Š” ์ •๋ณด๊ฐ€ ์„œ๋กœ ์ค‘๋ณต๋˜๋Š” ๋ถ€๋ถ„๋„ ์žˆ์ง€๋งŒ, ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์•„๋ž˜์™€ ๊ฐ™์ด ํŠน์ • ๋ฐ์ดํ„ฐ๋ฅผ ํŠน์ • ์ถœ์ฒ˜์—์„œ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ €๋„ ์•„๋ž˜์˜ ์ถœ์ฒ˜ ๊ทธ๋Œ€๋กœ ํŠน์ • ๋ฐ์ดํ„ฐ๋ฅผ ์ ์šฉํ•˜๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

  • ๋‚˜์ด์Šค(NICE): ๊ธฐ๋ณธ ์ •๋ณด
  • ๊ธˆ์œต๊ฐ๋…์›(FSS): ์žฌ๋ฌด ์ •๋ณด, ์—ฐ๋ด‰ ์ •๋ณด, ์ง์› ์ •๋ณด
  • ๊ธˆ์œต์œ„์›ํšŒ(FSC): ์—ฐ๋ด‰ ์ •๋ณด, ์ง์› ์ •๋ณด
  • ๊ตญ๋ฏผ์—ฐ๊ธˆ๊ณต๋‹จ(NPS): ์ง์› ์ •๋ณด

 

 

๊ณต๊ณต API ํ™œ์šฉ

๊ธฐํš๋‹จ๊ณ„๋งŒ ๋ณด๋ฉด API๋ฅผ ๊ทธ๋Œ€๋กœ ํ˜ธ์ถœํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๊ณ  ๋ณด์—ฌ์ฃผ๊ธฐ๋งŒ ํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์ง€๋งŒ, ์‹ค์ œ ์ ์šฉ ๊ณผ์ •์—์„œ๋Š” ์ƒ๊ฐ๋ณด๋‹ค ์—ฌ๋Ÿฌ ์‹œํ–‰์ฐฉ์˜ค์™€ ๊ณ ๋ฏผ์„ ๊ฒช๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

๊ฐ ๊ณต๊ณต API๋ฅผ ํ•œ ๋ฒˆ์”ฉ ์„ธ๋ฐ€ํ•˜๊ฒŒ ์‚ดํŽด๋ด…์‹œ๋‹ค.

๊ธˆ์œต๊ฐ๋…์›(FSS) ๊ณ ์œ ๋ฒˆํ˜ธ ์กฐํšŒ

๋จผ์ € ๊ธˆ์œต๊ฐ๋…์›(FSS, ์ดํ•˜ '๊ธˆ๊ฐ์›')์—์„œ ์ œ๊ณตํ•˜๋Š” API๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด, ๋ชจ๋“  API ์š”์ฒญ์—์„œ ๊ธˆ๊ฐ์›์—์„œ ์ •์˜ํ•œ ๊ธฐ์—…์˜ ๊ณ ์œ ๋ฒˆํ˜ธ๊ฐ€ ํ•„์ˆ˜ ์š”์ฒญ์ธ์ž๋กœ ๋“ค์–ด๊ฐ€์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๊ณ ์œ ๋ฒˆํ˜ธ์กฐํšŒ API. ํ•„์ˆ˜ ์š”์ฒญ ์ธ์ž์— corp_code(๊ณ ์œ ๋ฒˆํ˜ธ)๊ฐ€ ํฌํ•จ๋˜์–ด์žˆ๋‹ค.

๋ฌธ์ œ๋Š” ๊ธˆ๊ฐ์› API๋ฅผ ํ†ตํ•ด์„œ๋Š” ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด '๊ณ ์œ ๋ฒˆํ˜ธ์กฐํšŒ API' ๋ฐ–์— ์—†๋‹ค๋Š” ์ ์ธ๋ฐ, ๋ช…์„ธ๋ฅผ ๋ณด๋ฉด ๋งค์šฐ ๋ถˆํŽธํ•˜๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น API๋Š” ํŠน์ • ๊ธฐ์—…์— ๋Œ€ํ•œ ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ชจ๋“  ๊ธฐ์—…์˜ ๊ณ ์œ ๋ฒˆํ˜ธ๊ฐ€ ๊ธฐ๋ก๋œ XML ํŒŒ์ผ์„ ์••์ถ•๋œ ZIP ํŒŒ์ผ ํ˜•ํƒœ๋กœ ์ œ๊ณตํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

CORPCODE.xml

์‹ฌ์ง€์–ด ์ด XML ํŒŒ์ผ์—์„œ ๊ณ ์œ ๋ฒˆํ˜ธ์™€ ๋งคํ•‘๋œ ๊ฐ’์ด ์‚ฌ์—…์ž๋“ฑ๋ก๋ฒˆํ˜ธ๋‚˜ ๋ฒ•์ธ๋“ฑ๋ก๋ฒˆํ˜ธ๊ฐ€ ์•„๋‹Œ ๊ธฐ์—…๋ช…์ด๋ผ๋Š” ์ ์ด ๋ฌธ์ œ์ธ๋ฐ, ๊ธฐ์กด์— '(์ฃผ)๋งˆ์ด๋‹ค์Šค์•„์ดํ‹ฐ', '(์œ )๊ตฌ๊ธ€์ฝ”๋ฆฌ์•„' ๋“ฑ๊ณผ ๊ฐ™์€ ํ˜•์‹์œผ๋กœ ๊ธฐ์—…๋ช…์„ ์ €์žฅํ•˜๊ณ  ์žˆ๋‹ค๋ฉด ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์ €์žฅํ•˜๊ธฐ ์œ„ํ•ด ํŒŒ์‹ฑ ๊ณผ์ •์ด ํ•„์š”ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ 'SKํ•˜์ด๋‹‰์Šค'๋ฅผ '์—์Šค์ผ€์ดํ•˜์ด๋‹‰์Šค'์™€ ๊ฐ™์ด ๊ธฐ์—…๋ช…์˜ ์˜๋ฌธ์„ ํ•œ๊ธ€๋กœ ๊ธฐ๋กํ•ด ๋†“์€ ์ผ€์ด์Šค์˜ ๊ฒฝ์šฐ์—๋Š” ์ด๋ฅผ ๋‹ค์‹œ ๋ณ€ํ™˜ํ•˜๋Š” ๊ณผ์ •์ด ์ถ”๊ฐ€๋กœ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

์ด๋Ÿฐ ์ ๋“ค๋กœ ์ธํ•ด ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์ €์žฅํ•˜๋Š” ๊ณผ์ •์ด ์ƒ๋‹นํžˆ ๊นŒ๋‹ค๋กœ์šฐ๋ฉฐ, ๊ธฐ์—…๋ช…์„ ํŒŒ์‹ฑํ•˜๊ณ  ๋ณ€ํ™˜ํ•˜๋Š” ๊ณผ์ •์—์„œ ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ์ผ€์ด์Šค๊นŒ์ง€ ๊ณ ๋ คํ•˜๋‹ค ๋ณด๋ฉด, ํ•ด๋‹น ๊ณ ์œ ๋ฒˆํ˜ธ๊ฐ€ ์ง„์งœ ํ•ด๋‹น ๊ธฐ์—…์— ํ•ด๋‹นํ•˜๋Š” ๋ฒˆํ˜ธ๋กœ ์ €์žฅ๋˜๋Š”์ง€์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ ๋ฌด๊ฒฐ์„ฑ์„ ์˜์‹ฌํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

๊ธฐ์—…๊ฐœํ™ฉ API. ์‘๋‹ต๊ฐ’์— ์‚ฌ์—…์ž๋“ฑ๋ก๋ฒˆํ˜ธ์™€ ๋ฒ•์ธ๋“ฑ๋ก๋ฒˆํ˜ธ๊ฐ€ ์žˆ๋‹ค.

๋ฌด๊ฒฐ์„ฑ์„ ์กฐ๊ธˆ์ด๋‚˜๋งˆ ์ง€ํ‚ค๊ธฐ ์œ„ํ•ด์„œ๋Š” ๊ธฐ์—…๊ฐœํ™ฉ API๋ฅผ ํ†ตํ•ด XMLํŒŒ์ผ์— ์กด์žฌํ•˜๋Š” ๋ชจ๋“  ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํ•œ ๋ฒˆ์”ฉ ํ˜ธ์ถœํ•˜์—ฌ ์‘๋‹ต๊ฐ’์œผ๋กœ ๋‚ด๋ ค์˜ค๋Š” ์‚ฌ์—…์ž๋“ฑ๋ก๋ฒˆํ˜ธ์™€ ๋ฒ•์ธ๋“ฑ๋ก๋ฒˆํ˜ธ๋กœ ๊ต์ฐจ๊ฒ€์ฆ์„ ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ๊ณผ์ •์—์„œ๋„ ๊ตญ๋‚ด๊ธฐ์—…์„ ๊ธฐ์ค€์œผ๋กœ ์‚ฌ์—…์ž ๋“ฑ๋ก๋ฒˆํ˜ธ๊ฐ€ "123456789"์™€ ๊ฐ™์ด 10์ž๋ฆฌ์˜ ์ˆซ์ž๋งŒ ์˜ค๋Š” ๊ฒƒ๋„ ์žˆ๊ณ , "123-45-67890"์™€ ๊ฐ™์ด ํ•˜์ดํฐ(-)์ด ํฌํ•จ๋œ ํ˜•ํƒœ๋กœ ์˜ค๋Š” ๊ฒฝ์šฐ์™€, null์ด๋‚˜ ๋นˆ ๋ฌธ์ž์—ด("")๋กœ ์˜ค๋Š” ๊ฒฝ์šฐ๋„ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋งŽ์€ ์˜ˆ์™ธ์ผ€์ด์Šค๋ฅผ ๊ณ ๋ คํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๊ธˆ๊ฐ์›์˜ ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์–ป๊ธฐ ์œ„ํ•œ ๋˜ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” ๊ธˆ์œต์œ„์›ํšŒ(FSC) API๋ฅผ ํ†ตํ•ด ๋ฒ•์ธ๋“ฑ๋ก๋ฒˆํ˜ธ๋กœ ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์–ป๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์— ๋Œ€ํ•ด์„œ๋Š” ์•„๋ž˜์—์„œ ์„œ์ˆ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

 

๊ธˆ์œต๊ฐ๋…์›(FSS) ์žฌ๋ฌด์ •๋ณด & ์ธ์›์ •๋ณด ์กฐํšŒ

์ด์ œ ๊ณ ์œ ๋ฒˆํ˜ธ๋ฅผ ์–ป์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์žฌ๋ฌด์ •๋ณด์กฐํšŒ API์™€ ์ง์›ํ˜„ํ™ฉ API๋ฅผ ํ†ตํ•ด์„œ ์žฌ๋ฌด์ •๋ณด์™€ ์—ฐ๋ด‰์ •๋ณด ๋“ฑ์„ ์กฐํšŒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด API๋“ค์„ ์‚ฌ์šฉํ•  ๋•Œ๋„ ๋‹ค์–‘ํ•œ ์˜ˆ์™ธ์ผ€์ด์Šค๋“ค์„ ๊ณ ๋ คํ•ด์•ผ ํ•˜๋Š”๋ฐ, ํŠนํžˆ ์ง์›ํ˜„ํ™ฉ API์˜ ๊ฒฝ์šฐ๊ฐ€ ๊ณ ๋ คํ•ด์•ผ ํ•  ์ ๋“ค์ด ๋งŽ์Šต๋‹ˆ๋‹ค.

์ง์›ํ˜„ํ™ฉ API ๋ช…์„ธ.

๋ช…์„ธ ๋ถ€๋ถ„์„ ํ™•์ธ ํ›„, ์‚ผ์„ฑ์ „์ž์˜ ์ง์›ํ˜„ํ™ฉ์„ ์กฐํšŒํ–ˆ์„ ๋•Œ ์‘๋‹ต์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

{
    "status": "000",
    "message": "์ •์ƒ",
    "list": [
        {
            "rcept_no": "20230307000542",
            "corp_cls": "Y",
            "corp_code": "00126380",
            "corp_name": "์‚ผ์„ฑ์ „์ž",
            "sexdstn": "๋‚จ",
            "fo_bbm": "DX",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "38,023",
            "rgllbr_abacpt_labrr_co": "-",
            "cnttk_co": "333",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "38,356",
            "avrg_cnwk_sdytrn": "16.0",
            "fyer_salary_totamt": "-",
            "jan_salary_am": "-",
            "rm": "-"
        },
        {
            "rcept_no": "20230307000542",
            "corp_cls": "Y",
            "corp_code": "00126380",
            "corp_name": "์‚ผ์„ฑ์ „์ž",
            "sexdstn": "์—ฌ",
            "fo_bbm": "DX",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "11,948",
            "rgllbr_abacpt_labrr_co": "223",
            "cnttk_co": "94",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "12,042",
            "avrg_cnwk_sdytrn": "12.8",
            "fyer_salary_totamt": "-",
            "jan_salary_am": "-",
            "rm": "-"
        },
        {
            "rcept_no": "20230307000542",
            "corp_cls": "Y",
            "corp_code": "00126380",
            "corp_name": "์‚ผ์„ฑ์ „์ž",
            "sexdstn": "๋‚จ",
            "fo_bbm": "DS",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "51,079",
            "rgllbr_abacpt_labrr_co": "-",
            "cnttk_co": "126",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "51,205",
            "avrg_cnwk_sdytrn": "10.5",
            "fyer_salary_totamt": "-",
            "jan_salary_am": "-",
            "rm": "-"
        },
        {
            "rcept_no": "20230307000542",
            "corp_cls": "Y",
            "corp_code": "00126380",
            "corp_name": "์‚ผ์„ฑ์ „์ž",
            "sexdstn": "์—ฌ",
            "fo_bbm": "DS",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "19,777",
            "rgllbr_abacpt_labrr_co": "181",
            "cnttk_co": "24",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "19,801",
            "avrg_cnwk_sdytrn": "10.7",
            "fyer_salary_totamt": "-",
            "jan_salary_am": "-",
            "rm": "-"
        },
        {
            "rcept_no": "20230307000542",
            "corp_cls": "Y",
            "corp_code": "00126380",
            "corp_name": "์‚ผ์„ฑ์ „์ž",
            "sexdstn": "๋‚จ",
            "fo_bbm": "์„ฑ๋ณ„ํ•ฉ๊ณ„",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "89,102",
            "rgllbr_abacpt_labrr_co": "-",
            "cnttk_co": "459",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "89,561",
            "avrg_cnwk_sdytrn": "12.9",
            "fyer_salary_totamt": "12,408,336,000,000",
            "jan_salary_am": "143,000,000",
            "rm": "-"
        },
        {
            "rcept_no": "20230307000542",
            "corp_cls": "Y",
            "corp_code": "00126380",
            "corp_name": "์‚ผ์„ฑ์ „์ž",
            "sexdstn": "์—ฌ",
            "fo_bbm": "์„ฑ๋ณ„ํ•ฉ๊ณ„",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "31,725",
            "rgllbr_abacpt_labrr_co": "404",
            "cnttk_co": "118",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "31,843",
            "avrg_cnwk_sdytrn": "11.5",
            "fyer_salary_totamt": "3,189,421,000,000",
            "jan_salary_am": "110,000,000",
            "rm": "-"
        }
    ]
}

์ง์›ํ˜„ํ™ฉ API์˜ ์‘๋‹ต๊ฐ’์„ ์‚ดํŽด๋ณด๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ ๋“ค์„ ๊ณ ๋ คํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  1. ์‚ผ์„ฑ์ „์ž ์ „์ฒด์— ํ•ด๋‹นํ•˜๋Š” ๊ฐ’๋“ค๋งŒ ๋‚˜์˜ค๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, 'fo_bbm'์„ ํ†ตํ•ด ์‚ฌ์—… ๋ถ€๋ฌธ๋ณ„๋กœ ๋‚˜์˜จ๋‹ค.
  2. 'fo_bbm(์‚ฌ์—… ๋ถ€๋ถ„)'์— '์„ฑ๋ณ„ํ•ฉ๊ณ„'๋ผ๋Š” ๊ฐ’์„ ํ†ตํ•ด ์ „์ฒด ๋ถ€๋ฌธ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.
  3. ๋ฐ์ดํ„ฐ๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ '-' ์ฒ˜๋ฆฌ๋˜์–ด ์žˆ๋‹ค.
  4. ์—ฐ๋ด‰ ์ •๋ณด์™€ ๊ฐ™์€ ํŠน์ • ๊ฐ’๋“ค์€ ','๋กœ ์ฒ˜๋ฆฌ๋˜์–ด ์žˆ๋‹ค.

์ „์ฒ˜๋ฆฌ๋Š” ํ–ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ , ์‚ผ์„ฑ์ „์ž ์ „์ฒด์— ํ•ด๋‹นํ•˜๋Š” ์ง์›์˜ ์—ฐ๋ด‰ ์ •๋ณด๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด 'fo_bbm'์ด '์„ฑ๋ณ„ํ•ฉ๊ณ„'์ด๊ณ , 'sexdstn'์ด '๋‚จ'๊ณผ '์—ฌ'์ธ ๊ฒฝ์šฐ๋งŒ ๋ฝ‘์•„๋‚ด์–ด ์•„๋ž˜์˜ ์‹์„ ํ†ตํ•ด ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

(๋‚จ์ž 1์ธ ํ‰๊ท ์—ฐ๋ด‰ * ๋‚จ์ž์ง์›์ˆ˜) + (์—ฌ์ž 1์ธ ํ‰๊ท ์—ฐ๋ด‰ *์—ฌ์ž์ง์›์ˆ˜) / (๋‚จ์ž์ง์›์ˆ˜ + ์—ฌ์ž์ง์›์ˆ˜)

ํ•˜์ง€๋งŒ ์ด๋Ÿฌํ•œ ๋ฐฉ์‹์€ ์‚ผ์„ฑ์ „์ž์™€ ๊ฐ™์ด ์‘๋‹ต๊ฐ’์ด ๋‚ด๋ ค์˜ฌ ๋•Œ๋งŒ ์ ์šฉ๊ฐ€๋Šฅ ํ•œ ๊ฒƒ์œผ๋กœ, ๋‹ค๋ฅธ ๊ธฐ์—…์„ ์กฐํšŒํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‘๋‹ต๊ฐ’์ด ๋‹ค๋ฅด๊ฒŒ ์กฐํšŒ๋ฉ๋‹ˆ๋‹ค.

{
    "status": "000",
    "message": "์ •์ƒ",
    "list": [
        {
            "rcept_no": "20230315001173",
            "corp_cls": "Y",
            "corp_code": "00172291",
            "corp_name": "๋”์กด๋น„์ฆˆ์˜จ",
            "sexdstn": "๋‚จ",
            "fo_bbm": "๋ณธ์‚ฌ",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "1,083",
            "rgllbr_abacpt_labrr_co": "-",
            "cnttk_co": "20",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "1,103",
            "avrg_cnwk_sdytrn": "6๋…„ 2๊ฐœ์›”",
            "fyer_salary_totamt": "61,933,000,000",
            "jan_salary_am": "59,000,000",
            "rm": "-"
        },
        {
            "rcept_no": "20230315001173",
            "corp_cls": "Y",
            "corp_code": "00172291",
            "corp_name": "๋”์กด๋น„์ฆˆ์˜จ",
            "sexdstn": "์—ฌ",
            "fo_bbm": "๋ณธ์‚ฌ",
            "reform_bfe_emp_co_rgllbr": "-",
            "reform_bfe_emp_co_cnttk": "-",
            "reform_bfe_emp_co_etc": "-",
            "rgllbr_co": "631",
            "rgllbr_abacpt_labrr_co": "-",
            "cnttk_co": "24",
            "cnttk_abacpt_labrr_co": "-",
            "sm": "655",
            "avrg_cnwk_sdytrn": "4๋…„ 8๊ฐœ์›”",
            "fyer_salary_totamt": "27,731,000,000",
            "jan_salary_am": "47,000,000",
            "rm": "-"
        }
    ]
}

์‘๋‹ต์„ ๋ณด๋ฉด, ๋ช…์„ธ์™€ ๋‹ฌ๋ฆฌ 'ํ‰๊ท ๊ทผ์†์—ฐ์ˆ˜(avrg_cnwk_sdytrn)'๊ฐ€ 'x๋…„ x๊ฐœ์›”'๋กœ ์‘๋‹ต๋˜๊ฑฐ๋‚˜, 'fo_bbm'๋„ '์„ฑ๋ณ„์ „์ฒด'๊ฐ€ ์•„๋‹ˆ๋ผ '๋ณธ์‚ฌ'๋กœ ํ‘œ๊ธฐ๋˜๋Š” ๋“ฑ ์˜ˆ์ƒ๊ณผ ๋‹ค๋ฅด๊ฒŒ ๋‚˜์˜ต๋‹ˆ๋‹ค.

๋”ฐ๋ผ์„œ ๊ธˆ๊ฐ์›์˜ ๋ฐ์ดํ„ฐ๋ฅผ ํ™œ์šฉํ•  ๋•Œ๋Š” ๋ช…์„ธ์—๋งŒ ์˜์กดํ•˜์—ฌ ๊ฐœ๋ฐœํ•˜์ง€ ์•Š๊ณ , ์‹ค์ œ๋กœ ์—ฌ๋Ÿฌ ์‘๋‹ต๊ฐ’์„ ์ง์ ‘ ํ™•์ธํ•˜์—ฌ ์ด์— ๋”ฐ๋ฅธ ๋‹ค์–‘ํ•œ ์˜ˆ์™ธ ์ผ€์ด์Šค์ฒ˜๋ฆฌ์™€ ๋ฐ์ดํ„ฐ๋ฅผ ์ •์ œํ•œ ํ›„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ๊ธˆ๊ฐ์›์˜ ๊ฒฝ์šฐ ์„œ๋น„์Šค์˜ ์•ˆ์ •์ ์ธ ์šด์˜์„ ์œ„ํ•˜์—ฌ ์ด์šฉํ•œ๋„๊ฐ€ ์กด์žฌํ•˜๋‹ˆ ์ด ๋ถ€๋ถ„๋„ ๊ผญ ์ฐธ๊ณ ํ•ด์„œ ์ง„ํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

 

๊ธˆ์œต์œ„์›ํšŒ(FSC)

๊ธˆ์œต์œ„์›ํšŒ(FSC, ์ดํ•˜ '๊ธˆ์œต์œ„')๋Š” ๊ธˆ๊ฐ์›์˜ ์ƒ์œ„ ์กฐ์ง์œผ๋กœ, ๊ธˆ๊ฐ์›์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ๊ธˆ์œต์œ„์›ํšŒ ์‚ฐํ•˜์˜ ํŠน์ˆ˜๋ฒ•์ธ์ž…๋‹ˆ๋‹ค. ๋ณ„๋„๋กœ ๋ฌธ์„œ์— ๋ช…์‹œ๋˜์–ด ์žˆ์ง€๋Š” ์•Š์ง€๋งŒ, ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ ์กฐํšŒํ•˜์—ฌ ์‚ดํŽด๋ณธ ๊ฒฐ๊ณผ ์—ฐ๋ด‰์ •๋ณด์™€ ๊ฐ™์ด ์–‘์ชฝ์—์„œ ๋™์ผํ•˜๊ฒŒ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ๋ฐ์ดํ„ฐ์˜ ๊ฒฝ์šฐ ๊ธˆ๊ฐ์›์— ์žˆ๋Š” ์ •๋ณด๋Š” ๋Œ€๋ถ€๋ถ„ ๊ธˆ์œต์œ„ API์—์„œ๋„ ์กฐํšŒ๊ฐ€ ๊ฐ€๋Šฅํ–ˆ๊ณ , ๋ฐ˜๋Œ€๋กœ ๊ธˆ์œต์œ„์—์„œ ์กฐํšŒ๋˜๋Š” ์ •๋ณด๋Š” ๊ธˆ๊ฐ์› API๋ฅผ ํ†ตํ•ด ์กฐํšŒ๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ฑฐ๋‚˜ ๋ถˆ๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

์‚ฌ์šฉํ•˜๋ฉด์„œ ๋Š๋‚€ ์ ์€ ๊ธˆ๊ฐ์›๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ƒ๋Œ€์ ์œผ๋กœ ํฐ ๊ทœ๋ชจ์˜ ๊ธฐ์—…์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ์—ˆ๊ณ , ์ž‘์€ ๊ทœ๋ชจ์˜ ๊ธฐ์—…๋“ค์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๋Š” ์ž˜ ์กฐํšŒ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.

๊ธˆ์œต์œ„์˜ ๊ธฐ์—…๊ธฐ๋ณธ์ •๋ณด API๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด, ๋ฒ•์ธ ๋“ฑ๋ก๋ฒˆํ˜ธ๋ฅผ ํ•„์ˆ˜ ์š”์ฒญ๊ฐ’์œผ๋กœ ํ•˜์—ฌ ๊ธฐ์—…์˜ ๊ธฐ๋ณธ ์ •๋ณด์™€ ํ•จ๊ป˜ '๊ธˆ๊ฐ์›์˜ ๊ณ ์œ ๋ฒˆํ˜ธ'์™€ '๊ธฐ์—…1์ธํ‰๊ท ์—ฐ๋ด‰'์„ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

๊ตญ๋ฏผ์—ฐ๊ธˆ๊ณต๋‹จ(NPS)

๊ตญ๋ฏผ์—ฐ๊ธˆ๊ณต๋‹จ(NPS, ์ดํ•˜ '๊ตญ๋ฏผ์—ฐ๊ธˆ') API๋ฅผ ํ™œ์šฉํ•˜๋ฉด, ์›”๋ณ„ ์ง์› ์ •๋ณด(์ด ์ธ์› ์ˆ˜, ์ž…์‚ฌ์ž ์ˆ˜, ํ‡ด์ง์ž ์ˆ˜)๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด๋ฅผ ํ™œ์šฉ๊ฐ€๋Šฅํ•œ ๋ฐ์ดํ„ฐ๋กœ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด์„œ๋Š” ์•ฝ๊ฐ„์˜ ์ „์ฒ˜๋ฆฌ ์ž‘์—…์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๊ตญ๋ฏผ์—ฐ๊ธˆ์—์„œ ์›”๋ณ„ ์ง์› ์ •๋ณด๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด์„œ๋Š” ์•„๋ž˜ ์„ธ API๋ฅผ ์ „๋ถ€ ํ™œ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

  1. ์‚ฌ์—…์žฅ ๊ธฐ๋ณธ์ •๋ณด ์กฐํšŒ(์‹๋ณ„๋ฒˆํ˜ธ)
  2. ์ƒ์„ธ ์ •๋ณด์กฐํšŒ(์ด ์ง์›์ˆ˜)
  3. ๊ธฐ๊ฐ„๋ณ„ ํ˜„ํ™ฉ ์ •๋ณด์กฐํšŒ(์›”๋ณ„ ์ทจ์—…์ž ์ˆ˜, ์›”๋ณ„ ํ‡ด์ง์ž ์ˆ˜)

ํŠนํžˆ, ๊ตญ๋ฏผ์—ฐ๊ธˆ์—์„œ ํŠน์ • ๊ธฐ์—…์˜ ์ƒ์„ธ ์ •๋ณด์™€ ๊ธฐ๊ฐ„๋ณ„ ํ˜„ํ™ฉ ์ •๋ณด๋ฅผ ์–ป๊ธฐ ์œ„ํ•ด์„ , ๊ธˆ๊ฐ์›๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๊ตญ๋ฏผ์—ฐ๊ธˆ์—์„œ ์ •์˜ํ•œ ๊ณ ์œ ํ•œ ์‹๋ณ„๋ฒˆํ˜ธ(seq)๋ฅผ ์š”์ฒญ ์ธ์ž๋กœ ๋ณด๋‚ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์‹๋ณ„๋ฒˆํ˜ธ(seq)๋ฅผ ์–ป๊ธฐ ์œ„ํ•œ ์‚ฌ์—…์žฅ '์‚ฌ์—…์žฅ ๊ธฐ๋ณธ์ •๋ณด ์กฐํšŒ API'์˜ ๋ช…์„ธ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

์š”์ฒญ ๋ณ€์ˆ˜์—๋Š” '์‚ฌ์—…์ž๋ช…'์ด ํ•„์ˆ˜์ด๊ณ , '๋ฒ•์ •๋™์ฝ”๋“œ'์™€ '์‚ฌ์—…์ž๋“ฑ๋ก๋ฒˆํ˜ธ'๋Š” ์˜ต์…˜์œผ๋กœ ๋“ค์–ด๊ฐ‘๋‹ˆ๋‹ค. ํ•„์ˆ˜๊ฐ’์ธ '์‚ฌ์—…์ž๋ช…'๋งŒ ์ž…๋ ฅํ•˜๊ณ  ์š”์ฒญํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐ์ดํ„ฐ๊ฐ€ ์‘๋‹ต๊ฐ’์œผ๋กœ ์กฐํšŒ๋ฉ๋‹ˆ๋‹ค.

...
            <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202204</dataCrtYm>
                <ldongAddrMgplDgCd>30</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>200</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>124</ldongAddrMgplSgguEmdCd>
                <seq>39196607</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ)-(์ผ์šฉ)๋ฆฌ๋ชจ๋ธ๋ง 3๋‹จ๊ณ„(์‘์šฉ๊ณตํ•™๋™) ๊ณต์‚ฌ ๋ƒ‰๋‚œ๋ฐฉ๊ธฐ ๊ตฌ๋งค์„ค์น˜</wkplNm>
                <wkplRoadNmDtlAddr>๋Œ€์ „๊ด‘์—ญ์‹œ ์œ ์„ฑ๊ตฌ ๋Œ€ํ•™๋กœ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>
            <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202202</dataCrtYm>
                <ldongAddrMgplDgCd>27</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>140</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>115</ldongAddrMgplSgguEmdCd>
                <seq>37992726</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ)/ ์ผ์šฉ/ ๋Œ€๊ตฌ๋ฐ˜์•ผ์›”์ดˆ๋“ฑํ•™๊ต ์™ธ 11๊ต ๋ƒ‰๋‚œ๋ฐฉ๊ธฐ ๊ตฌ์ž… ์„ค์น˜</wkplNm>
                <wkplRoadNmDtlAddr>๋Œ€๊ตฌ๊ด‘์—ญ์‹œ ๋™๊ตฌ ์•ˆ์‹ฌ๋กœ49๊ธธ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>
            <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202110</dataCrtYm>
                <ldongAddrMgplDgCd>26</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>440</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>114</ldongAddrMgplSgguEmdCd>
                <seq>35956727</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ๏ผ‰-(์ผ์šฉ)๋ถ€์‚ฐํ…Œํฌ๋…ธํŒŒํฌ์‹œ์Šคํ…œ๋ƒ‰๋‚œ๋ฐฉ๊ธฐ๊ตฌ๋งค</wkplNm>
                <wkplRoadNmDtlAddr>๋ถ€์‚ฐ๊ด‘์—ญ์‹œ ๊ฐ•์„œ๊ตฌ ๊ณผํ•™์‚ฐ๋‹จ1๋กœ60๋ฒˆ๊ธธ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>
           <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202302</dataCrtYm>
                <ldongAddrMgplDgCd>41</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>117</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>101</ldongAddrMgplSgguEmdCd>
                <seq>44689804</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ)</wkplNm>
                <wkplRoadNmDtlAddr>๊ฒฝ๊ธฐ๋„ ์ˆ˜์›์‹œ ์˜ํ†ต๊ตฌ ์‚ผ์„ฑ๋กœ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>
        </items>
...

์ž์„ธํžˆ ๋ณด๋ฉด ๋ญ”๊ฐ€ ์ด์ƒํ•ฉ๋‹ˆ๋‹ค. ๋‚ด๋ ค์˜จ ๋ฐ์ดํ„ฐ์—๋Š” ์‚ผ์„ฑ์ „์ž ๋ณธ์‚ฌ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ์ผ๋ถ€ ๊ณต์žฅ๋“ค์˜ ์ •๋ณด๊นŒ์ง€ ํฌํ•จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์›ํ•˜๋Š” ๋ณธ์‚ฌ ๋ฐ์ดํ„ฐ๋งŒ์„ ์–ป๊ธฐ ์œ„ํ•ด์„œ๋Š” ์‚ฌ์‹ค์ƒ '๋ฒ•์ •๋™์ฝ”๋“œ'๋ฅผ ํ•„์ˆ˜์ ์œผ๋กœ ์ž…๋ ฅํ•˜์—ฌ ์š”์ฒญํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ด๋•Œ ์—ฌ๊ธฐ์„œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ €ํฌ๋Š” ๊ธฐ์—…์˜ ๊ธฐ๋ณธ ๋ฐ์ดํ„ฐ ์ •๋ณด๋Š” NICE์— ์˜์กดํ•˜๊ณ  ์žˆ๋Š”๋ฐ, ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” NICE API์—์„œ๋Š” ๋ฒ•์ •๋™์ฝ”๋“œ๋Š” ์ œ๊ณตํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๊ตญ๋ฏผ์—ฐ๊ธˆ์—์„œ ์›ํ•˜๋Š” ๋ณธ์‚ฌ ๋ฐ์ดํ„ฐ๋งŒ์„ ์–ป๊ธฐ ์œ„ํ•ด์„  ๋ฒ•์ •๋™์ฝ”๋“œ๊ฐ€ ํ•„์ˆ˜๋กœ ์š”๊ตฌ๋˜๋Š” ๋งŒํผ ์ด๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ์•ˆ์„ ์ฐพ์•„์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ธฐ์—…์˜ ๋ฒ•์ •๋™ ์ฝ”๋“œ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ์ฐพ์•„๋ƒˆ์Šต๋‹ˆ๋‹ค.

  1. ์นด์นด์˜ค API
  2. ํ–‰์ •์•ˆ์ „๋ถ€_ํ–‰์ •ํ‘œ์ค€์ฝ”๋“œ_๋ฒ•์ •๋™์ฝ”๋“œ_API

์ด ๋‘ API ๋ชจ๋‘ ๋ฒ•์ •๋™์ฝ”๋“œ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์นด์นด์˜ค API๋Š” ์œ„๊ฒฝ๋„ ์ขŒํ‘œ๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ฒ•์ •๋™์ฝ”๋“œ๋ฅผ ์ฐพ์„ ์ˆ˜ ์žˆ๊ณ , ํ–‰์ •์•ˆ์ „๋ถ€ API๋Š” ์ฃผ์†Œ๋ฅผ ํ†ตํ•ด ๋ฒ•์ •๋™์ฝ”๋“œ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์–ด๋Š ๊ฒƒ์„ ์„ ํƒํ•ด๋„ ์–ป์„ ์ˆ˜ ์žˆ์ง€๋งŒ, ์ด๋ฏธ ๊ณต๊ณต ๋ฐ์ดํ„ฐ๋กœ ์ธํ•ด ์•ฝ๊ฐ„์˜ ํ”ผ๋กœ๊ฐ์„ ๋Š๊ผˆ๊ณ , ํŠธ๋ž˜ํ”ฝ ์ œํ•œ์ด ํฌ๊ฒŒ ์—†๋Š” ์นด์นด์˜ค API๋ฅผ ์„ ํƒํ•˜์—ฌ ๋ฒ•์ •๋™์ฝ”๋“œ๋ฅผ ์–ป๊ธฐ๋กœ ๊ฒฐ์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด์ œ ๋ฒ•์ •๋™ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์กฐํšŒํ•˜๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์›ํ–ˆ๋˜ ๋ณธ์‚ฌ์˜ ์ •๋ณด๋งŒ ์ •ํ™•ํ•˜๊ฒŒ ์–ป์–ด์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

...
        <items>
           <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202302</dataCrtYm>
                <ldongAddrMgplDgCd>41</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>117</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>101</ldongAddrMgplSgguEmdCd>
                <seq>44689804</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ)</wkplNm>
                <wkplRoadNmDtlAddr>๊ฒฝ๊ธฐ๋„ ์ˆ˜์›์‹œ ์˜ํ†ต๊ตฌ ์‚ผ์„ฑ๋กœ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>
           <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202303</dataCrtYm>
                <ldongAddrMgplDgCd>41</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>117</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>101</ldongAddrMgplSgguEmdCd>
                <seq>44689806</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ)</wkplNm>
                <wkplRoadNmDtlAddr>๊ฒฝ๊ธฐ๋„ ์ˆ˜์›์‹œ ์˜ํ†ต๊ตฌ ์‚ผ์„ฑ๋กœ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>
            <item>
                <bzowrRgstNo>124810****</bzowrRgstNo>
                <dataCrtYm>202304</dataCrtYm>
                <ldongAddrMgplDgCd>41</ldongAddrMgplDgCd>
                <ldongAddrMgplSgguCd>117</ldongAddrMgplSgguCd>
                <ldongAddrMgplSgguEmdCd>101</ldongAddrMgplSgguEmdCd>
                <seq>44689809</seq>
                <wkplJnngStcd>1</wkplJnngStcd>
                <wkplNm>์‚ผ์„ฑ์ „์ž(์ฃผ)</wkplNm>
                <wkplRoadNmDtlAddr>๊ฒฝ๊ธฐ๋„ ์ˆ˜์›์‹œ ์˜ํ†ต๊ตฌ ์‚ผ์„ฑ๋กœ</wkplRoadNmDtlAddr>
                <wkplStylDvcd>1</wkplStylDvcd>
            </item>           
        </items>
...

์ด์ œ '์ž๋ฃŒ์ƒ์„ฑ๋…„์›”(dataCrtYm)'๋ฅผ ํ†ตํ•ด ํ•ด๋‹น ์—ฐ๋„์™€ ์›”์„ ํŒŒ์•…ํ•˜๊ณ  '์‹๋ณ„๋ฒˆํ˜ธ(seq)'๋ฅผ ์ด์šฉํ•ด '์‚ฌ์—…์žฅ ์ƒ์„ธ์ •๋ณด ์กฐํšŒ API'๋ฅผ ํ†ตํ•ด '์ด ์ง์› ์ˆ˜'๋ฅผ, ๊ทธ๋ฆฌ๊ณ  '๊ธฐ๊ฐ„๋ณ„ ํ˜„ํ™ฉ ์ •๋ณด์กฐํšŒ API'๋ฅผ ํ†ตํ•ด '์›”๋ณ„ ์ทจ์—…์ž ์ˆ˜์™€ ์›”๋ณ„ ํ‡ด์ง์ž ์ˆ˜'๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค (์™œ ๊ตณ์ด ๋‘ ๊ฐœ๋กœ ๊ตฌ๋ณ„ํ–ˆ๋Š”์ง€๋Š” ์ž˜ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค).

 

 

๊ณต๊ณต๋ฐ์ดํ„ฐํฌํ„ธ API์˜ ๊ณ ์งˆ์ ์ธ ๋ฌธ์ œ

๊ธˆ์œต๊ฐ๋…์›(opendart)์—์„œ ์ œ๊ณตํ•˜๋Š” API๋ฅผ ์ œ์™ธํ•˜๊ณ , ๊ณต๊ณต๋ฐ์ดํ„ฐํฌํ„ธ(data.go.kr/api)์—์„œ ์ œ๊ณตํ•˜๋Š” ๊ธˆ์œต์œ„์›ํšŒ, ๊ตญ๋ฏผ์—ฐ๊ธˆ๊ณต๋‹จ์„ ํฌํ•จํ•œ ๋ชจ๋“  API๋“ค์€ ๊ฐœ๋ฐœ์ž๋“ค์„ ๊ดด๋กญํžˆ๋Š” ๋ช‡ ๊ฐ€์ง€ ๊ณ ์งˆ์ ์ธ ๋ฌธ์ œ๋“ค์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.

1. ๊ฐ„ํ—์ ์œผ๋กœ 'SERVICE_KEY_IS_NOT_REGISTERED_ERROR'๊ฐ€ ๋ฐœ์ƒ

<OpenAPI_ServiceResponse>
    <cmmMsgHeader>
        <errMsg>SERVICE ERROR</errMsg>
        <returnAuthMsg>SERVICE_KEY_IS_NOT_REGISTERED_ERROR</returnAuthMsg>
        <returnReasonCode>30</returnReasonCode>
    </cmmMsgHeader>
</OpenAPI_ServiceResponse>

๊ณต๊ณต๋ฐ์ดํ„ฐ ํฌํ„ธ์˜ ๋ฌธ์˜ํ•˜๊ธฐ ์„น์…˜์—๋Š” 'SERVICE_KEY_IS_NOT_REGISTERED_ERROR' ์˜ค๋ฅ˜์— ๋Œ€ํ•œ ์„ค๋ช…์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์˜ค๋ฅ˜๋Š” ์ž˜๋ชป๋œ ์ธ์ฆํ‚ค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ˜ธ์ถœํ•˜๊ฑฐ๋‚˜, ์ธ์ฆ ๊ธฐ๊ด€ ์„œ๋ฒ„์™€ ๋™๊ธฐํ™”๋˜์ง€ ์•Š์•˜์„ ๋•Œ ๋ฐœ์ƒํ•œ๋‹ค๊ณ  ๋ช…์‹œ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ๋ถˆ๊ณผ ๋ฐฉ๊ธˆ ์ „๊นŒ์ง€ ์ •์ƒ์ ์œผ๋กœ ํ˜ธ์ถœ๋˜๋˜ ๋™์ผํ•œ ์ธ์ฆํ‚ค๋ฅผ ๊ฐ€์ง€๊ณ  API๋ฅผ ํ˜ธ์ถœํ–ˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ , 10๋ฒˆ ์ค‘ 1๋ฒˆ์€ '์ธ์ฆํ‚ค๊ฐ€ ์˜ฌ๋ฐ”๋ฅด์ง€ ์•Š๋‹ค'๋Š” ์˜ค๋ฅ˜๊ฐ€ ๊ฐ„ํ—์ ์œผ๋กœ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด ๋ฌธ์ œ๋Š” API Retry ์ „๋žต์„ ํ†ตํ•ด ์žฌ์š”์ฒญํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐํ–ˆ์ง€๋งŒ, ์ด์™€ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ๋ช‡ ๋…„ ์ „๋ถ€ํ„ฐ ๋งŽ์€ ์ด์šฉ์ž๋“ค์— ์˜ํ•ด ์งˆ๋ฌธ ๊ฒŒ์‹œํŒ์— ๋ฌธ์˜๋˜์—ˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ์•„์ง๊นŒ์ง€ ํ•ด๊ฒฐ๋˜์ง€ ์•Š์€ ๊ฒƒ์„ ๋ณด๋ฉด ํฌํ„ธ ๋‹ด๋‹น์ž๋“ค์ด ์ด ๋ฌธ์ œ๋ฅผ ๊ฐœ์„ ํ•  ์˜์ง€๊ฐ€ ์—†์–ด ๋ณด์˜€์Šต๋‹ˆ๋‹ค.

2. ์š”์ฒญ์˜ ๊ฒฐ๊ณผ๋Š” ์˜ค์ง XML ํ˜•์‹์˜ ๋ฐ”๋”” ๊ฐ’์„ ํ†ตํ•ด์„œ๋งŒ ํ™•์ธ ๊ฐ€๋Šฅ

๊ณต๊ณต๋ฐ์ดํ„ฐํฌํ„ธ์˜ API๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๊ฒฝ์šฐ, ํ•ด๋‹น API๊ฐ€ JSON ํƒ€์ž…์˜ ์‘๋‹ต ๊ฒฐ๊ณผ๋ฅผ ์ง€์›ํ•˜๋”๋ผ๋„ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๋Š” ๋ฌด์กฐ๊ฑด XML ํ˜•์‹์œผ๋กœ๋งŒ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ์˜ค๋ฅ˜์˜ ์ข…๋ฅ˜์— ๊ด€๊ณ„์—†์ด HTTP ์ƒํƒœ ์ฝ”๋“œ๋Š” ํ•ญ์ƒ 200์œผ๋กœ ์‘๋‹ต๋˜๋ฉฐ, ์˜ค๋ฅ˜์— ๋Œ€ํ•œ ๋‚ด์šฉ์€ ์‘๋‹ต ๊ฒฐ๊ณผ์— ํฌํ•จ๋˜์–ด ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค. ์ด๋กœ ์ธํ•ด HTTP ์ƒํƒœ ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด 1์ฐจ์ ์œผ๋กœ ๋ฌธ์ œ๋ฅผ ๊ตฌ๋ถ„ํ•˜๋Š” ๊ฒƒ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๊ณ , ์‘๋‹ต ๋ณธ๋ฌธ์„ ๋ฐ˜๋“œ์‹œ ํ™•์ธํ•˜์—ฌ ํ˜ธ์ถœ์ด ์ •์ƒ์ ์ธ์ง€ ์•„๋‹Œ์ง€๋ฅผ ํŒ๋ณ„ํ•ด์•ผ ํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ์Šต๋‹ˆ๋‹ค.

์œ„์™€ ๊ฐ™์€ ๋ฐฉ์‹์„ ์‘๋‹ต ๋ฐฉ์‹์„ SOAP protocol์ด๋ผ๊ณ  ํ•˜๋Š”๋ฐ, ์‚ฌ์šฉํ•˜๋Š” ์ž…์žฅ์—์„œ ์žฅ์ ์€ ์‚ฌ์‹ค ์ž˜ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค.

 

 

์ •๋ฆฌ