> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Integrate Backend Applications to Call fabric APIs

> General guidelines to integrate with backend APIs or your backend daemon application with the appropriate permissions to call fabric APIs.

<Steps>
  <Step title=" Create system app">
    Create System App with the right set of roles. For details on how to create a System App, refer to [https://developer.fabric.inc/v3/docs/api-key-management#creating-api-apps](https://developer.fabric.inc/v3/docs/api-key-management#creating-api-apps).

    Once the app is created, capture the app credentials including the associated authentication information. To do this, refer to the steps here [https://developer.fabric.inc/v3/docs/api-key-management#viewing-api-apps](https://developer.fabric.inc/v3/docs/api-key-management#viewing-api-apps)
  </Step>

  <Step title="Generate access token">
    Generate an access token using the System App credentials, which include Authorization URL, Client ID, and Client Secret.

    This access token is required in the next step to access fabric APIs, such as Product Catalog, Offers, and more.

    ```bash cURL theme={null}

    curl --location '<authorizationUrl>/v1/token' \
    --header 'accept: application/json' \
    --header 'cache-control: no-cache' \
    --header 'content-type: application/x-www-form-urlencoded' \
    --data-urlencode 'grant_type=client_credentials' \
    --data-urlencode 'scope=s2s' \
    --data-urlencode 'client_id=<clientId>' \
    --data-urlencode 'client_secret=<clientSecret>'
    ```
  </Step>

  <Step title="Perform Login">
    Trigger the required fabric API, such as the Product Catalog API, to get items from the catalog. Use the generated access token in the Authorization header to authenticate the API request.

    Note: Some of the fabric APIs require higher levels of permissions to run successfully. Hence, it is crucial to create the System App with the appropriate set of roles in Step 1.

    ```bash cURL theme={null}
    curl --location 'https://api.fabric.inc/v3/published-products/skus/<sku>?locale=<locale>' \
    --header 'x-fabric-tenant-id: <Tenant-Id>' \
    --header 'Authorization: Bearer <Generated-access-token>'
    ```
  </Step>
</Steps>
