Your First API Call
This walkthrough takes you from an API key to your first successful request: listing purchase orders (POs) in Quality Risk Management (QRM).
Before you start​
- Access to the Inspectorio Pre-Production environment. Contact your Customer Success Manager (CSM) if you don't have it.
- An
AdminorAccount Ownerrole in your organization, to create API keys. - A tool to send HTTP requests, such as
curlor Postman.
1. Create an API key​
In the Inspectorio platform, go to Configuration > API Keys and click Create API Key. Copy the key and store it somewhere safe. Inspectorio does not store the key and cannot show it again.
For step-by-step screenshots, including Responsible Sourcing & Compliance, see Authentication.
2. Send a request​
Send the key in the apiKey header. The limit and offset parameters control pagination.
curl --request GET \
--url "https://sight.pre.inspectorio.com/api/v1/purchase-orders?limit=10&offset=0" \
--header "apiKey: <YOUR_API_KEY>"
3. Read the response​
A successful request returns 200 OK. List endpoints return the records in data, together with the pagination values and the total number of matching records:
{
"data": [
{
"poNumber": "...",
"productLineId": "...",
"vendorId": "..."
}
],
"limit": 10,
"offset": 0,
"total": 1
}
If the list is empty, your organization has no POs in this environment yet. You can create one with Create Purchase Order, or with the V3 Purchase Order API if you use linked items.
4. If something goes wrong​
| Response | Likely cause |
|---|---|
401 | The apiKey header is missing, or the key is invalid or was removed. |
404 | The URL or path is wrong. Check the base URL for the product in Environments and Base URLs. |
422 | A parameter value is not valid. The errors object tells you which one. |
See Error codes for the full list, and use the Integration Center to review your requests.
Next steps​
- Explore the QRM API reference. Each endpoint page has request samples in several languages.
- Read the guide for your use case under Product Guides, for example Purchase Orders.
- Before going live, switch the base URL to Production:
https://sight.inspectorio.com.