# カラーミーショップアプリストア API API

> # カラーミーショップアプリストア 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": "shop@example.com" } ``` 例) 月額課金の場合 ``` { "account_id": "PA00000001", "application_charge_source_id": "F3RN9A", "recurring_application_charge_id": "A3FT4N", "mail": "shop@example.com" } ``` 無料お試し期間を設定した課金の場合、以下の情報を `trial_term` パラメータとして送信します。 無料お試し期間中は従量課金APIを呼び出して課金請求することはできません。 |パラメータ|機能|形式| |---|---|---| |`starts_at`|無料お試し開始日時|整数値(UNIXタイムスタンプ)| |`ends_at`|無料お試し終了日時|整数値(UNIXタイムスタンプ)| 例) 無料お試し期間がある月額課金の場合 ``` { "account_id": "PA00000001", "application_charge_source_id": "F3RN9A", "recurring_application_charge_id": "A3FT4N", "mail": "shop@example.com", "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

- Category: [Shopping](https://www.openparable.com/apis/category/shopping)
- Provider: shop-pro.jp
- Authentication: OAuth
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://api.shop-pro.jp
- Documentation: https://shop-pro.jp/?mode=inq
- OpenAPI description: https://api.apis.guru/v2/specs/shop-pro.jp/1.0.0/openapi.json
- Version: 1.0.0
- Specification updated: 2023-03-06

## Example request

```bash
curl -X GET "https://api.shop-pro.jp/appstore/v1/script_tags.json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Endpoints

- `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

- [Etsy](https://www.openparable.com/apis/etsy): Manage shop and interact with listings
- [eBay](https://www.openparable.com/apis/ebay): Sell and Buy on eBay
- [Flipkart Marketplace](https://www.openparable.com/apis/flipkart-marketplace): Product listing management, Order Fulfilment in the Flipkart Marketplace
- [Inventory Management](https://www.openparable.com/apis/inventory-management): Maintaining 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](https://www.openparable.com/apis/intel-product-catalogue-service): This 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: [pim.360.team@intel.com](mailto:pim.360.team@intel.com?subject=PIMServices)
- [Item API](https://www.openparable.com/apis/item): Please 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.
- [Tokopedia](https://www.openparable.com/apis/tokopedia): Tokopedia's Official API for integration of various services from Tokopedia
- [Pendo Feedback API](https://www.openparable.com/apis/pendo-feedback): ## Who is this for? This documentation is for developers creating their own integration with [Feedback's](https://www.pendo.io/product/feedback/) API. If you are doing a standard integration, there's a really easy [Javascript integration](https://help.receptive.io/hc/en-us/articles/209221969-How-to-integrate-Receptive-with-your-app) that you should know about before you go to the effort of building your own integration. ## Authentication API calls generally need to be authenticated. Generate an API Key at https://feedback.pendo.io/app/#/vendor/settings?section=integrate. This key should then be added to every request as a request header named 'auth-token' (preferred), or as a query parameter named 'auth-token'. ## Endpoint API endpoint is https://api.feedback.eu.pendo.io / https://api.feedback.us.pendo.io depending where your datacenter is located. ## Notes API endpoints are being added to this documentation as needed by customers. If you don't see an endpoint you need please contact support and if it exists we'll publish the docs here. The 'try it out' feature on this documentation page will probably be blocked by your browser because the Access-Control-Allow-Origin header has its value set by the Feedback server depending on your hostname. ## Generating client code This documentation is automatically generated from an OpenAPI spec available [here](http://apidoc.receptive.io/receptive.swagger.json). You can use Swagger to auto-generate API client code in many languages using the [Swagger Editor](http://editor.swagger.io/#/)
- [OLX Poland](https://www.openparable.com/apis/olx-poland): Integrate with local sites by posting, managing adverts and communicating with OLX users
- [Shopee](https://www.openparable.com/apis/shopee): Shopee's official API for integration of various services from Shopee
- [Mercadolibre](https://www.openparable.com/apis/mercadolibre): Manage sales, ads, products, services and Shops
- [Shop](https://www.openparable.com/apis/shop): Search for millions of products from the world's greatest brands.

Listed from: APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/api-shop-pro (OpenParable). Cite the canonical URL above.
