logo

사용자 보유 패스포트 - 패스포트 + 스탬프 목록 조회

SMTOWN 회원의 보유 Passport 정보를 제공합니다.
passport scope가 필요합니다.

변경사항
  • 버전 endpoint 제공 : v1/me/passports/{idx}/stamps , 기존 me/passports/{idx}/stamps 도 사용 가능 (2022-07-13)
GET https://openapi.smtown.com/api/me/passports/{idx}/stamps?page=1&size=10
Authorization: Bearer 2a324609ec94f18d614d4bc425de754
파라메타 필수여부 설명
Authorization Header 필수 인증 섹션에서 받은 Bearer token 입니다.
{idx} 필수-Proxy 숫자로 제공 된 패스포트 고유번호
예) https://openapi.smtown.com/api/me/passports/21/stamps
page 옵션-QueryString 요청 page 번호, 기본값 1
size 옵션-QueryString 페이지당 아이템 갯수, 기본값 10, 최대 50 (50보다 클 경우 50으로 자동 조정됩니다)
성공 응답
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
{
    "idx": 21,
    "name": "Passport Name",
    "issuedAt": "2022-05-27T02:55:45.000Z",
    "image": {
        "url": "https://path.of.image/image_name.jpg",
        "width": 300,
        "height": 420
    },
    "stamps": {
        "page": 1,
        "size": 10,
        "totalItems": 1219,
        "items": [
            {
                "idx": 1364,
                "name": "Stamp Name",
                "issuedAt": "2022-05-27T02:44:24.000Z",
                "image": {
                    "url": "https://path.of.image/image_name.jpg",
                    "width": 996,
                    "height": 996
                }
            },
            {
                "idx": 1365,
                "name": "Stamp Name",
                "issuedAt": "2022-05-27T02:44:24.000Z",
                "image": {
                    "url": "https://path.of.image/image_name.jpg",
                    "width": 996,
                    "height": 996
                }
            },
            ......
        ]
    }
}
파라메타 타입 설명
idx Integer 패스포트 고유번호
name String 패스포트 이름
issuedAt String 발급 일자 (yyyy-MM-ddTHH:mm:ss.SSSXXX => 2022-05-27T02:55:50.000Z)
image Object 패스포트 이미지 정보
ㄴ url String 패스포트 이미지 URL
ㄴ width Integer 패스포트 이미지 가로
ㄴ height Integer 패스포트 이미지 세로
stamps Object 스탬프 목록 정보
ㄴ idx Integer 스탬프 고유번호
ㄴ name String 스탬프 이름
ㄴ issuedAt String 스탬프 발급 일자 (yyyy-MM-ddTHH:mm:ss.SSSXXX => 2022-05-27T02:55:50.000Z)
ㄴ image Object 스탬프 이미지 정보
ㄴ url String 스탬프 이미지 URL
ㄴ width Integer 스탬프 이미지 가로
ㄴ height Integer 스탬프 이미지 세로
실패 응답 - Invalid token
HTTP/1.1 401
Content-Type: application/json;charset=UTF-8
{
    "path": "https://openapi.smtown.com/api/me",
    "error": "Invalid Token",
    "message": "2a324609ec94f==invalid token value==",
    "timestamp": "2022-04-23T23:16:03.114Z",
    "status": 401
}
실패 응답 - 사용자가 허용하지 않음
HTTP/1.1 401
Content-Type: application/json;charset=UTF-8
{
    "path": "https://openapi.smtown.com/api/me",
    "error": "Access Denied",
    "message": "Insufficient scope for this resource",
    "timestamp": "2022-06-22T20:19:55.653+0000",
    "status": 403
}
실패 응답 - 해당 정보가 없음 (idx 불일치) : 해당 패스포트를 소유하지 않음
HTTP/1.1 401
Content-Type: application/json;charset=UTF-8
{
    "timestamp": "2022-07-04T16:39:48.727+0000",
    "status": 400,
    "error": "Bad Request",
    "message": "User does not have such a passport",
    "path": "/api/me/passports/55"
}