Back to top

API Documentation

サイト情報管理

サイト一覧取得

一覧取得
GET/site/list

処理概要

  • 登録されている全てのサイトの基本情報を取得する

  • 取得する情報は、ID、名称(カナ)、URLおよびアクセスキーとする

  • Parameterなし

Example URI

GET /site/list
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": true,
  "message": "success",
  "data": [
    {
      "site_id": 1,
      "site_name": "テストサイトA",
      "site_kana": "テストサイトエー",
      "site_url": "http://a.example.com",
      "access_key": "00000000"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "成功"
    },
    "message": {
      "type": "string",
      "description": "成功"
    },
    "data": {
      "type": "array"
    }
  },
  "required": [
    "status",
    "message"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "No data",
  "data": "No users were found"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(該当なし)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}

アクセスキー取得

アクセスキー取得
GET/site/info{?sid}

処理概要

  • サイトIDが合致するサイトのアクセスキーを取得する

Example URI

GET /site/info?sid=3
URI Parameters
HideShow
sid
number (required) Example: 3

呼出元のサイトID

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": true,
  "message": "success",
  "data": "00000000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "成功"
    },
    "message": {
      "type": "string",
      "description": "成功"
    },
    "data": {
      "type": "string",
      "description": "0000-3333-1111-000000000000 (string, require) - アクセスキー"
    }
  },
  "required": [
    "status",
    "message"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "{入力値}is used invalid character",
  "data": "{入力値}is used invalid character"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(バリデーションエラー)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "No data",
  "data": "No data"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(該当なし)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}

詳細なサイト情報の取得

詳細情報取得
GET/site/detail{?sid,key,target}

処理概要

  • サイトIDに該当するサイトの全情報を取得する

Example URI

GET /site/detail?sid=3&key=00000000&target=1
URI Parameters
HideShow
sid
number (required) Example: 3

呼出元のサイトID

key
string (required) Example: 00000000

0000-3333-1111-000000000000 (string, required) - 呼出元のサイトキー

target
number (required) Example: 1

ターゲットのサイトID

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": true,
  "message": "success",
  "data": [
    {
      "site_id": "1",
      "site_name": "テストサイトA",
      "site_kana": "テストサイトエイ",
      "site_url": "http://a.example.com",
      "zip01": "100",
      "zip02": "0001",
      "pref": "13",
      "addr01": "千代田区千代田",
      "addr02": "1",
      "tel01": "03",
      "tel02": "1771",
      "tel03": "0000",
      "fax01": "03",
      "fax02": "1771",
      "fax03": "0001",
      "business_hour": "bh",
      "tax": "8",
      "tax_rule": "1",
      "email01": "testa@example.com",
      "email02": "e2",
      "email03": "e3",
      "email04": "e4",
      "email05": "e5",
      "point_rate": "0",
      "welcome_point": "0",
      "law_company": "ほげほげ会社",
      "law_manager": "管理責任者A",
      "create_date": "2017",
      "update_date": "0000",
      "access_key": "00000000",
      "del_flg": "0"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "成功"
    },
    "message": {
      "type": "string",
      "description": "成功"
    },
    "data": {
      "type": "array"
    }
  },
  "required": [
    "status",
    "message"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "{入力値}is used invalid character",
  "data": "{入力値}is used invalid character"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(バリデーションエラー)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "No data",
  "data": "No data"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(該当なし)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}

サイト情報の更新

情報更新
POST/site/update{?sid,key}

処理概要

  • JSON形式で渡したユーザ情報に更新する(ユーザIDはJSONに含まれる)

Example URI

POST /site/update?sid=3&key=00000000
URI Parameters
HideShow
sid
number (required) Example: 3

呼出元のサイトID

key
string (required) Example: 00000000

0000-3333-1111-000000000000 (string, required) - 呼出元のサイトキー

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "site_id": "1",
      "site_name": "テストサイトA",
      "site_kana": "テストサイトエイ",
      "site_url": "http://a.example.com",
      "zip01": "100",
      "zip02": "0001",
      "pref": "13",
      "addr01": "千代田区千代田",
      "addr02": "1",
      "tel01": "03",
      "tel02": "1771",
      "tel03": "0000",
      "fax01": "03",
      "fax02": "1771",
      "fax03": "0001",
      "business_hour": "bh",
      "tax": "8",
      "tax_rule": "1",
      "email01": "testa@example.com",
      "email02": "e2",
      "email03": "e3",
      "email04": "e4",
      "email05": "e5",
      "point_rate": "0",
      "welcome_point": "0",
      "law_company": "ほげほげ会社",
      "law_manager": "管理責任者A",
      "create_date": "2017",
      "update_date": "0000",
      "access_key": "00000000",
      "del_flg": "0"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": true,
  "message": "success",
  "data": "\"\""
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "成功"
    },
    "message": {
      "type": "string",
      "description": "成功"
    },
    "data": {
      "type": "string"
    }
  },
  "required": [
    "status",
    "message"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "{入力値}is used invalid character",
  "data": "{入力値}is used invalid character"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(バリデーションエラー)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "error",
  "data": "No error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(更新失敗)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}

新規サイト情報の作成

新規情報作成
POST/site/create{?sid,key}

処理概要

  • JSON形式で渡したユーザ情報に更新する(ユーザIDは含まない)

  • 識別キー(UUID)を新規に生成して割り当てる

  • 戻り値として利用者IDを返す

Example URI

POST /site/create?sid=3&key=00000000
URI Parameters
HideShow
sid
number (required) Example: 3

呼出元のサイトID

key
string (required) Example: 00000000

0000-3333-1111-000000000000 (string, required) - 呼出元のサイトキー

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "site_name": "テストサイトA",
      "site_kana": "テストサイトエイ",
      "site_url": "http://a.example.com",
      "zip01": "100",
      "zip02": "0001",
      "pref": "13",
      "addr01": "千代田区千代田",
      "addr02": "1",
      "tel01": "03",
      "tel02": "1771",
      "tel03": "0000",
      "fax01": "03",
      "fax02": "1771",
      "fax03": "0001",
      "business_hour": "bh",
      "tax": "8",
      "tax_rule": "1",
      "email01": "testa@example.com",
      "email02": "e2",
      "email03": "e3",
      "email04": "e4",
      "email05": "e5",
      "point_rate": "0",
      "welcome_point": "0",
      "law_company": "ほげほげ会社",
      "law_manager": "管理責任者A",
      "create_date": "2017",
      "update_date": "0000",
      "access_key": "00000000",
      "del_flg": "0"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": true,
  "message": "success",
  "data": 99
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "成功"
    },
    "message": {
      "type": "string",
      "description": "成功"
    },
    "data": {
      "type": "number",
      "description": "サイトID"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "{入力値}is used invalid character",
  "data": "{入力値}is used invalid character"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(バリデーションエラー)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "error",
  "data": "No error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(更新失敗)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}

サイト情報の削除

情報削除
GET/site/delete{?sid,key,target}

処理概要

  • サイトIDに該当するサイト情報を削除する(del_flgを1にする)

Example URI

GET /site/delete?sid=3&key=00000000&target=1
URI Parameters
HideShow
sid
number (required) Example: 3

呼出元のサイトID

key
string (required) Example: 00000000

0000-3333-1111-000000000000 (string, required) - 呼出元のサイトキー

target
number (required) Example: 1

ターゲットのサイトID

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": true,
  "message": "success",
  "data": "\"\""
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "成功"
    },
    "message": {
      "type": "string",
      "description": "成功"
    },
    "data": {
      "type": "string",
      "description": "成功"
    }
  },
  "required": [
    "status",
    "message"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "{入力値}is used invalid character",
  "data": "{入力値}is used invalid character"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(バリデーションエラー)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "status": false,
  "message": "error",
  "data": "error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "boolean",
      "description": "失敗(該当なし)"
    },
    "message": {
      "type": "string",
      "description": "失敗理由"
    },
    "data": {
      "type": "string",
      "description": "暫定処理としてmessageと同じ内容を返している"
    }
  },
  "required": [
    "status",
    "message",
    "data"
  ]
}

Generated by aglio on 17 May 2017