Using the Commerce API, you can integrate your Commerce account with your inventory and order management system programmatically to manage products and inventory and orders.
Go to Meta for Developers and click My Apps > Create App. You can also use an existing app.
We recommend using access tokens backed by a system user to access the Commerce API. An access token obtained from a typical user can be invalidated after a period of time, or if that user changes their Facebook password.
If you've not done so already, add your app to your Business Manager.
Add system users to your Business Manager. You can also use an existing system user in your business.
Assign your system user admin access to the following assets in your Business Manager:
You can only use the system user's access token to access assets assigned to the system user. Once you set up your production commerce account, make sure that you also assign the system user to the relevant assets.
On the Business Manager > System User page, click Add Assets and assign the system user as an admin of your app.
Click Generate Token to generate an access token.
Request the following permissions when you generate the access token:
catalog_management
if you plan to use API to manage catalogsbusiness_management
if you plan to use API to manage business assetscommerce_manage_accounts
or commerce_account_read_settings
commerce_account_manage_orders
or commerce_account_read_orders
commerce_account_read_reports
to access the Finance Reporting APIUse the Access Token Debugger tool to verify that your access token has the required permissions.
Before your app is approved by App Review, your app can only access a test commerce account, so make sure you generate a Page access token for the Facebook Page backing your test commerce account.
By default, your shop is configured to automatically move new orders to the IN_PROGRESS
state. To enable order acknowledgment, you must first associate your shop with your app. This one-time operation is recommended if you are planning to fulfill orders using the Order Management APl, and will leave new orders in the CREATED
state until you acknowledge them.
Place test orders on your shop using the App Dashboard.
Begin managing your orders placed in your test commerce account using the Order Management API.
Once you demonstrate your integration on a test account, submit your app for App Review to manage a real commerce account.
If you are a platform that builds integration for your sellers, you need to build an onboarding flow that automates steps 2 to 5 so that you can make API calls on the seller's behalf. Learn more about Platform Integration and Seller Onboarding.