Overview
# カラーミーショップアプリストア API [アプリストア](https://app.shop-pro.jp/)にて公開するアプリに対して、一般公開している[カラーミーショップAPI](https://developer.shop-pro.jp/docs/colorme-api)に加えて、カラーミーショップアプリストアAPI(以下、アプリストアAPIといいます)を利用することが出来ます。アプリストアAPIでは以下のことが行えます。 - 課金データ(アプリ内課金、従量課金)の作成 - インラインスクリプトタグの取得・作成・更新・削除 - スクリプトタグの取得・作成・更新・削除 ## 利用手順 アプリストアAPIを利用するには、OAuth認証が必要です。OAuth認証の基本的な流れについては[カラーミーショップAPIドキュメント](https://developer.shop-pro.jp/docs/colorme-api)を参照してください。 アプリストアAPIの利用のために、以下のscopeが追加で指定可能になります。[カラーミーショップAPIドキュメント](https://developer.shop-pro.jp/docs/colorme-api)に掲載されているscopeと合わせてご利用ください。 |スコープ|機能| |---|---| |`write_application_charge`|課金データの作成| |`read_shop_script_tags`|ショップページのスクリプトタグを参照| |`write_shop_script_tags`|ショップページへスクリプトタグを追加・更新| |`read_inline_script_tags`|インラインスクリプトタグを参照| |`write_inline_script_tags`|インラインスクリプトタグを追加・更新| |`read_script_tags`|スクリプトタグを参照(deprecated)| |`write_script_tags`|スクリプトタグを追加・更新(deprecated)| (例) カラーミーショップアカウントの認証ページを表示 ``` https://api.shop-pro.jp/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=code&scope=read_products%20write_products%20write_application_charge ``` ## 課金設定 料金プラン(月額課金・従量課金・買い切り)による課金や、アプリ内課金をご利用いただくにはアプリごとに課金設定の登録が必要です。 この設定は [カラーミーショップ デベロッパー](https://developer.shop-pro.jp) から行うことができます。 登録できる課金形式やその使い方の詳細については[アプリストア 開発ガイドのアプリ課金のページ](https://developer.shop-pro.jp/getting-started/appstore-billing/)をご覧ください ## アプリのインストール ショップオーナーがアプリをインストールしたとき、以下の処理をカラーミーショップが行います。 - 選択された料金プランに基づき課金開始 - インストールフックの呼び出し ### インストールフック アプリのインストール時に、インストールに関する情報を `POST` メソッド、 `application/json` 形式で通知します。 通知先のURLは[カラーミーショップ デベロッパー](https://developer.shop-pro.jp/)にログインし、各アプリストア アプリのアプリ設定から登録を行ってください。 以下のパラメータが送信されます。課金請求に必要なパラメータを含みますので、必ず受け取れるようにしてください。 |パラメータ|機能|形式| |---|---|---| |`account_id`|インストールしたショップオーナーのアカウントID|PA+8桁の整数| |`application_charge_source_id`|プラン課金ID|数字と大文字アルファベットで構成される文字列(6桁以上)| |`recurring_application_charge_id`|(買い切り以外の課金の場合)課金契約ID|数字と大文字アルファベットで構成される文字列(6桁以上)| |`application_charge_id`|(買い切りの場合)課金契約ID|数字と大文字アルファベットで構成される文字列(6桁以上)| |`trial_term`|(無料お試し期間がある場合)無料お試し期間|JSONオブジェクト| |`mail`|ショップオーナーへの連絡メールアドレス|文字列| `application_charge_source_id` はデベロッパーサイトで設定したプラン課金のIDです。インストールされた料金プランの判別にご利用いただけます。 `recurring_application_charge_id` と `application_charge_id` はインストールごとに発行されるユニークなIDです。ショップオーナーが一度アンインストールした後に、再度同じショップオーナーがアプリのインストールを行った際には新たに別のIDが発行されます。 `recurring_application_charge_id` は「買い切り」以外の課金である「無料」「月額」「月額+従量」「月額+初期費用」「従量のみ」のプラン課金のインストールの際に発行されます。 従量による課金を伴うプラン課金の場合は、従量分の料金を請求する際に 課金契約ID(`recurring_application_charge_id`) が必要になるので、必ず記録するようにしてください。 `mail` パラメータの値はショップオーナーへの連絡手段としてご利用いただけます。インストール後に認可フローが中断され、アクセストークンが得られない際のショップオーナーへの連絡手段としてご活用いただけます。このパラメータはカラーミーショップの非公開情報として登録されている値です。左記以外の用途でこの値をアプリの機能で使用しないでください。 例) 買い切りの場合 ``` { "account_id": "PA00000001", "application_charge_source_id": "F3RN9A", "application_charge_id": "A3FT4N", "mail": "[email protected]" } ``` 例) 月額課金の場合 ``` { "account_id": "PA00000001", "application_charge_source_id": "F3RN9A", "recurring_application_charge_id": "A3FT4N", "mail": "[email protected]" } ``` 無料お試し期間を設定した課金の場合、以下の情報を `trial_term` パラメータとして送信します。 無料お試し期間中は従量課金APIを呼び出して課金請求することはできません。 |パラメータ|機能|形式| |---|---|---| |`starts_at`|無料お試し開始日時|整数値(UNIXタイムスタンプ)| |`ends_at`|無料お試し終了日時|整数値(UNIXタイムスタンプ)| 例) 無料お試し期間がある月額課金の場合 ``` { "account_id": "PA00000001", "application_charge_source_id": "F3RN9A", "recurring_application_charge_id": "A3FT4N", "mail": "[email protected]", "trial_term" { "starts_at": 1565017200, "ends_at": 1567609200 } } ``` 受け取りに成功した場合は、以下のパラメータを `application/json` 形式でレスポンスボディに付与し、 ステータスコード `200` レスポンスをカラーミーショップへ返却してください。 ステータスコード `200` レスポンスをカラーミーショップが受け取れない場合、もしくは以下のパラメーターが返却されなかった場合、インストールを中止し、インストールによって発生した情報は破棄されます。 |パラメータ|機能|形式| |---|---|---| |`redirect_url`|インストール成功後に遷移するURL|文字列(URL)| 例) ``` { "redirect_url": "https://example.com" } ``` インストール完了後、インストールフックのレスポンスパラメータの `redirect_url` へ画面遷移しますので、APIを利用する場合は `redirect_url` より先の画面でOAuth認証の実装をお願いします。 ## アプリのアンインストール ショップオーナーがアプリをアンインストールしたとき、以下の処理をカラーミーショップが行います。 - OAuth認証のアクセストークンの無効化 - 登録したインラインスクリプトタグ・
カラーミーショップアプリストア API is a shopping API from shop-pro.jp. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 18 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Shopping
- Base URL
https://api.shop-pro.jp- Version
- 1.0.0
- Endpoints
- 18
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://api.shop-pro.jp/appstore/v1/script_tags.json" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.shop-pro.jp/appstore/v1/script_tags.json", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://api.shop-pro.jp/appstore/v1/script_tags.json",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /appstore/v1/application_charges.json | アプリ内課金データの作成 |
| DELETE | /appstore/v1/installation.json | アプリストアアプリのアンインストール |
| POST | /appstore/v1/recurring_application_charges/{recurringApplicationChargeId}/usage_charges.json | 従量課金データの作成 |
| GET | /appstore/v1/script_tags.json | スクリプトタグの取得 |
| POST | /appstore/v1/script_tags.json | スクリプトタグの作成 |
| GET | /appstore/v1/script_tags/{scriptTagId}.json | スクリプトタグの取得 |
| PUT | /appstore/v1/script_tags/{scriptTagId}.json | スクリプトタグの更新 |
| DELETE | /appstore/v1/script_tags/{scriptTagId}.json | スクリプトタグの削除 |
| GET | /v1/inline_script_tags.json | インラインスクリプトタグの取得 |
| POST | /v1/inline_script_tags.json | インラインスクリプトタグの登録 |
| GET | /v1/inline_script_tags/{inlineScriptTagId}.json | インラインスクリプトタグの取得 |
| PUT | /v1/inline_script_tags/{inlineScriptTagId}.json | インラインスクリプトタグの更新 |
| DELETE | /v1/inline_script_tags/{inlineScriptTagId}.json | インラインスクリプトタグの削除 |
| GET | /v1/script_tags.json | スクリプトタグの取得 |
| POST | /v1/script_tags.json | スクリプトタグの作成 |
| GET | /v1/script_tags/{scriptTagId}.json | スクリプトタグの取得 |
| PUT | /v1/script_tags/{scriptTagId}.json | スクリプトタグの更新 |
| DELETE | /v1/script_tags/{scriptTagId}.json | スクリプトタグの削除 |
Questions
Does the カラーミーショップアプリストア API API need an API key?
Yes. The カラーミーショップアプリストア API API uses OAuth authentication; the documentation explains how to get credentials.
Does the カラーミーショップアプリストア API API support HTTPS?
Yes, the カラーミーショップアプリストア API API is served over HTTPS.
How many endpoints does the カラーミーショップアプリストア API API have?
Its OpenAPI description lists 18 endpoints in version 1.0.0. All of them are shown on this page.
What are alternatives to the カラーミーショップアプリストア API API?
Other Shopping APIs include Etsy, eBay, Flipkart Marketplace, Inventory Management, Intel Product Catalogue Service.
Similar shopping APIs
Compare alternatives →Etsy
ShoppingManage shop and interact with listings
eBay
ShoppingSell and Buy on eBay
Flipkart Marketplace
ShoppingProduct listing management, Order Fulfilment in the Flipkart Marketplace
Inventory Management
ShoppingMaintaining up-to-date inventory for your items on Walmart.com ensures a great experience for your customers and greater sales opportunities for you.
Intel Product Catalogue Service
ShoppingThis is the documentation for PIM Micro services. In order to use this tool you need to have Basic Auth credentials and a client id. If you dont have one, please make sure to request one by sending an email to the PIM MS team: [[email protected]](mailto:[email protected]?subject=PIMServices)
Item API
ShoppingPlease make sure you use the correct version of the APIs for your use case. To find out the appropriate version, go to the API Docs drop down on the menu.
Listed from APIs.guru (CC0).