-
Notifications
You must be signed in to change notification settings - Fork 0
/
toast-mail.yaml
196 lines (193 loc) · 5.14 KB
/
toast-mail.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
swagger: '2.0'
info:
title: Toast Cloud SMS
version: '1.0'
description: Toast Cloud SMS API Specification
host: "api-mail.cloud.toast.com"
basePath: /email/v1.5/appKeys/
schemes:
- https
paths:
/{appKey}/sender/mail:
post:
tags:
- 전송
summary: 일반 메일 발송
description: 메일 발송시, 수신자 목록을 누구나 확인할 수 있음
operationId: sendMail
consumes:
- application/json;charset=UTF-8
parameters:
- name: appKey
in: path
description: Project별 고유의 앱키
required: true
type: string
- name: body
in: body
required: true
schema:
$ref: "#/definitions/receiver"
responses:
200:
$ref: "#/definitions/responsePayload"
/{appKey}/sender/eachMail:
post:
tags:
- 전송
summary: 개별 메일 발송
description: 수신자 각각에게 메일을 보냄 (받는 사람에게 수신자는 한 명만)
consumes:
- application/json;charset=UTF-8
parameters:
- name: appKey
in: path
description: Project별 고유의 앱키
required: true
type: string
- name: body
in: body
required: true
schema:
$ref: "#/definitions/mailBody"
responses:
200:
$ref: "#/definitions/responsePayload"
/{appKey}/sender/mails:
get:
tags:
- 조회
summary: 메일 발송 리스트 조회
consumes:
- appication/json;charset=UTF-8
parameters:
- name: appKey
in: path
description: Project별 고유의 앱키
required: true
type: string
- name: requestId
in: query
description: 요청 ID (조건적 필수 - 1)
type: string
- name: startSendDate
in: query
description: 발송 시점 조회 시작값 (조건적 필수 - 2)
format: yyyy-MM-dd HH:mm:ss
type: string
- name: endSendDate
in: query
description: 발송 시점 조회 종료값 (조건적 필수 - 2)
format: yyyy-MM-dd HH:mm:ss
type: string
- name: mailStatusCode
in: query
description: 발송상태코드 (발송준비, 발송중, 발송완료, 발송실패 순)
type: string
enum:
- SST0
- SST1
- SST2
- SST3
responses:
200:
description: 채워넣어야함
definitions:
receiver:
required: [receiveMailAddr, recieveType]
type: object
properties:
receiveMailAddr:
type: string
format: email
description: 수신자 메일주소
receiveName:
type: string
description: 수신자명
receiveType:
type: string
description: 수신자 타입 (받는 사람, 참조, 숨은 참조 순)
enum:
- MRT0
- MRT1
- MRT2
mailBody:
required: [senderAddress, recieverList, title, body]
properties:
senderAddress:
type: string
format: email
description: 발신자 메일주소
senderName:
type: string
description: 발신자 이름 (메일 목록에서 보이는 이름)
requestDate:
type: string
format: yyyy-MM-dd HH:mm:ss
title:
type: string
description: 메일의 제목
body:
type: string
description: 메일 내용
attachFieldList:
type: array
items:
type: integer
description: (미리 업로드했던) 첨부파일 ID
recieverList:
type: array
description: 수신자 목록 (최대 1000명까지)
maxLength: 1000
items:
$ref: "#/definitions/receiver"
responseHeader:
type: object
properties:
isSuccessful:
type: boolean
description: 성공여부
resultCode:
type: integer
description: 실패코드
resultMessage:
type: string
description: 실패 메세지
responseBody:
type: object
properties:
requestId:
type: string
description: 요청 ID
results:
type: array
description: 수신자별 발송 결과
items:
$ref: "#/definitions/responseBodyItem"
responseBodyItem:
type: object
description: responseBody에서 각 수신자의 발송 결과 항목
properties:
receiveMailAddr:
$ref: "#/definitions/receiver/properties/receiveMailAddr"
recieveName:
$ref: "#/definitions/receiver/properties/receiveName"
receiveType:
$ref: "#/definitions/receiver/properties/receiveType"
resultCode:
type: integer
description: 수신자 발송 요청 결과 코드
resultMessage:
type: string
description: 수신자 발송 요청 결과 메세지
responsePayload:
type: object
description: 메일 발송 후 결과
properties:
header:
$ref: "#/definitions/responseHeader"
body:
type: object
properties:
data:
$ref: "#/definitions/responseBody"