Ga naar inhoud
English

Je eerste request

Je eerste request leest het account waar je integratie bij hoort: eerst het account zelf, dan de modellen erin. Maak de integratie eerst in Portal, zoals authenticatie beschrijft.

De requests hieronder gebruiken 2 shellvariabelen: $CLIENT_ID en $CLIENT_SECRET van je integratie. Zet TOKEN op de access_token uit de eerste stap.

Wissel de ID en het geheim van de integratie in voor een token:

Request
curl -X POST https://api.virtualdisplay.io/v1/oauth/token \
-d grant_type=client_credentials \
-d client_id=$CLIENT_ID \
-d client_secret=$CLIENT_SECRET

Kopieer access_token uit de response naar TOKEN.

GET /v1/customers/me geeft het account waar het token bij hoort:

GET /v1/customers/me Read the Customer you act for, and its subscription.

Request

Terminal window
curl -X GET "https://api.virtualdisplay.io/v1/customers/me" \
-H "Authorization: Bearer $TOKEN"

Response 200

{
"customer": {
"company_name": "Example Furniture",
"created_at": "2026-09-01T08:00:00Z",
"id": "0196a1ef-2b7c-7d90-b1e4-8f0a3c6d9e15",
"model_count": 42
},
"subscription": {
"ends_at": "2026-12-10T00:00:00Z",
"model_limit": 50,
"status": "active",
"tier": "Pro 50"
}
}
Wat elk veld betekent

Velden van de response

  • customer: The Customer you act for.
  • customer.company_name: The company name the Customer entered.
  • customer.created_at: When the account was created.
  • customer.id: The Customer's id. It is the id your token names, and a stable key for software that manages several accounts.
  • customer.model_count: How many models the Customer has that are not deleted.
  • subscription: The subscription the Customer is on. Absent when the Customer has none.
  • subscription.ends_at: When the grace after a cancellation ends, and the models move to the archive. Absent while the subscription runs.
  • subscription.model_limit: How many models the subscription lets the Customer have. An upload is refused past it.
  • subscription.status: active while the subscription runs, and cancelled once it has been cancelled.
  • subscription.tier: The name of the tier the subscription is on.
  • customer is het account: de company_name, wanneer het is aangemaakt (created_at) en hoeveel modellen erin staan (model_count).
  • subscription is het niveau van het account (tier), de status en de model_limit die erbij hoort. Heeft het account geen abonnement, dan ontbreekt dit veld.

GET /v1/models geeft 1 pagina met de modellen van het account:

GET /v1/models List your models, live or archived.

Request

Terminal window
curl -X GET "https://api.virtualdisplay.io/v1/models" \
-H "Authorization: Bearer $TOKEN"

Response 200

{
"models": [
{
"archived_at": "2026-11-10T00:00:00Z",
"archives_on": null,
"embed_url": "https://embed.virtualdisplay.io?app=eiken-stoel",
"file_size": 2481916,
"id": "0196a1f0-b8d4-7e21-8a6f-3c9d1e5b2f40",
"load_count": 1284,
"name": "eiken-stoel",
"purge_at": "2027-01-09T00:00:00Z",
"thumbnail_url": "https://static.virtualdisplay.io/thumbnails/0196a1f2-4c3e-7b18-9d2a-6e8f0b1c3d57/9c4e2f7a1b8d3e6f0a5c9b2e7d4f1a8c3e6b9d2f5a0c7e4b1d8f3a6c9e2b5d7f.png",
"uploaded_at": "2026-11-16T14:03:21Z"
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 42,
"total_pages": 3
}
}
Wat elk veld betekent

Velden van de response

  • models: One page of your models, in the order the sort asked for.
  • models.archived_at: When the account archive moved the model's files out of the live bucket. Set only on an archived model.
  • models.archives_on: The UTC day the downgrade archive moves this live model, or null. Set only while a Shopify downgrade grace is pending.
  • models.embed_url: The embed URL of the model's default app, the address a Customer's page embeds.
  • models.file_size: The stored GLB in bytes, after sanitising.
  • models.id: The model's id. Use it in the model path. It is not the filename.
  • models.load_count: How many times a Shopper has viewed the model in a viewer. Zero until the first view.
  • models.name: The model's name: its file's name without the .glb extension.
  • models.purge_at: When the archived files are deleted for good. Set only on an archived model.
  • models.thumbnail_url: A PNG of the model's default app, or null while that app has none.
  • models.uploaded_at: When the file was uploaded, or last replaced. A replace moves it forward.
  • pagination: Where this page sits among the matching models.
  • pagination.page: The page this answer is for, starting at 1.
  • pagination.per_page: How many items a page holds.
  • pagination.total: How many items match, across every page.
  • pagination.total_pages: How many pages the matching items fill.
  • page en per_page bepalen de pagina: standaard 20 modellen, hooguit 100.
  • sort bepaalt de volgorde: newest (standaard), oldest, name of views. Elke andere waarde is een validation_error op sort.
  • thumbnail_url is het plaatje van de standaard-app van het model, null zolang die er geen heeft.
  • pagination.total telt alle modellen van het account die passen, niet alleen die op deze pagina.

Werkt dit, dan leest zien wat er veranderd is de geschiedenis van het account. Mislukt een request, dan zegt foutmeldingen wat elke status betekent en wat je daarna doet.