Skip to content
GuidesPlaygroundDashboard

Get async optimization result

$client->optimize->retrieve(string jobID): OptimizeJobStatus
GET/api/v1/optimize/{job_id}

Get async optimization result

ParametersExpand Collapse
jobID: string
ReturnsExpand Collapse
Status status

Job status

?string error

Error message when failed

?mixed result

Optimization result when completed

Get async optimization result

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'My API Key', environment: 'local');

$optimizeJobStatus = $client->optimize->retrieve('job_id');

var_dump($optimizeJobStatus);
{
  "status": "completed",
  "error": "error",
  "result": {}
}
Returns Examples
{
  "status": "completed",
  "error": "error",
  "result": {}
}