Zum Hauptinhalt springen
GET
/
api
/
import-jobs
/
{jobId}
Get Import Job
curl --request GET \
  --url https://app.polygonone.com/api/import-jobs/{jobId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://app.polygonone.com/api/import-jobs/{jobId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://app.polygonone.com/api/import-jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.polygonone.com/api/import-jobs/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://app.polygonone.com/api/import-jobs/{jobId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.polygonone.com/api/import-jobs/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.polygonone.com/api/import-jobs/{jobId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "progress": {
    "total": 123,
    "processed": 123,
    "failed": 123
  },
  "result": {
    "imported": [
      {}
    ],
    "failed": [
      {
        "error": "<string>"
      }
    ],
    "skipped": 123,
    "updated": [
      {}
    ]
  },
  "error": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "finishedAt": "2023-11-07T05:31:56Z"
}
{
"error": "<string>",
"details": "<unknown>"
}
{
"error": "<string>",
"details": "<unknown>"
}
{
"error": "<string>",
"details": "<unknown>"
}

Autorisierungen

Authorization
string
header
erforderlich

API key generated in Settings > API Keys. Include as Authorization: Bearer <key>.

Pfadparameter

jobId
string<uuid>
erforderlich

Job id returned by the batch POST (also in its Location header)

Antwort

The import job

Async batch import job. completed and failed are terminal — stop polling. The staged input payload is freed ~24 h after the job finishes and the job row itself is deleted ~30 days after creation; poll and persist the result within that window.

jobId
string<uuid>
kind
enum<string>
Verfügbare Optionen:
articles,
suppliers,
orders
status
enum<string>
Verfügbare Optionen:
queued,
running,
completed,
failed
progress
object
result
object | null

Entity-native merged batch result, present once status is completed. Orders additionally carry skippedOrders and autoCreated; articles carry skippedRows; suppliers carry inferredCountryCount.

error
string | null

Stable machine key when status is failed — e.g. workerError, dispatchFailed, or a JSON string for structured failures: {"key":"lineReplacementRequired","orderNumbers":[…]} or {"key":"invalidPayload","issues":[{"path","code"}]}. Never contains payload values.

createdAt
string<date-time>
finishedAt
string<date-time> | null