Skip to main content

Supplier Management

Use the Supplier Management API to keep your supplier ecosystem in Inspectorio in sync with your own systems: the organizations you work with, their sub-organizations, their identifiers, and the relationships between them.

Before you start​

  • Generate an API key for your organization and use it to authenticate your API requests.
  • The base URL is https://integration.inspectorio.com. See Environments and Base URLs.

Internal and external IDs​

Most endpoints accept either the Inspectorio (internal) ID or your own (external) ID of an organization. Use the kind query parameter to say which one you are sending: internal (default) or external.

Organizations​

ActionEndpoint
List organizationsGET /api/v1/ecosystem/organizations
Get an organizationGET /api/v1/ecosystem/organizations/{id}
Create or update organizations in bulkPUT /api/v1/ecosystem/organizations

The bulk upsert creates new organizations and updates existing ones in a single request. Each organization requires:

  • type: F (Factory), S (Supplier), B (Brand), R (Retailer), or I (Inspection Agency)
  • name and address
  • country: ISO 3166-1 alpha-2 code, for example VN
  • id or externalId: externalId is required when id is not provided, and is used to find the existing record
{
"data": [
{
"externalId": "SUP-001",
"type": "S",
"name": "Supplier A",
"address": "12 Example Street",
"country": "VN"
}
]
}

The response has one result per organization, with its own status and operationType (create or update). If some records succeed and others fail, the request returns 207 Multi-Status, so always check the result of each record:

{
"data": [
{ "id": 1, "status": 201, "operationType": "create" },
{ "status": 400, "operationType": "update", "error": "value too long for type character varying(2)" }
]
}

When listing organizations, use limit and offset for pagination, and sort to order the results, for example sort=name:asc. The default order is createdAt:desc.

Sub-organizations​

Sub-organizations have their own list, get, and bulk upsert endpoints: List, Get, and Bulk upsert. To link a sub-organization to other organizations, use Manage sub-organization relationships.

Identifiers​

Add identifiers to an organization with the identifier endpoints. The identifierId must be one of the values returned by List Identifier Types.

Relationships​

Relationships describe how organizations in your ecosystem work together. Use the V2 endpoints: List Relationships (V2) and Manage Relationships (V2). The V1 endpoints are deprecated.

Each relationship has a source and a target organization, a relationshipStatus (active or inactive), and one or more types. You can send up to 100 relationships per request.

Full replacement

Manage Relationships replaces the full set of relationships of the organization. Any existing relationship that is not included in the request is deleted. Always send the complete list.

Migrating from V1 to V2: V1 accepts a single relationship type; V2 accepts a list of types. V2 also lets you link existing organization contacts to a relationship with contacts[].email.

Reference data​

Use these lookup endpoints to get the valid values for your requests: capabilities, contact roles, identifier types, and relationship types.