Skip to main content
PATCH
/
v1
/
batches
/
{batch_id}
Update batch metadata
curl --request PATCH \
  --url https://api.olostep.com/v1/batches/{batch_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "status": "reviewed",
    "reviewer": "jane@example.com"
  }
}
'
{
  "id": "batch_abc123def456",
  "object": "batch",
  "status": "completed",
  "created": 1704067200,
  "total_urls": 10,
  "completed_urls": 10,
  "metadata": {
    "batch_name": "Q1 Product Sync",
    "status": "reviewed",
    "reviewer": "jane@example.com"
  }
}
Merge semantics: Metadata updates follow Stripe’s approach — new keys are added, existing keys are updated, and keys set to empty string "" are deleted.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

batch_id
string
required

The ID of the batch to update.

Body

application/json
metadata
object
required

Set of key-value pairs for storing additional information about an object. Follows Stripe's approach with validation rules: max 50 keys, key max 40 characters (no square brackets), value max 500 characters, all values stored as strings.

Example:
{
"order_id": "12345",
"customer_name": "John Doe",
"priority": "high",
"processed": "true"
}

Response

Batch metadata updated successfully.

id
string

Batch ID

object
string

The kind of object. "batch" for this endpoint.

status
string

in_progress or completed

created
number

Created epoch

total_urls
number

Count of URLs in the batch

completed_urls
number

Count of completed URLs

metadata
object

Set of key-value pairs for storing additional information about an object. Follows Stripe's approach with validation rules: max 50 keys, key max 40 characters (no square brackets), value max 500 characters, all values stored as strings.

Example:
{
"order_id": "12345",
"customer_name": "John Doe",
"priority": "high",
"processed": "true"
}