17.Biz Push API

Edit

17.1공통

17.1.1RESPONSE SAMPLE

[성공]

{
    "code": "200",
    "message": "SUCCESS"
}

[잘못된 요청 또는 에러]

{
    "code": "500",
    "message": "FAIL",
    "errorMessage": "에러 상세 내용"
}

17.1.2코드 정의

code

설명

200

처리 성공

400

클라이언트 요청에 오류가 있습니다.

404

요청한 데이터 없습니다.

500

서버에 오류가 있습니다.

17.2Push Base 정보 관리

17.2.1Push Info 정보 설정

  • Push 전송을 위한 기본정보를 설정합니다.

  • application 값을 기준으로 insert, update 처리를 제공합니다.

[Request]
POST /bizpush/nexus/push/info/set
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

  • "all" 문자열 사용 불가(전체 조회 시 사용)

apns_team_id

text(10)

Y

APNs Team ID

apns_key_id

text(500)

Y

APNs Key ID

apns_bundle_id

text(100)

N

APNs Bundle ID

apns_private_key

text(100)

N

APNs Private Key

fcm_key_data

text(100)

Y

FCM 비밀키 Json 데이터

is_use

bool

N

true: 사용, false: 미사용

기본값: false

memo

text(100)

N

memo

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

17.2.2Push Info 정보 조회

  • Push Info 정보를 조회합니다.

[Request]
GET /bizpush/nexus/push/info
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

전체 요청 시 "all"

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

data

json

N

Push Info List

[Response] - data

-

타입

필수

설명

data


array

-

Push Info List


application

text

Y

Application ID


apns_team_id

text

Y

APNs Team ID


apns_key_id

text

Y

APNs Key ID


apns_bundle_id

text

Y

APNs Bundle ID


apns_private_key

text

Y

APNs Private Key


fcm_key_data

text

Y

FCM 비밀키 Json 데이터


is_use

bool

Y

true: 사용, false: 미사용


memo

text

Y

메모


reg_date

text

Y

등록 일자


mod_date

text

Y

수정 일자

17.2.3Push Info 정보 삭제

  • Push Info 정보를 삭제합니다.

[Request]
POST /bizpush/nexus/push/info/del
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

17.3Push 전송

17.3.1Push 전송 요청(PBX 용) - APNs, FCM 동시 사용

[Request]
POST /nexus/push

prefix(bizpush) 추가 예외
- POST /JEDAI-Push/nexus/push
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

device

text(10)

Y

Device Type

  • "android"

  • "ios"

device_token

text(500)

Y

APNs, FCM Token

invokeid

text(100)

N

Packet Number

userid

text(100)

N

User ID

id

text(100)

Y

ID

group_id

text(100)

Y

Group ID

from_id

text(100)

Y

Identification of the other party

menu

text(10)

Y

Function Name

  • call

  • chat

  • noti

mode

text(10)

Y

Transaction Type

  • insert

  • update

  • delete

title

text(30)

Y

Title of notification

message

text(500)

Y

Message Body

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

17.3.2Push 전송 요청 - APNs

  • APNs Push 전송을 요청합니다.


  • 헤더 정보 링크

    • https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns


  • (내용참조) 원격 알림 페이로드 생성

    • https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html

[Request]
POST /nexus/push/send/apns
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

token

text(100)

Y

APNs Device Token

topic

text(100)

N

apns-topic 헤더 포멧에서 "번들 ID" 를 제외한 접미사 값만 전달합니다.

ex) com.sample.app.voip 일 경우 "voip" 를 전달

apns_push_type

text(100)

N

헤더 정보 링크 참고

apns_id

text(100)

N

헤더 정보 링크 참고

apns_expiration

text(100)

N

헤더 정보 링크 참고

apns_priority

text(100)

N

헤더 정보 링크 참고

apns_collapseid

text(100)

N

헤더 정보 링크 참고

message

json

(4000)

Y

"원격 알림 페이로드 생성" 링크를 참조하여 페이로드 json data를 작성합니다.

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

17.3.3Push 전송 요청 - FCM

  • FCM Push 전송을 요청합니다.


  • (내용참조) 보내기 요청 작성

    • https://firebase.google.com/docs/cloud-messaging/send-message

[Request]
POST /nexus/push/send/fcm
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

message

json

(4000)

Y

"보내기 요청 작성" 링크를 참조하여 페이로드 json data를 작성합니다.

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

17.3.4Multi Push 전송 요청 - APNs

  • Multi APNs Push 전송을 요청합니다.

    • 한 번에 여러 건의 Push 요청을 합니다.

    • 보낼 메시지는 동일해야 합니다.


  • 헤더 정보 링크

    • https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns


  • (내용참조) 원격 알림 페이로드 생성

    • https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html

[Request]
POST /nexus/push/send/multi/apns
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

token_list

json

(100000)

Y

APNs Device Token List

Token(64byte) 기준으로 약 1000개의 리스트

topic

text(100)

N

apns-topic 헤더 포멧에서 "번들 ID" 를 제외한 접미사 값만 전달합니다.

ex) com.sample.app.voip 일 경우 "voip" 를 전달

apns_push_type

text(100)

N

헤더 정보 링크 참고

apns_id

text(100)

N

헤더 정보 링크 참고

apns_expiration

text(100)

N

헤더 정보 링크 참고

apns_priority

text(100)

N

헤더 정보 링크 참고

apns_collapseid

text(100)

N

헤더 정보 링크 참고

custom_data

json

(2000)

Y/N

사용자 정의 데이터를 key value 형태의 json으로 작성합니다.

  • custom_data 와 message 는 둘 중 하나는 항상 값이 존재해야 합니다.

message

json

(4000)

Y/N

  • 페이로드에서 alert 항목에 해당하는 데이터를 json으로 작성합니다.

    • "원격 알림 페이로드 생성" 링크를 참조

  • sample

1. 다국어 미지원 시

{

"title": "sample_title",

"body": "sample_body"

}

2. 다국어 지원 시

{

"title-loc-key": "sample_title_loc_key",

"title-loc-args": ["arg1", "arg2"], // nullable

"subtitle-loc-key": "sample_title_loc_key",

"subtitle-loc-args": ["arg3", "arg4"], // nullable

"body-loc-key": "sample_body_loc_key"

"body-loc-args": ["arg5", "arg6"] // nullable

}


  • custom_data 와 message 는 둘 중 하나는 항상 값이 존재해야 합니다.

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

group_id

text

N

group id

  • Multi Push 전송 조회 시 사용

total_count

int

N

Push 전송 요청 개수

send_count

int

N

Push 전송 개수

17.3.5Multi Push 전송 요청 - FCM

  • Multi FCM Push 전송을 요청합니다.

    • 한 번에 여러 건의 Push 요청을 합니다.

    • 보낼 메시지는 동일해야 합니다.


  • (내용참조) 보내기 요청 작성

    • https://firebase.google.com/docs/cloud-messaging/send-message

[Request]
POST /nexus/push/send/multi/fcm
[Parameter]

타입

필수

설명

application

text(100)

Y

Application ID

token_list

json

(200000)

Y

FCM Device Token List

Token(152byte) 기준으로 약 1000개의 리스트

priority

text(20)

Y

메시지 우선순위 설정 - "normal", "high"

custom_data

json

(2000)

Y/N

사용자 정의 데이터를 key value 형태의 json으로 작성합니다.

  • custom_data 와 message 는 둘 중 하나는 항상 값이 존재해야 합니다.

message

json

(2000)

Y/N

  • 페이로드에서 notification 항목에 해당하는 데이터를 json으로 작성합니다.

    • "보내기 요청 작성" 링크를 참조

  • sample

1. 다국어 미지원 시

{

"title": "sample_title",

"body": "sample_body"

}


2. 다국어 지원 시

{

"title_loc_key": "sample_title_loc_key",

"title_loc_args": ["arg1", "arg2"],

"body_loc_key": "sample_body_loc_key"

"body_loc_args": ["arg3", "arg4"]

}


  • custom_data 와 message 는 둘 중 하나는 항상 값이 존재해야 합니다.

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

group_id

text

N

group id

  • Multi Push 전송 조회 시 사용

total_count

int

N

Push 전송 요청 개수

send_count

int

N

Push 전송 개수

17.3.6Multi Push 전송 조회 - APNs, FCM

  • APNs, FCM Multi Push 전송 내역을 조회합니다.

[Request]
GET /nexus/push/send/multi
[Parameter]

타입

필수

설명

group_id

text(50)

Y

Group ID

  • Multi Push 전송 요청 시 응답으로 받은 Group ID

application

text(100)

Y

Application ID

send_result

text(3)

N

조회 할 푸시전송 내역 (default: all)

  • all (성공/실패 전체)

  • suc (성공)

  • err (실패)

page

int

N

페이지 번호 (default: 1)

page_size

int

N

페이지 크기 (default : 10, max: 100)

sort_type

text(4)

N

정렬 타입 (default: asc)

  • asc(오름차순)

  • desc(내림차순)

[Response]

타입

필수

설명

code

text

Y

처리 결과 코드(200은 정상 / 나머지는 오류)

message

text

Y

처리 결과 메시지 ("SUCCESS", "FAIL")

errorMessage

text

N

오류 상세 메시지(오류시 존재하는 값)

group_id

text

N

Group ID

application

text

N

Application ID

push_type

text

N

Push 타입

  • FCM

  • APNS

status

text

N

전송 상태

  • ING:전송 중

  • SUCCESS_ALL: 모든전송성공

  • SUCCESS_PART: 일부전송성공

  • FAIL: 전송실패

reg_date

text

N

등록 일자

mod_date

text

N

수정 일자

total_page

text

N

전체 페이지

page

text

N

페이지 번호

data

text

N

group id 에 해당하는 send push list

[Response] - data

-

타입

필수

설명

data


array

-

send push List


serial_number

text

Y

serial_number


device_token

text

Y

device token


message_json

text

Y

push 전송 메시지 페이로드 (json)


resp_code

text

Y

응답 코드


resp_msg

text

Y

응답 메시지


reg_date

text

Y

등록 일자


reg_date

text

Y

수정 일자