External Data (Single / UPSERT)

Manage external data for products. GET retrieves data with filtering. POST performs UPSERT using (dataid, name) as composite key: if record exists → UPDATE with new value, if not → INSERT new record. PUT updates by record ID.

HTTP: GET | POST | PUT /external-data

Query parameters

NameTypeRequiredDescriptionExample
limitintegernoMaximum rows per page (default 100).50
pageintegerno1-indexed page when limit is provided.1
offsetintegernoExplicit row offset.0
dataidstringnoFilter by product ID. Required for POST/PUT.24
namestringnoFilter by or specify data name. Required for POST/PUT.competitor_price
valstringnoData value. Required for POST/PUT.299.90
datumstringnoTimestamp for the data (defaults to now for POST).2025-10-16 12:00:00
idintegernoID of specific record to update (PUT only).123
sortstringnoSort column (id, datum, dataid, name).datum
directionstringnoSort direction asc or desc.desc

Notes

Sample request

curl -H "Authorization: ApiKey YOUR_API_KEY" "https://admin.elpricing.com/api/external-data"

Interactive call

Queue workflow

Tasks are persisted to var/api_queue/tasks.json. Process them with:

php go.php cron:list\nphp go.php cron:go

Logs are written to var/api_queue/logs/{task_id}.log.