Get briefs
In this guide we will see how to get the latest created or updated briefs and retrieve the company related to each brief.
Prerequisites
- An access token for the HIPE instance
Get the briefs
To get the briefs available in HIPE, you will need to make a GET request to the /api/briefs endpoint API reference.
Since your application only needs the briefs that have been updated since the last called, you can add query parameters to the request to narrow down the results.
The available parameters are:
page: The page number to return (default:1). The response includes ametaobject with ahasNextPageproperty indicating if there is more data to fetch.limit: The number of briefs to return per page (default:25, maximum:500).status: Comma-separated list of status UUIDs to filter briefs. See how to get status UUIDs.lastupdate: ISO 8601 timestamp (e.g.,2023-04-17T12:51:26.998Z) to filter briefs updated after this date.order: Sort order for the results (recommended:+updatedAtfor ascending order by update time).
curl --location 'https://{ YOUR INSTANCE }-hipe.packitoo.com/api/briefs?page={page}&limit={limit}&order={order}&status={status}&lastupdate={lastupdate}'--header 'X-ACCESS-TOKEN: { YOUR ACCESS TOKEN }'Find more information regarding the parameters and the outputs in the API reference.
Get the company related to each brief
To get the company related to each brief, you will need to extract from the output of each brief previously fetched the companyId if their is a project object.
Now we can use the companyId to get the company related to each brief.
curl --location 'https://{ YOUR INSTANCE }-hipe.packitoo.com/api/companies/{ companyId }'--header 'X-ACCESS-TOKEN: { YOUR ACCESS TOKEN }'With this request you will be able to know to witch company the brief is assigned and extract the related information.
Find more information in the API reference regarding the output for this request.
Get the brief technical information
You can use the id of the brief to get the technical information of the brief.
curl --location 'https://{ YOUR INSTANCE }-hipe.packitoo.com/api/briefs/{ briefId }'--header 'X-ACCESS-TOKEN: { YOUR ACCESS TOKEN }'with this call your able to retrieve the dimensions of the product(s) requested, the material(s), the print(s) etc …
To get more details about the available output refer to the API reference.