├── README.md ├── base_api_v1_items.md ├── base_api_v1_orders.md ├── base_api_v1_savings.md ├── base_api_v1_search.md ├── base_api_v1_users_me.md ├── base_api_v1_categories.md ├── base_api_v1_items_add.md ├── base_api_v1_items_edit.md ├── base_api_v1_items_delete.md ├── base_api_v1_items_detail.md ├── base_api_v1_items_search.md ├── base_api_v1_orders_detail.md ├── base_api_v1_categories_add.md ├── base_api_v1_categories_edit.md ├── base_api_v1_items_add_image.md ├── base_api_v1_items_edit_stock.md ├── base_api_v1_oauth_authorize.md ├── base_api_v1_search_refresh.md ├── base_api_v1_categories_delete.md ├── base_api_v1_delivery_companies.md ├── base_api_v1_items_delete_image.md ├── base_api_v1_oauth_access_token.md ├── base_api_v1_orders_edit_status.md ├── base_api_v1_item_categories_add.md ├── base_api_v1_oauth_refresh_token.md ├── base_api_v1_item_categories_delete.md ├── base_api_v1_item_categories_detail.md ├── base_api_v1_items_delete_variation.md └── samples ├── php ├── users │ └── me.php ├── items │ └── items.php ├── oauth │ └── token.php └── search │ └── search.php ├── ruby ├── users │ └── me.rb ├── oauth │ └── token.rb ├── items │ └── items.rb └── search │ └── search.rb └── sample.php /README.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/ 4 | -------------------------------------------------------------------------------- /base_api_v1_items.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/ 4 | -------------------------------------------------------------------------------- /base_api_v1_orders.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/orders/ 4 | -------------------------------------------------------------------------------- /base_api_v1_savings.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/savings/ 4 | -------------------------------------------------------------------------------- /base_api_v1_search.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/search/ 4 | -------------------------------------------------------------------------------- /base_api_v1_users_me.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/users/me 4 | -------------------------------------------------------------------------------- /base_api_v1_categories.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/categories/ 4 | -------------------------------------------------------------------------------- /base_api_v1_items_add.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/add 4 | -------------------------------------------------------------------------------- /base_api_v1_items_edit.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/edit 4 | -------------------------------------------------------------------------------- /base_api_v1_items_delete.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/delete 4 | -------------------------------------------------------------------------------- /base_api_v1_items_detail.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/detail 4 | -------------------------------------------------------------------------------- /base_api_v1_items_search.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/search 4 | -------------------------------------------------------------------------------- /base_api_v1_orders_detail.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/orders/detail 4 | -------------------------------------------------------------------------------- /base_api_v1_categories_add.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/categories/add 4 | -------------------------------------------------------------------------------- /base_api_v1_categories_edit.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/categories/edit 4 | -------------------------------------------------------------------------------- /base_api_v1_items_add_image.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/add_image 4 | -------------------------------------------------------------------------------- /base_api_v1_items_edit_stock.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/edit_stock 4 | -------------------------------------------------------------------------------- /base_api_v1_oauth_authorize.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/oauth/authorize 4 | -------------------------------------------------------------------------------- /base_api_v1_search_refresh.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/search/refresh 4 | -------------------------------------------------------------------------------- /base_api_v1_categories_delete.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/categories/delete 4 | -------------------------------------------------------------------------------- /base_api_v1_delivery_companies.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/delivery_companies/ 4 | -------------------------------------------------------------------------------- /base_api_v1_items_delete_image.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/delete_image 4 | -------------------------------------------------------------------------------- /base_api_v1_oauth_access_token.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/oauth/access_token 4 | -------------------------------------------------------------------------------- /base_api_v1_orders_edit_status.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/orders/edit_status 4 | -------------------------------------------------------------------------------- /base_api_v1_item_categories_add.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/item_categories/add 4 | -------------------------------------------------------------------------------- /base_api_v1_oauth_refresh_token.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/oauth/refresh_token 4 | -------------------------------------------------------------------------------- /base_api_v1_item_categories_delete.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/item_categories/delete 4 | -------------------------------------------------------------------------------- /base_api_v1_item_categories_detail.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/item_categories/detail 4 | -------------------------------------------------------------------------------- /base_api_v1_items_delete_variation.md: -------------------------------------------------------------------------------- 1 | このドキュメントは下記のページへ移動しました。 2 | 3 | https://docs.thebase.in/docs/api/items/delete_variation 4 | -------------------------------------------------------------------------------- /samples/php/users/me.php: -------------------------------------------------------------------------------- 1 | array( 12 | 'method' => 'GET', 13 | 'header' => implode("\r\n", $headers), 14 | 'ignore_errors' => true, 15 | ), 16 | ); 17 | $context = stream_context_create($request_options); 18 | 19 | $response_body = file_get_contents(API_HOST . '/' . API_VERSION . '/users/me', false, $context); 20 | $parsed_response = json_decode($response_body, true); 21 | -------------------------------------------------------------------------------- /samples/ruby/users/me.rb: -------------------------------------------------------------------------------- 1 | # retrieve user information 2 | require 'net/http' 3 | require 'json' 4 | 5 | API_VERSION = 1 6 | API_HOST = 'https://api.thebase.in' 7 | token = '' # Retrieve token using ruby/oauth/token.rb 8 | 9 | header_parameters = 10 | { 'Authorization' => "Bearer #{token}" } 11 | 12 | uri = 13 | URI.join( 14 | API_HOST, 15 | "#{API_VERSION}/users/me") 16 | 17 | request = 18 | Net::HTTP::Get.new( 19 | uri, 20 | header_parameters) 21 | 22 | response = 23 | Net::HTTP.start( 24 | uri.hostname, 25 | uri.port, 26 | use_ssl: uri.scheme == 'https') do |http| 27 | http.request(request) 28 | end 29 | 30 | parsed_response = 31 | JSON.parse response.body 32 | -------------------------------------------------------------------------------- /samples/ruby/oauth/token.rb: -------------------------------------------------------------------------------- 1 | # retrieve access and refresh tokens 2 | require 'net/http' 3 | require 'json' 4 | 5 | API_VERSION = 1 6 | API_HOST = 'https://api.thebase.in' 7 | CODE = '' # YOUR_CODE 8 | CLIENT_ID = '' # YOUR_CLIENT_ID 9 | CLIENT_SECRET = '' # YOUR_CLIENT_SECRET 10 | REDIRECT_URI = '' # YOUR_REDIRECT_URI 11 | AUTHORIZATION_CODE = 'authorization_code' 12 | 13 | request_parameters = 14 | { grant_type: AUTHORIZATION_CODE, 15 | client_id: CLIENT_ID, 16 | client_secret: CLIENT_SECRET, 17 | code: CODE, 18 | redirect_uri: REDIRECT_URI } 19 | 20 | uri = 21 | URI.join( 22 | API_HOST, 23 | "/#{API_VERSION}/oauth/token/") 24 | 25 | response = 26 | Net::HTTP.post_form(uri, request_parameters) 27 | 28 | parsed_response = 29 | JSON.parse response.body 30 | -------------------------------------------------------------------------------- /samples/php/items/items.php: -------------------------------------------------------------------------------- 1 | 'created', 10 | 'sort' => 'desc', 11 | 'limit' => '10', 12 | 'offset' => '0', 13 | ) 14 | ); 15 | $headers = array( 16 | 'Authorization: Bearer ' . $token, 17 | ); 18 | $request_options = array( 19 | 'http' => array( 20 | 'method' => 'GET', 21 | 'header' => implode("\r\n", $headers), 22 | 'ignore_errors' => true, 23 | ), 24 | ); 25 | $context = stream_context_create($request_options); 26 | 27 | $response_body = file_get_contents(API_HOST . '/' . API_VERSION . '/items?' . $params, false, $context); 28 | $parsed_response = json_decode($response_body, true); 29 | -------------------------------------------------------------------------------- /samples/ruby/items/items.rb: -------------------------------------------------------------------------------- 1 | # retrieve all items 2 | require 'net/http' 3 | require 'json' 4 | 5 | API_VERSION = 1 6 | API_HOST = 'https://api.thebase.in' 7 | token = '' # Retrieve token using ruby/oauth/token.rb 8 | 9 | header_parameters = 10 | { 'Authorization' => "Bearer #{token}" } 11 | 12 | request_parameters = 13 | { 'order' => 'created', 14 | 'sort' => 'desc', 15 | 'limit' => '10', 16 | 'offset' => '0' } 17 | 18 | uri = 19 | URI([ 20 | API_HOST, 21 | "/#{API_VERSION}/items/?", 22 | URI.encode_www_form(request_parameters)] 23 | .join) 24 | 25 | request = 26 | Net::HTTP::Get.new( 27 | uri, 28 | header_parameters) 29 | 30 | response = 31 | Net::HTTP.start( 32 | uri.hostname, 33 | uri.port, 34 | use_ssl: uri.scheme == 'https') do |http| 35 | http.request(request) 36 | end 37 | 38 | parsed_response = 39 | JSON.parse response.body 40 | -------------------------------------------------------------------------------- /samples/php/oauth/token.php: -------------------------------------------------------------------------------- 1 | CLIENT_ID, 11 | 'client_secret' => CLIENT_SECRET, 12 | 'redirect_uri' => REDIRECT_URI, 13 | 'grant_type' => 'authorization_code', 14 | 'code' => '', # YOUR_CODE 15 | ); 16 | $headers = array( 17 | 'Content-Type: application/x-www-form-urlencoded', 18 | ); 19 | $request_options = array( 20 | 'http' => array( 21 | 'method' => 'POST', 22 | 'content' => http_build_query($params), 23 | 'header' => implode("\r\n", $headers), 24 | 'ignore_errors' => true, 25 | ), 26 | ); 27 | $context = stream_context_create($request_options); 28 | 29 | $response_body = file_get_contents(API_HOST . '/' . API_VERSION . '/oauth/token', false, $context); 30 | $parsed_response = json_decode($response_body, true); 31 | -------------------------------------------------------------------------------- /samples/php/search/search.php: -------------------------------------------------------------------------------- 1 | CLIENT_ID_FOR_SEARCH, 11 | 'client_secret' => CLIENT_SECRET_FOR_SEARCH, 12 | 'q' => 'Tシャツ シルクスクリーン 白', 13 | 'sort' => 'order_count desc,stock desc,price asc', 14 | 'start' => 0, 15 | 'size' => 10, 16 | 'fields' => 'shop_name,title,detail', 17 | 'shop_id' => '', 18 | ) 19 | ); 20 | $request_options = array( 21 | 'http' => array( 22 | 'method' => 'GET', 23 | 'ignore_errors' => true, 24 | ), 25 | ); 26 | $context = stream_context_create($request_options); 27 | 28 | $response_body = file_get_contents(API_HOST . '/' . API_VERSION . '/search?' . $params, false, $context); 29 | $parsed_response = json_decode($response_body, true); 30 | -------------------------------------------------------------------------------- /samples/sample.php: -------------------------------------------------------------------------------- 1 | 'xxxxxxxxxx', 5 | 'client_secret' => 'yyyyyyyyyy', 6 | 'code' => 'zzzzzzzzzz', 7 | 'grant_type' => 'authorization_code', 8 | 'redirect_uri' => 'http://sample.com/sample/callback', 9 | ); 10 | $headers = array( 11 | 'Content-Type: application/x-www-form-urlencoded', 12 | ); 13 | $request_options = array( 14 | 'http' => array( 15 | 'method' => 'POST', 16 | 'content' => http_build_query($params), 17 | 'header' => implode("\r\n", $headers), 18 | 'ignore_errors' => true, 19 | ), 20 | ); 21 | $context = stream_context_create($request_options); 22 | $response_body = file_get_contents('https://api.thebase.in/1/oauth/token', false, $context); 23 | 24 | // 注文情報を取得するサンプルコード 25 | $headers = array( 26 | 'Authorization: Bearer xxxxxyyyyyzzzzz', 27 | ); 28 | $request_options = array( 29 | 'http' => array( 30 | 'method' => 'GET', 31 | 'header' => implode("\r\n", $headers), 32 | 'ignore_errors' => true, 33 | ), 34 | ); 35 | $context = stream_context_create($request_options); 36 | $response_body = file_get_contents('https://api.thebase.in/1/orders?limit=10&offset=0', false, $context); 37 | -------------------------------------------------------------------------------- /samples/ruby/search/search.rb: -------------------------------------------------------------------------------- 1 | # search items 2 | require 'net/http' 3 | require 'json' 4 | 5 | API_VERSION = 1 6 | API_HOST = 'https://api.thebase.in' 7 | CLIENT_ID_FOR_SEARCH = '' # Your client_id for search API 8 | CLIENT_SECRET_FOR_SEARCH = '' # Your client_secret for search API 9 | 10 | search_words = %w(Tシャツ シルクスクリーン 白).join ' ' 11 | sort_by = %w(order_count\ desc stock\ desc price\ asc).join ',' 12 | searched_fields = %w(shop_name title detail).join ',' 13 | offset = 0 14 | limit = 10 15 | shop_ids = '' 16 | 17 | request_parameters = 18 | { client_id: CLIENT_ID_FOR_SEARCH, 19 | client_secret: CLIENT_SECRET_FOR_SEARCH, 20 | q: search_words, 21 | sort: sort_by, 22 | start: offset, 23 | size: limit, 24 | fields: searched_fields, 25 | shop_id: shop_ids } 26 | 27 | uri = 28 | URI([ 29 | API_HOST, 30 | "/#{API_VERSION}/search/?", 31 | URI.encode_www_form(request_parameters)] 32 | .join) 33 | 34 | request = 35 | Net::HTTP::Get.new(uri) 36 | 37 | response = 38 | Net::HTTP.start( 39 | uri.hostname, 40 | uri.port, 41 | use_ssl: uri.scheme == 'https') do |http| 42 | http.request(request) 43 | end 44 | 45 | parsed_response = 46 | JSON.parse response.body 47 | --------------------------------------------------------------------------------