NAV
javascript

Introduction

페이블루 API 문서

업데이트

24-10-04
1. 정산 내역 - 정산 업데이트 추가

관리자

로그인

{
  "code": 200,
  "msg": "Login successful",
  "data": {
      "id": 100100,
      "name": "해피테스터",
      "email": "jb@hb.re.kr",
      "mobile": "01030277630",
      "roleId": 2,
      "createDate": "2024-09-05T08:39:25.000Z",
      "state": 0
  }
}

로그인

HTTP Request

POST https://pb-s.ttory.com/admin/login

Query Parameters

Parameter Type Default Description
email string true 이메일
password string true 비밀번호

로그아웃

{
    "code": 200,
    "msg": "Logout successful",
    "data": null
}

로그아웃

HTTP Request

POST https://pb-s.ttory.com/admin/logout

URL Parameters

Parameter Type Default Description
- - - -

관리자 추가

{
    "code": 201,
    "msg": "Admin created successfully",
    "data": {
        "name": "해피테스터3",
        "email": "happyb.dev1@gmail.com",
        "mobile": "01030277630",
        "roleId": 1,
        "password": "$2b$10$G7wwc3.643VgzWVj/.Xjnedj3wbND6ffYzrotSsoIT.ju4A1niynG",
        "id": 100102,
        "createDate": "2024-09-10T06:06:56.873Z",
        "state": 0
    }
}

관리자 추가 등록

HTTP Request

POST https://pb-s.ttory.com/admin/create

Query Parameters

Parameter Type Default Description
name string true 이름
email string true 이메일
mobile string true 전화번호
password string true 비밀번호
roleId number true 권한 1: Super, 2: Normal

관리자 권한 수정

{
    "code": 200,
    "msg": "Admin with ID #100100 has been updated with role_id #2",
    "data": null
}

관리자 권한 수정

HTTP Request

POST https://pb-s.ttory.com/admin/update-role

Query Parameters

Parameter Type Default Description
id number true 아이디
roleId number true 권한 1: Super, 2: Normal

관리자 정보 수정

{
    "code": 200,
    "msg": "Admin with ID #100100 has updated email to jb@hb.re.kr and mobile to 01030277631",
    "data": null
}

관리자 정보 수정

HTTP Request

POST https://pb-s.ttory.com/admin/update-contact

Query Parameters

Parameter Type Default Description
id number true 아이디
email string false 이메일
mobile string false 모바일

관리자 비밀번호 변경

{
    "code": 200,
    "msg": "Admin with ID #100100 has updated the password successfully",
    "data": null
}

관리자 자기 비밀번호 변경

HTTP Request

POST https://pb-s.ttory.com/admin/update-password

Query Parameters

Parameter Type Default Description
id number true 아이디
oldPassword string true 기존 비밀번호
newPassword string true 신규 비밀번호

관리자 삭제 = 비활성화

{
    "code": 200,
    "msg": "Admin with ID #100102 has been marked as inactive",
    "data": null
}

관리자 삭제 = 비활성화

HTTP Request

POST https://pb-s.ttory.com/admin/delete

Query Parameters

Parameter Type Default Description
id number true 아이디

관리자 단일 조회

{
    "code": 200,
    "msg": "Admin found",
    "data": {
        "id": 100100,
        "name": "해피테스터",
        "email": "jb@hb.re.kr",
        "mobile": "01030277630",
        "roleId": 2,
        "createDate": "2024-09-05T08:39:25.000Z",
        "password": "$2b$10$MuCUaQchJvweKG15nEdq5.pAghg./OCHrRLqftpeL3DnOzDxrbsVm",
        "state": 0
    }
}

관리자 단일 조회

HTTP Request

GET https://pb-s.ttory.com/admin/detail

Query Parameters

Parameter Type Default Description
id number true 아이디

관리자 목록 조회

{
    "code": 200,
    "msg": "Admins retrieved successfully",
    "data": [
        {
            "id": 100100,
            "name": "해피테스터",
            "email": "jb@hb.re.kr",
            "mobile": "01030277630",
            "roleId": 2,
            "createDate": "2024-09-05T08:39:25.000Z",
            "password": "$2b$10$MuCUaQchJvweKG15nEdq5.pAghg./OCHrRLqftpeL3DnOzDxrbsVm",
            "state": 0
        },
        {
            "id": 100101,
            "name": "해피테스터2",
            "email": "happyb.dev1@gmail.com",
            "mobile": "01030277630",
            "roleId": 1,
            "createDate": "2024-09-10T04:18:12.952Z",
            "password": "$2b$10$lMBK7vjEcWv8M/BCc1hNbuliTrS..tKxjkSOapUGsMXsQPhLvnr8S",
            "state": 0
        },
        ...
    ]
}

관리자 목록 조회

HTTP Request

GET https://pb-s.ttory.com/admin/list

Query Parameters

Parameter Type Default Description
- - - -

페이베이스

거래 내역 조회

{
    "items": [
        {
            "id": 82125,
            "mid": "fastp2248m",
            "co_nm": "풀노래방(즉결)",
            "tid": "fastp2248m01102412041415044325",
            "tr_date_time": "2024-12-04T14:14:23.000Z",
            "app_date_time": "2024-12-04T14:14:23.000Z",
            "cc_date_time": null,
            "amt": 500000,
            "remain_amt": 500000,
            "svc_cd": "01",
            "svc_prdt_cd": "10",
            "cat_id": "1047025505",
            "buyer_nm": "단말기",
            "goods_nm": "단말기",
            "moid": "000000181347",
            "status": "0",
            "card_nm": "국민",
            "card_quota": "02"
        },
    ],
    "meta": {
        "total": 81708,
        "page": 1,
        "limit": 10,
        "totalPages": 8171,
        "hasNextPage": true,
        "hasPreviousPage": false
    }
}

HTTP Request

GET https://pb-s.ttory.com/transaction/pb/list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10

가맹점 조회

{
    "items": [
        {
            "id": 454,
            "boss_nm": "테스트",
            "mod_dt": "2024-10-28 00:06:28",
            "a_nm": "테스트지사",
            "b_nm": null,
            "c_nm": "테스트대리점",
            "block_card": "",
            "month_limit": 0,
            "mid": "testpay01m",
            "card_inst": "12",
            "cid_fee": "0.000000",
            "card_part_cancel_yn": "Y",
            "card_cancel_yn": "Y",
            "etc": "",
            "card_fee": "3.00",
            "co_addr": "테스트",
            "aid_fee": "0.000000",
            "vat_disp_yn": "Y",
            "use_yn": "Y",
            "card_use_yn": "Y",
            "worker": "admin",
            "did_fee": "0.000000",
            "bank_nm": "한국산업은행",
            "co_no": "1138610017",
            "co_nm": "테스트상호",
            "fee_vat_yn": "Y",
            "noti_pay_type": "N",
            "cat_fee": "0.000000",
            "cat_cancel_yn": "Y",
            "reg_dt": "2024-02-29 19:38:13",
            "cancel_yn": "Y",
            "day_limit": 0,
            "accnt_nm": "테스트",
            "bank_cd": "002",
            "tax_email": "tax@tax.com",
            "co_hp": "01012341234",
            "fee_up_yn": "N",
            "accnt_no": "1234567890",
            "aid": "testagt01a",
            "bid": null,
            "cid": "testagt03a"
        },
    ],
    "meta": {
        "total": 454,
        "page": 1,
        "limit": 10,
        "totalPages": 46
    }
}

HTTP Request

GET https://pb-s.ttory.com/merchant/list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10

에이전트 조회

{
    "items": [
        {
            "id": 100,
            "accnt_nm": "테스트",
            "accnt_no": "1234567890",
            "agent_fee": "6.000000",
            "bank_cd": "002",
            "bank_nm": "한국산업은행",
            "agent_id": "testagt03a",
            "mod_dt": "2024-02-29 19:37:30",
            "nm": "테스트대리점",
            "reg_dt": "2024-02-29 19:37:30",
            "tax_email": "tax@tax.com",
            "worker": "admin",
            "auth_cd": "03"  // 01: 지사, 02: 총판, 03: 대리점
        },
    ],
    "meta": {
        "total": 454,
        "page": 1,
        "limit": 10,
        "totalPages": 46
    }
}

HTTP Request

GET https://pb-s.ttory.com/agent/list

Query Parameters

Parameter Type Default Description

거래 내역

거래 내역 조회

{
    "code": 1000,
    "msg": "거래 목록과 계층 구조를 성공적으로 조회했습니다.",
    "data": {
        "items": [
            {
                "id": 4,
                "cpId": "CP12345678",
                "oTid": "ORIGINALTID1234567890123",
                "tid": "TRANSACTIONTID1234567890",
                "orderId": "ORDER12345678901234",
                "itemName": "Test Product",
                "amount": "150.75",
                "discountAmount": "10.00",
                "trxAmount": "140.75",
                "tranDate": "20240911",
                "tranTime": "153045",
                "cancelTranDate": "20240912",
                "cancelTranTime": "120500",
                "balance": "90.50",
                "catId": "T67890",
                "cardCode": "C001",
                "cardName": "Test Bank",
                "cardNo": "1111-1111-1111-1111",
                "quota": "00",
                "cardAuthNo": "AUTH1234",
                "returnCode": "0000",
                "returnMsg": "Transaction successful",
                "txtType": "BILL",
                "createdAt": "2024-09-11T05:14:18.000Z",
                "updatedAt": "2024-09-11T05:14:18.000Z",
                "franchisee": {
                    "id": 23,
                    "parentId": 4,
                    "name": "테스트가맹점"
                },
                "salesHierarchy": [
                    {
                        "id": 4,
                        "parentId": 2,
                        "name": "테스트대리점"
                    },
                    {
                        "id": 2,
                        "parentId": 1,
                        "name": "테스트에이전시"
                    },
                    {
                        "id": 1,
                        "parentId": 0,
                        "name": "테스트총판"
                    }
                ]
            },
            ...
        ],
        "total": 3,
        "totalPages": 1
    }
}

HTTP Request

GET https://pb-s.ttory.com/transaction/list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10
searchCategory string false 검색 조건 1: 가맹점명, 2: TID, 3: 대표자명, 4: 전화번호, 5: 총판명, 6: 에이전시명, 7: 대리점명
searchValue string false 검색 내용
salesCategory string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점
salesValue string false 영업 입력 내용
amountStart string false 시작 금액
amountEnd string false 끝 금액
businessType string false 사업자 타입 1: 비사업자, 2: 사업자
searchValue string false 검색 내용
startDate string false 시작 날짜 YYYY/MM/DD
endDate string false 끝 날짜 YYYY/MM/DD

거래 내역 조회(엑셀)

{
    "code": 1000,
    "msg": "거래 목록과 계층 구조를 성공적으로 조회했습니다.",
    "data": {
        "items": [
            {
                "id": 4,
                "cpId": "CP12345678",
                "oTid": "ORIGINALTID1234567890123",
                "tid": "TRANSACTIONTID1234567890",
                "orderId": "ORDER12345678901234",
                "itemName": "Test Product",
                "amount": "150.75",
                "discountAmount": "10.00",
                "trxAmount": "140.75",
                "tranDate": "20240911",
                "tranTime": "153045",
                "cancelTranDate": "20240912",
                "cancelTranTime": "120500",
                "balance": "90.50",
                "catId": "T67890",
                "cardCode": "C001",
                "cardName": "Test Bank",
                "cardNo": "1111-1111-1111-1111",
                "quota": "00",
                "cardAuthNo": "AUTH1234",
                "returnCode": "0000",
                "returnMsg": "Transaction successful",
                "txtType": "BILL",
                "createdAt": "2024-09-11T05:14:18.000Z",
                "updatedAt": "2024-09-11T05:14:18.000Z",
                "franchisee": {
                    "id": 23,
                    "parentId": 4,
                    "name": "테스트가맹점"
                },
                "salesHierarchy": [
                    {
                        "id": 4,
                        "parentId": 2,
                        "name": "테스트대리점"
                    },
                    {
                        "id": 2,
                        "parentId": 1,
                        "name": "테스트에이전시"
                    },
                    {
                        "id": 1,
                        "parentId": 0,
                        "name": "테스트총판"
                    }
                ]
            },
            ...
        ],
        "total": 3,
        "totalPages": 1
    }
}

HTTP Request

GET https://pb-s.ttory.com/transaction/list/excel

Query Parameters

Parameter Type Default Description
searchCategory string false 검색 조건 1: 가맹점명, 2: TID, 3: 대표자명, 4: 전화번호, 5: 총판명, 6: 에이전시명, 7: 대리점명
searchValue string false 검색 내용
salesCategory string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점
salesValue string false 영업 입력 내용
amountStart string false 시작 금액
amountEnd string false 끝 금액
businessType string false 사업자 타입 1: 비사업자, 2: 사업자
searchValue string false 검색 내용
startDate string false 시작 날짜 YYYY/MM/DD
endDate string false 끝 날짜 YYYY/MM/DD

거래 보류(취소) 내역 조회

{
    "code": 1000,
    "msg": "거래 목록과 계층 구조를 성공적으로 조회했습니다.",
    "data": {
        "items": [
            {
                "id": 4,
                "cpId": "CP12345678",
                "oTid": "ORIGINALTID1234567890123",
                "tid": "TRANSACTIONTID1234567890",
                "orderId": "ORDER12345678901234",
                "itemName": "Test Product",
                "amount": "150.75",
                "discountAmount": "10.00",
                "trxAmount": "140.75",
                "tranDate": "20240911",
                "tranTime": "153045",
                "cancelTranDate": "20240912",
                "cancelTranTime": "120500",
                "balance": "90.50",
                "catId": "T67890",
                "cardCode": "C001",
                "cardName": "Test Bank",
                "cardNo": "1111-1111-1111-1111",
                "quota": "00",
                "cardAuthNo": "AUTH1234",
                "returnCode": "0000",
                "returnMsg": "Transaction successful",
                "txtType": "BILL",
                "createdAt": "2024-09-11T05:14:18.000Z",
                "updatedAt": "2024-09-11T05:14:18.000Z",
                "franchisee": {
                    "id": 23,
                    "parentId": 4,
                    "name": "테스트가맹점"
                },
                "salesHierarchy": [
                    {
                        "id": 4,
                        "parentId": 2,
                        "name": "테스트대리점"
                    },
                    {
                        "id": 2,
                        "parentId": 1,
                        "name": "테스트에이전시"
                    },
                    {
                        "id": 1,
                        "parentId": 0,
                        "name": "테스트총판"
                    }
                ]
            },
            ...
        ],
        "total": 3,
        "totalPages": 1
    }
}

HTTP Request

GET https://pb-s.ttory.com/transaction/hold-list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10
searchCategory string false 검색 조건 1: 가맹점명, 2: TID, 3: 대표자명, 4: 전화번호, 5: 총판명, 6: 에이전시명, 7: 대리점명
searchValue string false 검색 내용
salesCategory string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점
salesValue string false 영업 입력 내용
amountStart string false 시작 금액
amountEnd string false 끝 금액
businessType string false 사업자 타입 1: 비사업자, 2: 사업자
searchValue string false 검색 내용
startDate string false 시작 날짜 YYYY/MM/DD
endDate string false 끝 날짜 YYYY/MM/DD

정산 내역

정산 내역 조회

HTTP Request

GET https://pb-s.ttory.com/settlement/list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10
searchCategory string false 검색 조건 1: 가맹점명, 2: TID, 3: 대표자명, 4: 전화번호, 5: 총판명, 6: 에이전시명, 7: 대리점명
searchValue string false 검색 내용
salesCategory string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점
salesValue string false 영업 입력 내용
creditCategory string false 상태 1: 승인, 2: 취소
startDate string false 시작 날짜 YYYY/MM/DD
endDate string false 끝 날짜 YYYY/MM/DD

일별정산 내역 조회(달력)

[
    {
        "date": "2024-09-01",
        "total_trx": "23905400.00",
        "total_net": "22232022.00",
        "unique_franchisees": "26"
    },
    {
        "date": "2024-09-02",
        "total_trx": "23198000.00",
        "total_net": "21574140.00",
        "unique_franchisees": "22"
    },
    ...
]

HTTP Request

GET https://pb-s.ttory.com/settlement/daily

Query Parameters

Parameter Type Default Description
yearMonth string true 연월 yyyy-mm

(추가)정산 업데이트

{
    "message": "Check values updated successfully",
    "affectedRows": {
        "code": 1000,
        "msg": "",
        "data": {}
    }
}

HTTP Request

GET https://pb-s.ttory.com/settlement/update-check

Query Parameters

Parameter Type Default Description
date string true 연월 yyyy-mm
check number true 정산 상태 0: 미정산, 1: 정산 완료

영업조직

영업조직 목록 조회

{
    "code": 200,
    "msg": "영업 목록을 성공적으로 조회했습니다.",
    "data": {
        "items": [
            {
                "id": 3,
                "name": "테스트대리점",
                "representativeName": "대리점테스터",
                "registrationNumber": "222-11-33333",
                "manager": "admin",
                "businessName": "음식점",
                "email": "happyb.dev1@gmail.com",
                "agencyRegistrationNumber": "990101-1042232",
                "phone1": "01030277630",
                "phone2": null,
                "address": "서초구 강남대로 221",
                "memo": null,
                "bankName": "NH농협",
                "accountNumber": "1032222222",
                "accountHolder": "대리점테스터",
                "isActive": true,
                "createdAt": "2024-09-09T08:12:47.000Z",
                "updatedAt": "2024-09-09T08:12:47.000Z",
                "level": 3,
                "state": 0,
                "businessType": {
                    "id": 3,
                    "name": "대리점",
                    "hierarchyLevel": 3
                },
                "parent": {
                    "id": 2,
                    "name": "테스트에이전시",
                    "representativeName": "에이전시테스터",
                    "registrationNumber": "222-11-33333",
                    "manager": "admin",
                    "businessName": "음식점",
                    "email": "happyb.dev1@gmail.com",
                    "agencyRegistrationNumber": "990101-1042232",
                    "phone1": "01030277630",
                    "phone2": null,
                    "address": "서초구 강남대로 221",
                    "memo": null,
                    "bankName": "NH농협",
                    "accountNumber": "1032222222",
                    "accountHolder": "에이전시테스터",
                    "isActive": true,
                    "createdAt": "2024-09-09T08:02:30.000Z",
                    "updatedAt": "2024-09-09T08:02:30.000Z",
                    "level": 2,
                    "state": 0
                }
            },
            ...
        "total": 3,
        "page": 1,
        "limit": 30,
        "totalPages": 1
    }
}

영업조직 목록 조회

HTTP Request

GET https://pb-s.ttory.com/sales/list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10
searchCategory string false 검색 조건 1: 업체명, 2: 대표자명, 3:전화번홀
searchValue string false 검색 내용
businessType string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점

영업조직 목록 조회(엑셀)

{
    "code": 1000,
    "msg": "영업 목록을 성공적으로 조회했습니다.",
    "data": [
        {
            "id": 2,
            "name": "테스트에이전시",
            "representativeName": "에이전시테스터",
            "registrationNumber": "222-11-33333",
            "email": "happyb.dev1@gmail.com",
            "agencyRegistrationNumber": "990101-1042232",
            "phone1": "01030277630",
            "phone2": null,
            "address": "서초구 강남대로 221",
            "memo": null,
            "bankName": "NH농협",
            "accountNumber": "1032222222",
            "accountHolder": "에이전시테스터",
            "isActive": true,
            "createdAt": "2024-09-09T08:02:30.000Z",
            "updatedAt": "2024-09-12T02:06:47.000Z",
            "parentId": 1,
            "feeRate": "4.50",
            "level": 2,
            "state": 0,
            "businessType": {
                "id": 2,
                "name": "에이전시",
                "hierarchyLevel": 2
            },
            "parent": {
                "id": 1,
                "name": "테스트총판",
                "representativeName": "대리점테스터",
                "registrationNumber": "222-11-33333",
                "email": "happyb.dev1@gmail.com",
                "agencyRegistrationNumber": "990101-1042232",
                "phone1": "01030277630",
                "phone2": "123123",
                "address": "서초구 강남대로 221",
                "memo": "",
                "bankName": "NH농협",
                "accountNumber": "1032222222",
                "accountHolder": "대리점테스터",
                "isActive": true,
                "createdAt": "2024-09-09T07:51:20.000Z",
                "updatedAt": "2024-09-12T04:04:14.000Z",
                "parentId": 0,
                "feeRate": "3.50",
                "level": 1,
                "state": 0
            }
        },
        ...
    ]
}

영업조직 목록 조회(엑셀)

HTTP Request

POST https://pb-s.ttory.com/sales/list/excel

Query Parameters

Parameter Type Default Description
businessType string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점

영업조직 엑셀 업로드

{
}

영업조직 엑셀 업로드

HTTP Request

POST https://pb-s.ttory.com/sales/upload

Query Parameters

Parameter Type Default Description
file file true .xlsx

영업조직(임시) 활성화

{
}

영업조직(임시) 활성화

HTTP Request

POST https://pb-s.ttory.com/sales/temp/update

Query Parameters

Parameter Type Default Description
id number true 아이디

영업조직(임시) 목록 조회

{
}

영업조직(임시) 목록 조회

HTTP Request

GET https://pb-s.ttory.com/sales/temp/list

Query Parameters

Parameter Type Default Description
- - - -

영업조직 상위 업체 조회

{
    "code": 200,
    "msg": "영업 목록을 성공적으로 조회했습니다.",
    "data": {
        "items": [
            {
                "id": 3,
                "name": "테스트대리점",
                "representativeName": "대리점테스터",
                "registrationNumber": "222-11-33333",
                "manager": "admin",
                "businessName": "음식점",
                "email": "happyb.dev1@gmail.com",
                "agencyRegistrationNumber": "990101-1042232",
                "phone1": "01030277630",
                "phone2": null,
                "address": "서초구 강남대로 221",
                "memo": null,
                "bankName": "NH농협",
                "accountNumber": "1032222222",
                "accountHolder": "대리점테스터",
                "isActive": true,
                "createdAt": "2024-09-09T08:12:47.000Z",
                "updatedAt": "2024-09-09T08:12:47.000Z",
                "level": 3,
                "state": 0,
                "businessType": {
                    "id": 3,
                    "name": "대리점",
                    "hierarchyLevel": 3
                },
                "parent": {
                    "id": 2,
                    "name": "테스트에이전시",
                    "representativeName": "에이전시테스터",
                    "registrationNumber": "222-11-33333",
                    "manager": "admin",
                    "businessName": "음식점",
                    "email": "happyb.dev1@gmail.com",
                    "agencyRegistrationNumber": "990101-1042232",
                    "phone1": "01030277630",
                    "phone2": null,
                    "address": "서초구 강남대로 221",
                    "memo": null,
                    "bankName": "NH농협",
                    "accountNumber": "1032222222",
                    "accountHolder": "에이전시테스터",
                    "isActive": true,
                    "createdAt": "2024-09-09T08:02:30.000Z",
                    "updatedAt": "2024-09-09T08:02:30.000Z",
                    "level": 2,
                    "state": 0
                }
            },
            ...
        ],
        "total": 3,
        "page": 1,
        "limit": 30,
        "totalPages": 1
    }
}

영업조직 상위 업체 조회

HTTP Request

GET https://pb-s.ttory.com/sales/list

Query Parameters

Parameter Type Default Description
level number true 현재 내 등급 0: 전체, 1: 총판, 2: 에이전시, 3: 대리점

영업조직 단일 조회

{
    "code": 200,
    "msg": "영업을 성공적으로 조회했습니다.",
    "data": {
        "id": 1,
        "name": "테스트총판",
        "representativeName": "총판테스터",
        "registrationNumber": "110-22-22222",
        "manager": "admin",
        "businessName": "음식점",
        "email": "jb@hb.re.kr",
        "agencyRegistrationNumber": "990101-1042232",
        "phone1": "01030277630",
        "phone2": null,
        "address": "서초구 강남대로 221",
        "memo": null,
        "bankName": "NH농협",
        "accountNumber": "1032222222",
        "accountHolder": "총판테스터",
        "isActive": true,
        "createdAt": "2024-09-09T07:51:20.000Z",
        "updatedAt": "2024-09-09T07:51:20.000Z",
        "level": 0,
        "state": 0,
        "businessType": {
            "id": 1,
            "name": "총판",
            "hierarchyLevel": 1
        },
        "parent": null,
        "children": [
            {
                "id": 2,
                "name": "테스트에이전시",
                "representativeName": "에이전시테스터",
                "registrationNumber": "222-11-33333",
                "manager": "admin",
                "businessName": "음식점",
                "email": "happyb.dev1@gmail.com",
                "agencyRegistrationNumber": "990101-1042232",
                "phone1": "01030277630",
                "phone2": null,
                "address": "서초구 강남대로 221",
                "memo": null,
                "bankName": "NH농협",
                "accountNumber": "1032222222",
                "accountHolder": "에이전시테스터",
                "isActive": true,
                "createdAt": "2024-09-09T08:02:30.000Z",
                "updatedAt": "2024-09-09T08:02:30.000Z",
                "level": 2,
                "state": 0,
                "children": [
                    {
                        "id": 3,
                        "name": "테스트대리점",
                        "representativeName": "대리점테스터",
                        "registrationNumber": "222-11-33333",
                        "manager": "admin",
                        "businessName": "음식점",
                        "email": "happyb.dev1@gmail.com",
                        "agencyRegistrationNumber": "990101-1042232",
                        "phone1": "01030277630",
                        "phone2": null,
                        "address": "서초구 강남대로 221",
                        "memo": null,
                        "bankName": "NH농협",
                        "accountNumber": "1032222222",
                        "accountHolder": "대리점테스터",
                        "isActive": true,
                        "createdAt": "2024-09-09T08:12:47.000Z",
                        "updatedAt": "2024-09-09T08:12:47.000Z",
                        "level": 3,
                        "state": 0,
                        "children": []
                    },
                    {
                        "id": 4,
                        "name": "테스트대리점",
                        "representativeName": "대리점테스터",
                        "registrationNumber": "222-11-33333",
                        "manager": "admin",
                        "businessName": "음식점",
                        "email": "happyb.dev1@gmail.com",
                        "agencyRegistrationNumber": "990101-1042232",
                        "phone1": "01030277630",
                        "phone2": null,
                        "address": "서초구 강남대로 221",
                        "memo": null,
                        "bankName": "NH농협",
                        "accountNumber": "1032222222",
                        "accountHolder": "대리점테스터",
                        "isActive": true,
                        "createdAt": "2024-09-09T08:12:58.000Z",
                        "updatedAt": "2024-09-09T08:12:58.000Z",
                        "level": 3,
                        "state": 0,
                        "children": []
                    }
                ]
            },
            {
                "id": 5,
                "name": "테스트에이전시",
                "representativeName": "에이전시테스터",
                "registrationNumber": "222-11-33333",
                "manager": "admin",
                "businessName": "음식점",
                "email": "happyb.dev1@gmail.com",
                "agencyRegistrationNumber": "990101-1042232",
                "phone1": "01030277630",
                "phone2": null,
                "address": "서초구 강남대로 221",
                "memo": null,
                "bankName": "NH농협",
                "accountNumber": "1032222222",
                "accountHolder": "에이전시테스터",
                "isActive": true,
                "createdAt": "2024-09-09T08:13:21.000Z",
                "updatedAt": "2024-09-09T08:13:21.000Z",
                "level": 2,
                "state": 0,
                "children": [
                    {
                        "id": 6,
                        "name": "테스트대리점",
                        "representativeName": "대리점테스터",
                        "registrationNumber": "222-11-33333",
                        "manager": "admin",
                        "businessName": "음식점",
                        "email": "happyb.dev1@gmail.com",
                        "agencyRegistrationNumber": "990101-1042232",
                        "phone1": "01030277630",
                        "phone2": null,
                        "address": "서초구 강남대로 221",
                        "memo": null,
                        "bankName": "NH농협",
                        "accountNumber": "1032222222",
                        "accountHolder": "대리점테스터",
                        "isActive": true,
                        "createdAt": "2024-09-09T08:13:37.000Z",
                        "updatedAt": "2024-09-09T08:13:37.000Z",
                        "level": 3,
                        "state": 0,
                        "children": []
                    }
                ]
            }
        ],
        "franchisees": []
    }
}

영업조직 단일 조회

HTTP Request

GET https://pb-s.ttory.com/sales/detail

Query Parameters

Parameter Type Default Description
id number true 아이디
includeRelations boolean false 상위 업체 출력 default: false

영업조직 등록

{
    "code": 201,
    "msg": "영업이 성공적으로 생성되었습니다.",
    "data": {
        "name": "테스트대리점",
        "representativeName": "대리점테스터",
        "registrationNumber": "222-11-33333",
        "email": "happyb.dev1@gmail.com",
        "agencyRegistrationNumber": "990101-1042232",
        "phone1": "01030277630",
        "address": "서초구 강남대로 221",
        "bankName": "NH농협",
        "accountNumber": "1032222222",
        "accountHolder": "대리점테스터",
        "level": 3,
        "businessType": {
            "id": 3,
            "name": "대리점",
            "hierarchyLevel": 3
        },
        "parent": {
            "id": 5,
            "name": "테스트에이전시",
            "representativeName": "에이전시테스터",
            "registrationNumber": "222-11-33333",
            "email": "happyb.dev1@gmail.com",
            "agencyRegistrationNumber": "990101-1042232",
            "phone1": "01030277630",
            "phone2": null,
            "address": "서초구 강남대로 221",
            "memo": null,
            "bankName": "NH농협",
            "accountNumber": "1032222222",
            "accountHolder": "에이전시테스터",
            "isActive": true,
            "createdAt": "2024-09-09T08:13:21.000Z",
            "updatedAt": "2024-09-09T08:13:21.000Z",
            "level": 2,
            "state": 0
        },
        "phone2": null,
        "memo": null,
        "id": 7,
        "isActive": true,
        "createdAt": "2024-09-10T07:25:39.000Z",
        "updatedAt": "2024-09-10T07:25:39.000Z",
        "state": 0
    }
}

영업조직 등록

HTTP Request

POST https://pb-s.ttory.com/sales

Query Parameters

Parameter Type Default Description
name string true 업체명
parentId string false 상위 업체 아이디
businessTypeId number true 유형 1: 총판, 2: 에이전시, 3: 대리점
representativeName string true 대표자명
registrationNumber string true 사업자번호 / 주민번호
email string true 이메일
agencyRegistrationNumber string true 사업자번호
phone1 string true 대표 전화번호
phone2 string false 보조 전화번호
address string false 주소
bankName string true 은행명
accountNumber string true 통장번호
accountHolder string true 예금주
feeRate number true 수수료율

영업조직 삭제(비활성화)

{
    "code": 200,
    "msg": "영업이 성공적으로 비활성화되었습니다.",
    "data": {
        "id": 7,
        "name": "테스트대리점",
        "representativeName": "대리점테스터",
        "registrationNumber": "222-11-33333",
        "email": "happyb.dev1@gmail.com",
        "agencyRegistrationNumber": "990101-1042232",
        "phone1": "01030277630",
        "phone2": null,
        "address": "서초구 강남대로 221",
        "memo": null,
        "bankName": "NH농협",
        "accountNumber": "1032222222",
        "accountHolder": "대리점테스터",
        "isActive": true,
        "createdAt": "2024-09-10T07:25:39.000Z",
        "updatedAt": "2024-09-10T07:25:39.000Z",
        "level": 3,
        "state": 1
    }
}

영업조직 삭제(비활성화)

HTTP Request

POST https://pb-s.ttory.com/sales/delete

Query Parameters

Parameter Type Default Description
id number true 아이디

영업조직 복구(활성화)

{
    "code": 200,
    "msg": "영업이 성공적으로 복원되었습니다.",
    "data": {
        "id": 7,
        "name": "테스트대리점",
        "representativeName": "대리점테스터",
        "registrationNumber": "222-11-33333",
        "email": "happyb.dev1@gmail.com",
        "agencyRegistrationNumber": "990101-1042232",
        "phone1": "01030277630",
        "phone2": null,
        "address": "서초구 강남대로 221",
        "memo": null,
        "bankName": "NH농협",
        "accountNumber": "1032222222",
        "accountHolder": "대리점테스터",
        "isActive": true,
        "createdAt": "2024-09-10T07:25:39.000Z",
        "updatedAt": "2024-09-10T07:28:07.000Z",
        "level": 3,
        "state": 0
    }
}

영업조직 복구(활성화)

HTTP Request

POST https://pb-s.ttory.com/sales/restore

Query Parameters

Parameter Type Default Description
id number true 아이디

영업조직 정보 수정

{
    "code": 200,
    "msg": "영업이 성공적으로 업데이트되었습니다.",
    "data": {
        "id": 7,
        "name": "테스트대리점",
        "representativeName": "대리점테스터",
        "registrationNumber": "222-11-33333",
        "email": "happyb.dev1@gmail.com",
        "agencyRegistrationNumber": "990101-1042232",
        "phone1": "01030277630",
        "phone2": null,
        "address": "서초구 강남대로 221",
        "memo": null,
        "bankName": "NH농협",
        "accountNumber": "1032222222",
        "accountHolder": "대리점테스터",
        "isActive": true,
        "createdAt": "2024-09-10T07:25:39.000Z",
        "updatedAt": "2024-09-10T07:31:02.000Z",
        "level": 3,
        "state": 0
    }
}

영업조직 정보 수정

HTTP Request

POST https://pb-s.ttory.com/sales/update

Query Parameters

Parameter Type Default Description
id number true 아이디
name string false 업체명
businessTypeId number false 유형 1: 총판, 2: 에이전시, 3: 대리점
businessName string false 사업 이름
representativeName string false 대표자명
registrationNumber string false 사업자번호 / 주민번호
email string false 이메일
agencyRegistrationNumber string false 사업자번호
phone1 string false 대표 전화번호
phone2 string false 보조 전화번호
address string false 주소
bankName string false 은행명
accountNumber string false 통장번호
accountHolder string false 예금주

가맹점

가맹점 목록 조회

{
    "code": 1000,
    "msg": "가맹점 목록을 성공적으로 조회했습니다.",
    "data": {
        "items": [
            {
                "id": 200192,
                "name": "일기장2",
                "password": null,
                "registrationNumber": null,
                "representativeName": "전승민",
                "businessCategory": "음식점",
                "email": null,
                "phone1": "010-1111-1111",
                "phone2": null,
                "address": "인천광역시 중구 축항대로296번길 56-12, 공장주건축물제 1동2층(신흥동3가)",
                "memo": null,
                "bankName": "기업은행",
                "accountNumber": "11911587602011",
                "tid": "1046938535",
                "settlementDay": 3,
                "totalFeeRate": "3.00",
                "agencyFeeRate": "4.00",
                "branchFeeRate": "5.00",
                "parentId": 200164,
                "createdAt": "2024-09-23T03:23:43.000Z",
                "updatedAt": "2024-09-23T03:25:10.000Z",
                "status": 0,
                "feeRate": "7.00",
                "state": 0,
                "terminal": null,
                "salesHierarchy": [
                    {
                        "id": 200162,
                        "name": "비케이컴퍼니",
                        "parentId": 0,
                        "level": 1
                    },
                    {
                        "id": 200163,
                        "name": "비케이컴퍼니",
                        "parentId": 200162,
                        "level": 2
                    },
                    {
                        "id": 200164,
                        "name": "비케이컴퍼니(비케이컴퍼니)",
                        "parentId": 200163,
                        "level": 3
                    }
                ]
            },
            ...
        ],
        "total": 348
    }
}

영업조직 목록 조회

HTTP Request

GET https://pb-s.ttory.com/franchisee/list

Query Parameters

Parameter Type Default Description
page number false 페이지 번호 default: 1
limit number false 보여질 개수 default: 10
searchCategory string false 검색 조건 1: 가맹점명, 2: TID, 3: 대표자명, 4: 전화번호, 5: 총판명, 6: 에이전시명, 7: 대리점명
searchValue string false 검색 내용

가맹점 목록 조회(엑셀)

영업조직 목록 조회(엑셀)

HTTP Request

GET https://pb-s.ttory.com/franchisee/list/excel

Query Parameters

Parameter Type Default Description
businessType string false 영업 분류 1: 총판, 2: 에이전시, 3: 대리점

가맹점 단일 조회

{
    "code": 1000,
    "msg": "가맹점을 성공적으로 조회했습니다.",
    "data": {
        "id": 200193,
        "name": "결제대행",
        "password": null,
        "registrationNumber": null,
        "representativeName": "결재대행",
        "businessCategory": "서비스",
        "email": null,
        "phone1": null,
        "phone2": null,
        "address": "인천 부평구 부평대로 138 (부평동, 부평 신일유스테이션 오피스텔)",
        "memo": null,
        "bankName": "신한은행",
        "accountNumber": "110-343-202431",
        "tid": "1046938536",
        "settlementDay": 3,
        "totalFeeRate": "3.00",
        "agencyFeeRate": "4.00",
        "branchFeeRate": "5.00",
        "parentId": 107924,
        "createdAt": "2024-09-23T03:23:43.000Z",
        "updatedAt": "2024-09-23T03:25:10.000Z",
        "status": 0,
        "feeRate": "7.00",
        "state": 0
    }
}

HTTP Request

POST https://pb-s.ttory.com/franchisee/detail

Query Parameters

Parameter Type Default Description
id string true 아이디

가맹점 등록

{
    "code": 1000,
    "msg": "가맹점을 성공적으로 조회했습니다.",
    "data": {
        "id": 200193,
        "name": "결제대행",
        "password": null,
        "registrationNumber": null,
        "representativeName": "결재대행",
        "businessCategory": "서비스",
        "email": null,
        "phone1": null,
        "phone2": null,
        "address": "인천 부평구 부평대로 138 (부평동, 부평 신일유스테이션 오피스텔)",
        "memo": null,
        "bankName": "신한은행",
        "accountNumber": "110-343-202431",
        "tid": "1046938536",
        "settlementDay": 3,
        "totalFeeRate": "3.00",
        "agencyFeeRate": "4.00",
        "branchFeeRate": "5.00",
        "parentId": 107924,
        "createdAt": "2024-09-23T03:23:43.000Z",
        "updatedAt": "2024-09-23T03:25:10.000Z",
        "status": 0,
        "feeRate": "7.00",
        "state": 0
    }
}

HTTP Request

POST https://pb-s.ttory.com/franchisee/create

Query Parameters

Parameter Type Default Description
name string true 업체명
parentId number true 영업 아이디
representativeName string true 대표자명
registrationNumber string true 사업자번호 / 주민번호
businessCategory string true 사업 유형 1: 비사업자, 2: 사업자
email string true 이메일
phone1 string true 대표 전화번호
phone2 string true 보조 전화번호
address string true 주소
bankName string true 은행명
accountNumber string true 통장번호
accountHolder string true 예금주
tid string false 단말기 ID
settlementDay number true 정산일
feeRate number true 수수료율

가맹점 삭제(비활성화)

HTTP Request

POST https://pb-s.ttory.com/franchisee/delete

Query Parameters

Parameter Type Default Description
id string true 아이디

가맹점 복구(활성화)

HTTP Request

POST https://pb-s.ttory.com/franchisee/restore

Query Parameters

Parameter Type Default Description
id string true 아이디

가맹점 정보 수정

HTTP Request

POST https://pb-s.ttory.com/franchisee/update

Query Parameters

Parameter Type Default Description
name string true 업체명
parentId number true 영업 아이디
representativeName string true 대표자명
registrationNumber string true 사업자번호 / 주민번호
businessCategory string true 사업 유형 1: 비사업자, 2: 사업자
email string true 이메일
phone1 string true 대표 전화번호
phone2 string true 보조 전화번호
address string true 주소
bankName string true 은행명
accountNumber string true 통장번호
accountHolder string true 예금주
tid string false 단말기 ID
settlementDay number true 정산일
feeRate number true 수수료율

가맹점 엑셀 업로드

{
}

HTTP Request

POST https://pb-s.ttory.com/franchisee/upload

Query Parameters

Parameter Type Default Description
file file true .xlsx

무실적 가맹점

{
}

HTTP Request

POST https://pb-s.ttory.com/franchisee/non-perform

Query Parameters

Parameter Type Default Description
page number true
limit number true

무실적 가맹점 엑셀 정보

{
}

HTTP Request

POST https://pb-s.ttory.com/franchisee/non-perform/excel

Query Parameters

Parameter Type Default Description
- - -

단말기

단말기 등록

HTTP Request

POST https://pb-s.ttory.com/franchisee/terminals

Query Parameters

Parameter Type Default Description
franchiseeId number true 가맹점 아이디
tid string true 터미널 아이디
pgAcquirer string true
affiliateType string true
serialNumber string true
modelName string true
deviceNumber string true
manufacturerName string true
subscriptionType string true
activationStatus string true

단말기 업데이트

HTTP Request

POST https://pb-s.ttory.com/franchisee/terminal/update

Query Parameters

Parameter Type Default Description
franchiseeId number true 가맹점 아이디
tid string true 터미널 아이디
pgAcquirer string true
affiliateType string true
serialNumber string true
modelName string true
deviceNumber string true
manufacturerName string true
subscriptionType string true
activationStatus string true

단말기 목록 조회

{
    "code": 1000,
    "msg": "터미널 목록을 성공적으로 조회했습니다.",
    "data": [
        {
            "id": 1,
            "tid": "T67890",
            "franchiseeId": 23,
            "pgAcquirer": "PaymentCo",
            "affiliateType": "소매점",
            "installationDate": "2024-09-11T18:00:00.000Z",
            "serialNumber": "SN987654321",
            "modelName": "TM2000",
            "deviceNumber": "DN123456789",
            "manufacturerName": "TerminalTech",
            "subscriptionType": "월간",
            "activationStatus": "활성",
            "franchisee": {
                "id": 23,
                "name": "테스트가맹점"
            },
            "franchiseeName": "테스트가맹점"
        }
    ]
}

HTTP Request

GET https://pb-s.ttory.com/franchisee/terminals

Query Parameters

Parameter Type Default Description
- - - -

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.