Giter Site home page Giter Site logo

api-docs's Introduction

BASE API v1 ドキュメント (β版)

BASEのAPIの開発者向けのドキュメントです。

概要

このAPIを使うと、あなたのアプリケーションとBASEを連携させることができます。

例えば

  • BASEのアカウントでログインする
  • BASEのショップの商品情報を取得する
  • BASEのショップの商品情報を更新する
  • BASEのショップの注文情報を取得する

※ APIは順次公開していく予定です。

仕様

エンドポイント

https://api.thebase.in/ 配下に各種APIが用意されています。 (httpsのみ)

認証

OAuth2.0に対応

Authorizationヘッダーでアクセストークンを送信して認証します。

Authorization: Bearer {Access_Token}

リフレッシュトークンも発行しています。

OAuth2.0の仕様については、下記の外部サイトを参照ください。

OAuth2.0のclient_idとclient_secretの取得には、BASE Developersへの利用登録と利用許可が必要です。下記URLから申請いただけます。

scope

  • read_users - ユーザー情報を取得 (デフォルトで付与)
  • read_users_mail - ユーザーのメールアドレスを取得
  • read_items - 商品情報を取得
  • read_orders - 注文情報を取得
  • read_savings - 振込申請情報を取得
  • write_items - 商品情報を更新
  • write_orders - 注文情報を更新

レスポンス

JSON形式でレスポンスを返します。

正常な場合はHTTPステータスコード 200 OKを返します。

エラーの場合はHTTPステータスコード 400 Bad Requestを返します。

エラーレスポンスの例

{
  "error":"invalid_request",
  "error_description":"アクセストークンが無効です。"
}

API

OAuth

Users

Items

Categories

ItemCategories

Orders

Savings

DeliveryCompanies

Search

APIの利用制限

現在はユーザーの1時間の利用上限を5000回、1日の利用上限を100000回に設定しています。

上限を超えるとエラーレスポンスを返します。00分になると利用回数がリセットされます。

{
  "error":"hour_api_limit",
  "error_description":"1時間のAPIの利用上限を超えました。時間が変わってからもう一度アクセスしてください。"
}
{
  "error":"day_api_limit",
  "error_description":"1日のAPIの利用上限を超えました。日付が変わってからもう一度アクセスしてください。"
}

サンプルプログラム

注意点

BASE APIは現在β版のため仕様が変更される場合があります。

API利用規約

http://thebase.in/pages/api_term

お問い合わせ

developers[at]thebase.in

BASE Developers https://developers.thebase.in

api-docs's People

Contributors

basehibino avatar ysksn avatar fshin2000 avatar isseiyuki avatar martinheidegger avatar ryota-ka avatar

Watchers

James Cloos avatar Kang Jungmo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.