---
schema_version: "1"
id: 2087a0a39834f05b33423c108fdaa5fa1f74dba1fb2d2503663fd1c4672346f4
title: Set Up the Headless Commerce API as a Connected App
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/oci_impl_setup_headless_api.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.oci_impl_setup_headless_api.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5dea15ab9e02a56ae4fe8cc5c87972154e1fcad87ee31864db83c8d32467e10e
description: Set up the Headless Commerce API as a connected app.
products:
  - Commerce
  - Omnichannel Inventory
release: "264"
---
# Set Up the Headless Commerce API as a Connected App

Set up the Headless Commerce API as a connected app.

1. Create a private key and certificate. Follow the instructions in [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm) in the Salesforce DX Developer Guide.
2. In Salesforce, from Setup, in the Quick Find box, enter OAuth Custom Scopes, and then select **OAuth Custom Scopes**.
3. Click **New Custom Scope**.
4. For each of the Omnichannel Inventory scopes, enter the Name and Description, and then save it.
    
    |  |  |
    | --- | --- |
    | Name | Description |
    | sfcc\_inventory\_impex\_graphs | Export location graphs. |
    | sfcc\_inventory\_impex\_inventory\_rw | Import inventory records. |
    | sfcc\_inventory\_impex\_inventory | Export inventory records. |
    | sfcc\_inventory\_availability | Get inventory availability data. |
    | sfcc\_inventory\_availability\_rw | Update inventory availability data. |
    | sfcc\_inventory\_reservations | Get inventory reservation information. |
    | sfcc\_inventory\_reservations\_rw | Update inventory reservations. |
5. In the Quick Find box, enter App Manager, and then select **App Manager**.
6. Click **New Connected App**.
7. Enter a Connected App Name and a Contact Email.
8. To display the API settings, select **Enable OAuth Settings**.
9. Select **Enable for Device Flow**. Keep the auto-populated Callback URL value.
10. Select **Use Digital Signatures**. Click **Choose File**, then browse to and select the server.crt certificate file that you created in the first step.
11. Select and add the desired OAuth Scopes.
12. Select **Require Secret for Web Server Flow**.
13. Select **Require Secret for Refresh Token Flow**.
14. Save the app.
15. Click **Continue** and wait for the app to appear. It can take up to 10 minutes.
16. Click **Manage**.
17. Click **Edit Policies**.
18. Set the OAuth Policies and Session Policies as desired.
19. Save the policies.
20. Scroll to the OAuth Custom Scopes section, and then click **Manage OAuth Custom Scopes**.
21. Select all of the inventory scopes that you added, and then save the scopes.
22. In the Quick Find menu, click **App Manager**.
23. From your app’s dropdown menu, select **View**.
24. Scroll to the Initial Access Token for Dynamic Client Registration section, and then click **Generate**.
25. Create a JWT and request an access token. Follow the instructions in [OAuth 2.0 JWT Bearer Flow for Server-to-Server Integration](https://help.salesforce.com/s/articleView?id=remoteaccess_oauth_jwt_flow.htm&language=en_US) in Salesforce Help.
26. In the Quick Find box, enter Omnichannel Inventory, and then select **Omnichannel Inventory**.
27. Record the Tenant Group ID and the Base URL for Inventory API Calls.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_note.png)
    
    Note When making calls to the headless Commerce API, use the tenant group ID as the organization ID.