Furupura User API (1.0.0)

Download OpenAPI specification:

Furupura API Team: api@furupura.jp

ふるぷらユーザー向けAPI

← API Portal に戻る

auth

認証

ユーザー登録

新規ユーザーアカウントを作成します。

Request Body schema: application/json
required
name
required
string <= 100 characters
email
required
string <email>
password
required
string <password> >= 8 characters

Responses

Request samples

Content type
application/json
{
  • "name": "ふるぷら太郎",
  • "email": "yamada@furupura.jp",
  • "password": "SecurePass123!"
}

Response samples

Content type
application/json
{
  • "message": "ユーザー登録が完了しました。メールアドレスに確認メールを送信しました。"
}

メール認証

メールに送信された認証トークンを使用してメールアドレスを認証します。

Request Body schema: application/json
required
userId
required
integer <int64>

ユーザーID

token
required
string

メール認証トークン

Responses

Request samples

Content type
application/json
{
  • "userId": 0,
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "verified": true
}

認証メール再送信

メール認証用のメールを再送信します。

Request Body schema: application/json
required
email
required
string <email>

認証メールを再送信するメールアドレス

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

ログイン

メールアドレスとパスワードでログインします。

Request Body schema: application/json
required
email
required
string <email>
password
required
string <password>

Responses

Request samples

Content type
application/json
{
  • "email": "yamada@example.com",
  • "password": "SecurePass123!"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "organization": {
    },
  • "subscription": {
    }
}

ログアウト

現在のセッションからログアウトします。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "message": "ログアウトに成功しました"
}

profile

プロフィール管理

プロフィール取得

ログイン中のユーザーのプロフィール情報を取得します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "organization": {
    },
  • "subscription": {
    },
  • "addresses": [
    ]
}

プロフィール更新

プロフィール情報を部分的に更新します。

Authorizations:
bearerAuth
Request Body schema: application/json
required
name
string <= 100 characters
email
string <email>

メールアドレス

password
string <password> >= 8 characters

新しいパスワード

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "user@example.com",
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "organization": {
    },
  • "subscription": {
    },
  • "addresses": [
    ]
}

パスワード確認

現在のパスワードを確認します(プロフィール更新前の確認用)

Authorizations:
bearerAuth
Request Body schema: application/json
required
password
required
string <password>

現在のパスワード

Responses

Request samples

Content type
application/json
{
  • "password": "pa$$word"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

browsing

商品閲覧

商品一覧取得(公開商品のみ)

公開されている商品の一覧を取得します。カテゴリや価格帯でフィルタリング可能です。

query Parameters
keyword
string

検索キーワード(商品名・説明文で検索)

categorySlug
string

カテゴリースラッグ

brandSlug
string

ブランドスラッグ

minPrice
integer >= 0

最低価格

maxPrice
integer >= 0

最高価格

area
integer

エリアID

gender
integer
Enum: 1 2 3 4

性別(1:メンズ, 2:レディース, 3:ユニセックス, 4:キッズ)

sizes
Array of strings

サイズラベル(カンマ区切り)

colors
Array of strings
condition
string

商品状態

material
string

素材

shopId
integer <int64>

ショップID

tag
integer <int64>

タグID

sortBy
string
Default: "createdAt"
Enum: "price" "name" "createdAt"

ソート項目

sortOrder
string
Default: "DESC"
Enum: "ASC" "DESC"

ソート順

page
integer >= 1
Default: 1
pageSize
integer [ 1 .. 100 ]
Default: 24

Responses

Response samples

Content type
application/json
{
  • "products": [
    ],
  • "meta": {
    }
}

商品詳細取得

指定されたIDの商品詳細情報を取得します

path Parameters
productId
required
integer <int64>

商品ID

Responses

Response samples

Content type
application/json
{
  • "productId": 0,
  • "categoryId": 0,
  • "name": "string",
  • "description": "string",
  • "image": "http://example.com",
  • "subImages": [],
  • "price": 0,
  • "originalPrice": 0,
  • "gender": 1,
  • "sizeLabel": [
    ],
  • "color": [
    ],
  • "condition": "string",
  • "material": "string",
  • "status": "available",
  • "category": {
    },
  • "brand": {
    },
  • "area": {
    },
  • "shop": {
    },
  • "tags": [
    ]
}

カテゴリー一覧取得

すべてのカテゴリーを取得します

Responses

Response samples

Content type
application/json
[
  • {
    }
]

カテゴリー階層構造取得

カテゴリーの階層構造をツリー形式で取得します(Redisキャッシュ対応)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

カテゴリーマップ取得

カテゴリーIDをキーとしたマップ形式でカテゴリー情報を取得します(高速検索用)

Responses

Response samples

Content type
application/json
{
  • "1": {
    },
  • "2": {
    }
}

カテゴリー詳細取得(ID指定)

指定されたIDのカテゴリー情報を取得します

path Parameters
categoryId
required
integer
Example: 1

カテゴリーID

Responses

Response samples

Content type
application/json
{
  • "categoryId": 1,
  • "name": "ファッション",
  • "categorySlug": "fashion",
  • "parentId": null,
  • "measurements": {
    }
}

カテゴリー詳細取得(スラッグ指定)

指定されたスラッグのカテゴリー情報を取得します

path Parameters
categorySlug
required
string
Example: fashion

カテゴリースラッグ

Responses

Response samples

Content type
application/json
{
  • "categoryId": 1,
  • "name": "ファッション",
  • "categorySlug": "fashion",
  • "parentId": null,
  • "measurements": {
    }
}

タグ一覧取得

すべてのタグを商品数付きで取得します

Responses

Response samples

Content type
application/json
[
  • {
    }
]

タグ一覧取得(商品付き)

タグごとに最大10件の商品を含めて取得します

Responses

Response samples

Content type
application/json
[
  • {
    }
]

タグ詳細取得

指定されたIDのタグ情報を取得します

path Parameters
tagId
required
integer <int64>

タグID

Responses

Response samples

Content type
application/json
{
  • "tagId": 123456,
  • "name": "おすすめ",
  • "subname": "今月のおすすめ商品",
  • "tagSlug": "recommended",
  • "productCount": 25
}

エリア一覧取得

利用可能なエリアの一覧を取得します(キャッシュ対応)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

ショップ一覧取得

公開されているショップの一覧を取得します

query Parameters
page
integer >= 1
Default: 1

ページ番号

pageSize
integer [ 1 .. 100 ]
Default: 20

1ページあたりの件数

q
string

検索キーワード

areaId
integer <int64>

エリアIDでフィルタリング

sortBy
string
Default: "createdAt"
Enum: "price" "name" "createdAt"

ソートキー

sortOrder
string
Default: "desc"
Enum: "asc" "desc"

ソート順

Responses

Response samples

Content type
application/json
[
  • {
    }
]

ショップ詳細取得(ID)

指定されたIDのショップ詳細情報を取得します

path Parameters
shopId
required
integer <int64>

ショップID

Responses

Response samples

Content type
application/json
{
  • "shopId": 123456,
  • "name": "ふるぷらマート",
  • "shopSlug": "furupura-mart",
  • "description": "地域の特産品を扱うショップです",
  • "areaId": 123456,
  • "area": {
    }
}

ショップ詳細取得(スラッグ)

指定されたスラッグのショップ詳細情報を取得します

path Parameters
shopSlug
required
string

ショップスラッグ

Responses

Response samples

Content type
application/json
{
  • "shopId": 123456,
  • "name": "ふるぷらマート",
  • "shopSlug": "furupura-mart",
  • "description": "地域の特産品を扱うショップです",
  • "areaId": 123456,
  • "area": {
    }
}

orders

注文管理

新規注文作成

カートの商品から新規注文を作成

Authorizations:
bearerAuth
Request Body schema: application/json
required
required
Array of objects
required
object (ShippingAddress)
paymentMethod
required
string

支払い方法

itemsPrice
required
number <float>

商品合計価格

taxPrice
required
number <float>

税金

shippingPrice
required
number <float>

送料

totalPrice
required
number <float>

合計金額

Responses

Request samples

Content type
application/json
{
  • "orderItems": [
    ],
  • "shippingAddress": {
    },
  • "paymentMethod": "string",
  • "itemsPrice": 0.1,
  • "taxPrice": 0.1,
  • "shippingPrice": 0.1,
  • "totalPrice": 0.1
}

Response samples

Content type
application/json
{
  • "order": {
    },
  • "usedItems": 0
}

自分の注文履歴取得

ログインユーザーの注文履歴を取得

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

注文詳細取得

指定された注文の詳細情報を取得

Authorizations:
bearerAuth
path Parameters
orderId
required
integer

注文ID

Responses

Response samples

Content type
application/json
{
  • "orderId": 0,
  • "userId": 0,
  • "userName": "string",
  • "paymentMethod": "string",
  • "paymentIntentId": "string",
  • "itemsPrice": 0.1,
  • "taxPrice": 0.1,
  • "shippingPrice": 0.1,
  • "totalPrice": 0.1,
  • "status": "pending",
  • "paidAt": "2019-08-24T14:15:22Z",
  • "canceledAt": "2019-08-24T14:15:22Z",
  • "postalCode": "string",
  • "prefecture": "string",
  • "city": "string",
  • "streetAddress": "string",
  • "buildingName": "string",
  • "User": {
    },
  • "PurchaseItems": [
    ],
  • "RentalItems": [
    ],
  • "RentalExtensions": [
    ]
}

レンタル商品購入

レンタル中の商品を10%オフで購入

Authorizations:
bearerAuth
path Parameters
rentalItemId
required
integer

レンタルアイテムID

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "orderId": 0
}

レンタル延長

レンタル期間を延長

Authorizations:
bearerAuth
path Parameters
rentalItemId
required
integer

レンタルアイテムID

Request Body schema: application/json
required
extensionPeriod
required
string
Enum: "3days" "1week"

延長期間

Responses

Request samples

Content type
application/json
{
  • "extensionPeriod": "3days"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

支払い最終確認

支払い処理の最終確認

Authorizations:
bearerAuth
path Parameters
orderId
required
integer

注文ID

Request Body schema: application/json
required
paymentIntentId
required
string

Stripe PaymentIntent ID

totalPrice
required
number <float>

合計金額

Responses

Request samples

Content type
application/json
{
  • "paymentIntentId": "string",
  • "totalPrice": 0.1
}

Response samples

Content type
application/json
{
  • "message": "string"
}

支払い失敗処理

支払い失敗時の処理

Authorizations:
bearerAuth
path Parameters
orderId
required
integer

注文ID

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

favorites

お気に入り管理

お気に入り一覧取得

ユーザーのお気に入り商品とショップの一覧を取得します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "products": [
    ],
  • "shops": [
    ]
}

商品をお気に入りに追加

指定した商品をお気に入りに追加します。

Authorizations:
bearerAuth
path Parameters
productId
required
integer <int64>

商品ID

Responses

Response samples

Content type
application/json
{
  • "message": "すでにお気に入りに追加されています",
  • "alreadyFavorite": true
}

商品をお気に入りから削除

指定した商品をお気に入りから削除します。

Authorizations:
bearerAuth
path Parameters
productId
required
string <uuid>

商品ID

Responses

Response samples

Content type
application/json
{
  • "message": "すでにお気に入りから削除されています"
}

ショップをお気に入りに追加

指定したショップをお気に入りに追加します。

Authorizations:
bearerAuth
path Parameters
shopId
required
integer <int64>

ショップID

Responses

Response samples

Content type
application/json
{
  • "message": "すでにお気に入りに追加されています",
  • "alreadyFavorite": true
}

ショップをお気に入りから削除

指定したショップをお気に入りから削除します。

Authorizations:
bearerAuth
path Parameters
shopId
required
integer <int64>

ショップID

Responses

Response samples

Content type
application/json
{
  • "message": "すでにお気に入りから削除されています"
}

お気に入り状態確認

複数商品のお気に入り状態を一括確認します。参照系だから GET が原則だが、「複数 ID をまとめて送る」ために POST を妥協策として採用

Authorizations:
bearerAuth
Request Body schema: application/json
required
productIds
required
Array of integers <int64> [ items <int64 > ]

Responses

Request samples

Content type
application/json
{
  • "productIds": [
    ]
}

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

notifications

通知管理

通知設定取得

ユーザーの通知設定を取得します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "userId": 0,
  • "emailNotifications": {
    },
  • "pushNotifications": {
    },
  • "smsNotifications": {
    },
  • "lineNotifications": {
    },
  • "quietHours": {
    }
}

通知設定更新

ユーザーの通知設定を更新します。

Authorizations:
bearerAuth
Request Body schema: application/json
required
object (EmailNotificationSettings)
object (PushNotificationSettings)
object (SmsNotificationSettings)
object (LineNotificationSettings)
object (QuietHours)

Responses

Request samples

Content type
application/json
{
  • "emailNotifications": {
    },
  • "pushNotifications": {
    },
  • "smsNotifications": {
    },
  • "lineNotifications": {
    },
  • "quietHours": {
    }
}

Response samples

Content type
application/json
{
  • "userId": 0,
  • "emailNotifications": {
    },
  • "pushNotifications": {
    },
  • "smsNotifications": {
    },
  • "lineNotifications": {
    },
  • "quietHours": {
    }
}

通知一覧取得

ユーザーへの通知一覧を取得します。

Authorizations:
bearerAuth
query Parameters
page
integer >= 1
Default: 1

ページ番号

pageSize
integer [ 1 .. 100 ]
Default: 20

1ページあたりの件数

type
string
Enum: "order" "shipping" "promotion" "priceAlert" "stockAlert" "points" "security" "system"

通知タイプでフィルタ

readStatus
string
Default: "all"
Enum: "all" "read" "unread"

既読ステータスでフィルタ

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    },
  • "unreadCount": 0
}

通知詳細取得

指定した通知の詳細を取得します。

Authorizations:
bearerAuth
path Parameters
notificationId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "notificationId": 0,
  • "userId": 0,
  • "type": "order",
  • "title": "string",
  • "message": "string",
  • "actionUrl": "http://example.com",
  • "imageUrl": "http://example.com",
  • "isRead": false,
  • "readAt": "2019-08-24T14:15:22Z"
}

通知削除

指定した通知を削除します。

Authorizations:
bearerAuth
path Parameters
notificationId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "code": "UNAUTHORIZED",
  • "message": "認証が必要です。ログインしてください"
}

通知を既読にする

指定した通知を既読にします。

Authorizations:
bearerAuth
Request Body schema: application/json
required
notificationIds
required
Array of integers <int64> [ items <int64 > ]

既読にする通知ID

Responses

Request samples

Content type
application/json
{
  • "notificationIds": [
    ]
}

Response samples

Content type
application/json
{
  • "updatedCount": 0
}

全通知を既読にする

すべての未読通知を既読にします。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "message": "すべての通知を既読にしました"
}

特定の通知を既読にする

指定したIDの通知を既読にします。

Authorizations:
bearerAuth
path Parameters
notificationId
required
integer <int64>

通知ID

Responses

Response samples

Content type
application/json
{
  • "message": "対象の通知を既読にしました"
}

未読通知数取得

ユーザーの未読通知数を取得します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "unreadCount": 5
}

subscriptions

サブスクリプション管理

サブスクリプションプラン一覧取得

利用可能なサブスクリプションプラン一覧を取得します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

サブスクリプションプラン詳細取得

指定したサブスクリプションプランの詳細を取得します。

Authorizations:
bearerAuth
path Parameters
subscriptionPlanId
required
string <uuid>

サブスクリプションプランID

Responses

Response samples

Content type
application/json
{
  • "subscriptionPlanId": "4b92ad1d-59e2-484e-b3e4-a8317760e6e7",
  • "name": "ベーシックプラン",
  • "price": 3000,
  • "maxItems": 5,
  • "itemPriceLimit": 10000,
  • "description": "月5点まで、1点10,000円以下の古着をレンタル可能"
}

サブスクリプション加入

指定したサブスクリプションプランに加入します。

Authorizations:
bearerAuth
path Parameters
subscriptionPlanId
required
string <uuid>

サブスクリプションプランID

Responses

Response samples

Content type
application/json
{
  • "message": "サブスクリプションに加入しました。思う存分、古着を楽しみましょう!",
  • "subscription": {
    }
}

サブスクリプション解約

現在加入中のサブスクリプションを解約します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "message": "サブスクリプションを解約しました。ゲストユーザーとしても、引き続き古着をお楽しみいただけます!",
  • "subscription": null
}

利用済みアイテム数取得

現在のサブスクリプションプランでの利用済みアイテム数を取得します。

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "usedItems": 3
}