MENU
      getMailList

        getMailList


        기사 요약

        Classic/VPC 환경에서 이용 가능합니다.

        발송 요청 ID를 사용하여 특정 발송 요청으로 인해 생성된 이메일 목록을 조회합니다.

        요청

        요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

        메서드URI
        GET/mails/requests/{requestId}/mails

        요청 헤더

        Cloud Outbound Mailer API에서 공통으로 사용하는 헤더에 대한 자세한 내용은 Cloud Outbound Mailer 요청 헤더를 참조해 주십시오.

        요청 경로 파라미터

        파라미터에 대한 설명은 다음과 같습니다.

        필드타입필수 여부설명
        requestIdStringRequired각 요청을 구분하기 위한 이메일 발송 요청 ID
        • 한 번에 여러 건의 이메일 발송을 요청할 경우, requestId는 여러 개의 mailId를 포함할 수 있음

        요청 쿼리 파라미터

        파라미터에 대한 설명은 다음과 같습니다.

        필드타입필수 여부설명
        mailIdStringOptional각 이메일을 식별하기 위한 고유한 ID
        recipientAddressStringOptional수신자 이메일 주소
        titleStringOptional이메일 제목
        • like 검색 지원
        sendStatusList<String>Optional이메일 발송 상태
        • R | I | S | F | U | C | PF
          • R: 발송 준비
          • I: 발송 중
          • S: 발송 성공
          • F: 발송 실패
          • U: 수신 거부
          • C: 발송 취소
          • PF: 일부 실패
        sizeIntegerOptional페이지당 레코드 개수
        • 10 (기본값)
        pageIntegerOptional조회할 페이지 인덱스
        • 0 이상
        sortStringOptional정렬 기준
        • id | createUtc | statusCode
          • id: 이메일 ID
          • createUtc: 생성 일시
          • statusCode: 발송 상태
        • property(,asc|desc) 형식
          • asc (기본값)
        • 복수의 정렬 기준 설정 가능

        요청 예시

        요청 예시는 다음과 같습니다.

        curl --location --request GET 'https://mail.apigw.ntruss.com/api/v1/mails/requests/20181120000000010999/mails
        ?size=5
        &sendStatus=S
        &sendStatus=PF
        &page=0'
        --header 'x-ncp-apigw-timestamp: {Timestamp}'
        --header 'x-ncp-iam-access-key: {Access Key}'
        --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
        Curl

        응답

        응답 형식을 설명합니다.

        응답 바디

        응답 바디에 대한 설명은 다음과 같습니다.

        필드타입필수 여부설명
        contentList<MailListResponse>Optional메일 발송 요청에 대한 상세 내용
        lastBooleanRequired마지막 페이지 여부
        totalElementsIntegerRequired총 레코드 개수
        totalPagesIntegerRequired총 페이지 수
        firstBooleanRequired첫 번째 페이지 여부
        numberOfElementsIntegerRequired현재 페이지의 레코드 개수
        sortList<Sort>Required정렬 기준
        sizeIntegerRequired페이지당 레코드 개수
        numberIntegerRequired현재 페이지의 인덱스
        • 0 이상

        응답 상태 코드

        응답 상태 코드에 대한 설명은 다음과 같습니다.

        HTTP 상태 코드코드설명
        200-요청 성공
        400-인증 실패, 잘못된 요청
        40077101로그인 정보 오류
        40077102요청 오류
        40077103요청한 리소스가 존재하지 않음
        40377201요청한 리소스에 대한 권한이 없음
        40377202이메일 서비스 사용을 신청하지 않은 사용자가 호출한 경우
        40577001지원되지 않는 메서드 유형
        41577002지원되지 않는 미디어 유형
        500-서버 오류
        50077301기본 프로젝트가 존재하지 않음
        50077302외부 시스템 API 연동 오류
        50077303그 외 내부 서버 오류

        응답 예시

        응답 예시는 다음과 같습니다.

        {
          "content": [
            {
              "requestId": "20181120000000010999",
              "requestDate": {
                "utc": 1542694793101,
                "formattedDate": "2018-11-20",
                "formattedDateTime": "2018-11-20 15:19:53 101"
              },
              "mailId": "20181120000000011009",
              "title": "test!",
              "templateSid": 41,
              "templateName": "test2",
              "emailStatus": {
                "label": "일부실패",
                "code": "PF"
              },
              "senderAddress": "a@ac.om",
              "senderName": "testUser",
              "sendDate": {
                "utc": 1542694793856,
                "formattedDate": "2018-11-20",
                "formattedDateTime": "2018-11-20 15:19:53 856"
              },
              "representativeRecipient": "test0@ncp-mail.com(30)",
              "reservationStatus": {
                "label": "즉시발송",
                "code": "N"
              },
              "advertising": false
            },
            {
              "requestId": "20181120000000010999",
              "requestDate": {
                "utc": 1542694793101,
                "formattedDate": "2018-11-20",
                "formattedDateTime": "2018-11-20 15:19:53 101"
              },
              "mailId": "20181120000000011109",
              "title": "test!",
              "templateSid": 41,
              "templateName": "test2",
              "emailStatus": {
                "label": "발송성공",
                "code": "S"
              },
              "senderAddress": "a@ac.om",
              "senderName": "testUser",
              "sendDate": {
                "utc": 1542694793655,
                "formattedDate": "2018-11-20",
                "formattedDateTime": "2018-11-20 15:19:53 655"
              },
              "representativeRecipient": "test36@ncp-mail.com(12)",
              "reservationStatus": {
                "label": "즉시발송",
                "code": "N"
              },
              "advertising": false
            }
          ],
          "last": true,
          "totalElements": 2,
          "totalPages": 1,
          "first": true,
          "numberOfElements": 2,
          "sort": [
            {
              "direction": "DESC",
              "property": "createUtc",
              "ignoreCase": false,
              "nullHandling": "NATIVE",
              "ascending": false,
              "descending": true
            }
          ],
          "size": 5,
          "number": 0
        }
        JSON

        이 문서가 도움이 되었습니까?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.