Skip to Content
REST APIGroups

Groups

A group is the level-1 organisational unit: every scraper belongs to exactly one group, and the group’s dataTable field names the MongoDB collection where its scrapers’ rows land. Use groups to:

  • Apply uniform scheduling to a set of scrapers (startType = MANUAL, DAILY, WEEKLY, NONE).
  • Share a coherent dataset between customers (Shared groups).
  • Trigger downstream operations (product-catalogue matching, data merge) at group granularity.

Endpoint summary

MethodPathOperation IDAuth scope
GET/api/scraper/group/listscrapewise_get_scraper_group_listbearer
PUT/api/scraper/groupscrapewise_create_scraper_groupbearer + idempotency-key
PUT/api/scraper/group/{id}/start-type/{startType}scrapewise_update_scraper_group_start_typebearer + plan feature + idempotency-key
PUT/api/scraper/group/{id}/matchscrapewise_update_scraper_group_matchbearer + TEXT_MATCHING + idempotency-key
POST/api/scraper/group/{id}/preview-deletescrapewise_delete_scraper_group_previewbearer
DELETE/api/scraper/group/{id}scrapewise_delete_scraper_groupbearer + idempotency-key

List groups — GET /api/scraper/group/list

curl -H "Authorization: Bearer $KEY" \ https://portal.scrapewise.ai/api/scraper-api/api/scraper/group/list

Returns the groups you OWN. For groups shared TO you, use GET /api/scraper/shared/group/list.

Response (200)List<GroupDTO> with id, name, dataTable name, startType, schedule metadata, member-scraper count. Empty list if you have no groups.

Errors — 400 (N/A) / 401 / 403 (N/A) / 404 (N/A) / 429 / 500.

Create or update a group — PUT /api/scraper/group

PUT /api/scraper/group Authorization: Bearer <key> Idempotency-Key: <uuid> Content-Type: application/json { "id": null, "name": "competitor-prices", "dataTable": "competitor_prices", "startType": "DAILY", "shouldMatchProducts": false }

Upsert semantics: omit id to create; set id to update. Creating a new group is plan-feature gated by MAX_GROUPS; updating is not.

Response (200) — the persisted GroupDTO including the assigned id and any server-stamped fields.

Errors — 400 (validation) / 401 / 402 (MAX_GROUPS hit on create) / 403 (N/A) / 404 (N/A) / 429 / 500.

Set group-wide start type — PUT /api/scraper/group/{id}/start-type/{startType}

PUT /api/scraper/group/5f9a.../start-type/DAILY Authorization: Bearer <key> Idempotency-Key: <uuid>

Updates EVERY scraper in the group to share the same StartType. Values: MANUAL, DAILY, WEEKLY, NONE (paused).

Each non-NONE value is plan-feature gated:

  • MANUALMANUAL_RUN
  • DAILYDAILY_SCHEDULER
  • WEEKLYWEEKLY_SCHEDULER

Response (200)List<StartTypeForGroupDTO> — per-scraper records reflecting the new state.

Errors — 400 (group not found) / 401 / 402 (plan lacks the chosen feature) / 403 (N/A) / 404 (N/A — 400 used instead) / 429 / 500.

Trigger product matching — PUT /api/scraper/group/{id}/match

PUT /api/scraper/group/5f9a.../match Authorization: Bearer <key> Idempotency-Key: <uuid>

Schedules an asynchronous match of the group’s most-recent scraped products against the Bebo master catalogue. Matched products get linked via a master-data id (used downstream for price comparison / catalogue enrichment).

Requires the TEXT_MATCHING plan feature AND shouldMatchProducts=true on the group. Returns 204 No Content once queued — actual matching happens async.

Errors

CodeMeaning
400Group doesn’t exist / not configured for matching (shouldMatchProducts=false) / a previous match is still PENDING or RUNNING
401Missing/invalid bearer
402Plan lacks TEXT_MATCHING
403N/A
404N/A
429Rate-limited
500Scheduling failure

Delete a group (destructive — two-call protocol) — DELETE /api/scraper/group/{id}

Destructive operation. Deleting a group cascades to delete every scraper inside it. Optionally also drops the entire MongoDB data collection (withData=true) — all historical scraped rows are lost.

ADR-012 two-call pattern: first preview, then commit within 5 minutes.

Steps

  1. POST /api/scraper/group/{id}/preview-delete[?withData=true] — mints a 5-minute token + preview summary.
  2. DELETE /api/scraper/group/{id}[?withData=true] — commits the delete (idempotency-key required).

Skipping the preview step deletes rows without confirmation.

Step 1 — Preview

POST /api/scraper/group/5f9a.../preview-delete?withData=true Authorization: Bearer <key>

Response (200)

{ "token": "9b2d-...", "opName": "scrapewise_delete_scraper_group", "targetEntityId": "5f9a...", "previewSummary": { "entityName": "5f9a...", "entityType": "scraper_group", "cascadeCounts": {}, "warnings": [ "withData=true: the group's entire MongoDB data collection will be dropped (all historical scraped rows lost, irreversible)." ] } }

When withData=true, the warning array surfaces the irreversible-data-loss notice — the user must see this before committing.

Step 2 — Commit

DELETE /api/scraper/group/5f9a...?withData=true Authorization: Bearer <key> Idempotency-Key: <uuid>

withData query param semantics:

  • false (default) → drops the group + all its scrapers; preserves the MongoDB data collection.
  • true → also drops the data collection (irreversible).

Response204 No Content.

Errors (both steps)

CodeMeaning
400Group doesn’t exist for this customer
401Missing/invalid bearer
403N/A
404N/A (400 used instead)
429Rate-limited
500Persistence failure mid-delete

See also