Moksa Integration API 整合 API

REST API keys and signed webhooks for ERP, POS and warehouse systems: products, inventory, orders, customers, coupons. 整合 API 與 Webhook。

View source
Public name@moksaweb.com/moksa-commerce-api

Or open Registry in your EmDash admin and search for this name.

Overview

給 ERP、POS、倉儲等外部系統串接商店的整合 API:

  • REST API(/api/shop/integration/v1):商品、SKU 與條碼查詢、分類、庫存、訂單(含增量同步 updated_after)、顧客、優惠券
  • API 金鑰:只在建立時顯示一次;權限(scopes)、每分鐘請求上限、IP 白名單、個資遮罩;撤銷後 30 秒內失效
  • Webhook:訂單成立/付款/取消/退款、庫存變動、商品更新;Standard Webhooks 簽章、約 3 天內重試 8 次、持續失敗自動停用、後台查看與重送
  • OpenAPI 3.1 文件

金鑰只保存雜湊;Webhook 密鑰加密保存,由本外掛簽章,網站不持有密鑰。

Permissions

Plugins get only the capabilities they declare and you approve. Your EmDash admin lists these again before anything installs.

  • Read content

    Read entries from your site’s content collections.

FAQ

金鑰遺失了怎麼辦?

金鑰只在建立時顯示一次,系統只保存雜湊。請撤銷舊金鑰、建立新的。

可以用 API 修改訂單或庫存嗎?

第一階段只開放讀取與 Webhook 管理;寫入(出貨、庫存調整、POS 訂單)在後續版本。

Webhook 會重複送嗎?

可能(至少一次)。每個事件有固定的 webhook-id,接收端用它去重。

Changelog

  • 0.1.0:第一個公開版本。

Installation

  1. 網站必須先安裝並設定 @moksa/emdash-shop 網站整合套件(必要;API 網址、外掛之間的匯流排與 Webhook 傳送都由它提供)。步驟見 @moksa/emdash-shop 的 README。
  2. 從 registry 安裝 moksa-commerce-core(必要)。
  3. 在 EmDash 後台的「外掛」頁從 registry 安裝本外掛。
  4. 執行 npx moksa-shop-provision-bus <網站網址> <管理員 API token>,把匯流排金鑰寫入本外掛。
  5. 在「API 金鑰」頁建立金鑰,交給外部系統;在「Webhook」頁新增接收網址。

不用沙盒、要在網站程序內執行的話,改用自架版分類包 @moksa/commerce-pack-*(見 @moksa/commerce-pack-core 的 README)。

Keep exploring

More plugins like Moksa Integration API 整合 API

Browse by keyword, or see everything @moksaweb.com publishes.

Install on your site

Open in EmDash

Moksa Integration API 整合 API

@moksaweb.com/moksa-commerce-api

Choose the EmDash site where you want to review this plugin. Nothing is installed until you confirm its permissions in that site's admin.

This browser will remember the site. You can change it next time.