Back to top

API Documentation

User

ユーザリスト取得

ユーザリスト取得
POST/v1/user/list

処理概要

  • ユーザ情報を取得する。

  • 取得が成功した場合、取得結果をすべて返す。

Example URI

POST /v1/user/list
Request
HideShow
Headers
Content-Type: application/json
x-sample-api-access-token: xx
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "result_code": "0",
  "user_list": [
    {
      "id": 1234,
      "first_name": "Taro",
      "last_name": "Yamada"
    },
    {
      "id": 2345,
      "first_name": "Hajime",
      "last_name": "Tanaka"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "result_code": {
      "type": "string",
      "enum": [
        "0"
      ],
      "description": "返却値(0:OK, 1:NG)\n\n    + 0 (number)\n    + 1 (number)"
    },
    "user_list": {
      "type": "array"
    }
  },
  "required": [
    "result_code"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "result_code": "1",
  "error_message": "データが取得できませんでした。"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "result_code": {
      "type": "string",
      "enum": [
        "1"
      ],
      "description": "返却値(0:OK, 1:NG)\n\n    + 0 (number)\n    + 1 (number)"
    },
    "error_message": {
      "type": "string"
    }
  },
  "required": [
    "result_code",
    "error_message"
  ]
}

Admin

商品リスト取得

商品リスト取得
POST/v1/admin/item/list

処理概要

  • 商品情報を取得する。

  • 取得が成功した場合、取得結果をすべて返す。

Example URI

POST /v1/admin/item/list
Request
HideShow
Headers
Content-Type: application/json
x-sample-api-access-token: xx
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "result_code": "0",
  "item_list": [
    {
      "id": 9876,
      "name": "りんご",
      "stock": 100
    },
    {
      "id": 8765,
      "name": "バナナ",
      "stock": 0
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "result_code": {
      "type": "string",
      "enum": [
        "0"
      ],
      "description": "返却値(0:OK, 1:NG)\n\n    + 0 (number)\n    + 1 (number)"
    },
    "item_list": {
      "type": "array"
    }
  },
  "required": [
    "result_code"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "result_code": "1",
  "error_message": "データが取得できませんでした。"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "result_code": {
      "type": "string",
      "enum": [
        "1"
      ],
      "description": "返却値(0:OK, 1:NG)\n\n    + 0 (number)\n    + 1 (number)"
    },
    "error_message": {
      "type": "string"
    }
  },
  "required": [
    "result_code",
    "error_message"
  ]
}

Generated by aglio on 09 Apr 2017