productretrieval

The ContentHub Product Model Retrieval API allows to retrieve construction plans for products.


API Settings

Help


Note: This API only supports the Client Credentials flow. This means that you will log in only using your application's client ID and client secret, without actually authenticating a user. In effect, any /token end point of the below Authentication Method(s) can be used for that.


Log in using a local username and password.

Token Endpoint

This API supports the following OAuth2 authorization flows:

Quickstart

  1. Sign up for the portal
  2. Register your application
    1. Leave the checkbox for OAuth2.0 Flows unchecked
    2. In case you are using a Server side application, make sure to select "Confidential: Server side application" from the Client Type dropdown
  3. Subscribe to the Product Retrieval API by clicking on the "Subscribe" button at the end of this page
    1. Leave the checkbox "Trust this application" unchecked

After that, the admin at Haufe-Lexware will choose a scope for your use-case and inform you about it. You can also notice the assigned scopes at any time by selecting to view an application under the "Applications" tab, then by pressing on the "Select" button to choose for which subscription you are interested to view the scopes.

Now you are ready to use the API. There are two important URLs:

  1. The token endpoint URL
  2. The API URL

Both of them you can find right above at the top of this page - the token endpoint URL is shown when you unfold the section with the greenish background (entitled "Username and Password (local)").

Now you need to use this command to request a token:

curl --location --request POST '<token-endpoint-url>'  \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=...' \
--data-urlencode 'client_secret=...' \
--data-urlencode 'scope=...'

The response to this request consists of a small JSON object that contains the token in the access_token property. All the requests have to contain the token as part of the Authorization header like this:

curl --location --request GET '<api-url>/productretrieval/v1/constructionPlans' \
--header 'Authorization: Bearer <access-token>'

Retrieving construction plans

The API offers methods to list metadata of recently published construction plans and downloading their content. For details please take a look at the Swagger documentation linked below.

View Swagger definition »

Not logged in

You are currently not logged in, so we can't display your registered applications. Please log in first.

Log in »