VocalDocscontracts 1.65.0

Pull the Provider inventory from the vendors

POST /v1/platform/inventory/sync

PropertyValue
Operationsync_inventory
GroupPlatform
Scopeplatform:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited platform.inventory.sync (mutation)
Released in1.12.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Calls the list endpoints of each named Provider, or of every Provider when none is named, with the Provider's active platform credential, and stores what they list: new items are added, changed names and attributes updated, and items no longer listed marked with missing_since; nothing is deleted. A Provider that fails is reported in its own error and changes nothing; dependency_unavailable answers when no named Provider could be reached. The Audit event records the counts per Provider. No vendor is called on the Call path.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the platform:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/platform/inventory/sync" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: InventorySyncRequest.

FieldTypeRequiredDescription
kindsarray of InventoryKindnoModels, voices or both; both when omitted.
providersarray of ProviderIdnoThe Providers to sync; every Provider with a list when omitted.

Responses

StatusContent typeShapeError codes
200application/jsonInventorySyncResult
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
409application/jsonErrorEnvelopeidempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error
503application/jsonErrorEnvelopedependency_unavailable

Fields of the 200 answer

The shape is InventorySyncResult.

FieldTypeRequiredDescription
finished_atTimestampyes
object"inventory_sync"yes
providersarray of InventorySyncProviderResultyes
started_atTimestampyes