External Data (Bulk UPSERT)

Bulk upsert multiple external data records in a single API call. Each record is upserted (updated if exists, inserted if new) based on (dataid, name) composite key. Significantly faster than individual POST calls for batch operations.

HTTP: POST /external-data-bulk

Query parameters


Warning: Array to string conversion in /var/www/vhosts/admin.elpricing.com/httpdocs/api/index.php on line 3713
NameTypeRequiredDescriptionExample
recordsarrayyesArray of external data records. Each must have: dataid, name, val. Optional: datum (auto-filled if omitted). Array

Notes

Sample request

curl -X POST https://admin.elpricing.com/api/external-data-bulk
  -H "Authorization: ApiKey YOUR_API_KEY"
  -H "Content-Type: application/json"
  -d '{"records":[{"dataid":"24","name":"competitor_price","val":"299.90"},{"dataid":"25","name":"competitor_price","val":"349.90"},{"dataid":"26","name":"supplier_stock","val":"15"}]}'

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.