Skip to content

Public Unit Conversions Bulk Upsert

Request

Bulk-upsert unit conversions (async).

Accepts up to 100,000 rows per call. Each row upserts the (article_number, alternative_unit) conversion; rows whose article doesn't exist are skipped (see the job's skipped_count).

Response. 202 Accepted with JobAck on the first call; 200 OK with the same JobAck on an idempotent replay. Poll GET /jobs/{job_id} for terminal status.

Idempotency. Pass an Idempotency-Key header (≤ 255 chars); the same key with a different body returns 422.

Headers
authorizationstring or null(Authorization)

Bearer <mrc_live_…> API key

Idempotency-Keystring or null(Idempotency-Key)

Optional client-supplied key for safe retries; <= 255 chars

Bodyapplication/jsonrequired
unit_conversionsArray of objects, [ 1 .. 100000 ] items(Unit Conversions)required
curl -i -X POST \
  https://docs.mercura.ai/_mock/openapi/articles/unit-conversions \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -H 'authorization: string' \
  -d '{
    "unit_conversions": [
      {
        "article_number": "string",
        "alternative_unit": "string",
        "numerator": 1,
        "denominator": 1
      }
    ]
  }'

Responses

Idempotent replay — same job returned

Bodyapplication/json
job_idstring(Job Id)required
Example:"4242"
status_urlstring(Status Url)required

Relative URL to poll for this job's status

Example:"/api/public/v1/jobs/4242"
Response
{ "job_id": "4242", "status_url": "/api/public/v1/jobs/4242" }