Flavours API
Bulk job

List Bulk Jobs

GET
/api/v2/bulk-jobs

Paginated bulk job history, filterable by resource and status. Market administrators and merchants see every job in their market; everyone else sees their own.

AuthorizationBearer <token>

You can retrieve your token by logging in.

In: header

Query Parameters

page?|

The page of history to load. Must be at least 1.

per_page?|

How many jobs to return per page. Must be at least 1.

search?|

Free-text search over resource, type and status.

sort?|

Column to sort by; prefix with - for descending. Defaults to newest first.

key_by?|
includes*array<>
filter?|
filter.type?|

Restrict the history to IMPORT or EXPORT jobs.

Value in"IMPORT" | "EXPORT"
filter.status?|

Restrict the history to a single job status.

Value in"AWAITING_UPLOAD" | "QUEUED" | "PREPARING" | "PROCESSING" | "COMPLETED" | "COMPLETED_WITH_ERRORS" | "FAILED" | "CANCELED"
filter.resource?|

Restrict the history to a single import module.

Value in"product" | "product_category" | "ingredient" | "customer"

Header Parameters

X-API-Version*string

API contract version to target. See the Changelog for what changed in each version.

Default"2.0.0"
Value in"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.flavours.sa/dev/api/v2/bulk-jobs?page=1&per_page=20&search=product&sort=-created_at&key_by=dignissimos&includes=ea&filter.type=IMPORT&filter.status=COMPLETED&filter.resource=product" \  -H "X-API-Version: 2.3.0"
{
  "meta": {
    "code": 200,
    "status": "success",
    "message": "Bulk job list retrieved successfully."
  },
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 3,
        "type": "IMPORT",
        "resource": "product",
        "status": "QUEUED",
        "user_id": "183bcfb1-0684-4fe3-b073-c7ade1768361",
        "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
        "branch_id": null,
        "batch_id": null,
        "total_rows": null,
        "processed_rows": 0,
        "error_count": 0,
        "cursor": null,
        "source_path": null,
        "artifact_path": null,
        "error_report_path": null,
        "delivery": "DOWNLOAD",
        "email": null,
        "params": [],
        "expires_at": null,
        "started_at": null,
        "finished_at": null,
        "created_at": 1787446686623,
        "updated_at": 1787446686623,
        "success_count": 0,
        "original_filename": null,
        "progress_percent": 0,
        "user": {
          "id": "183bcfb1-0684-4fe3-b073-c7ade1768361",
          "name": "Muriel Leuschke I"
        }
      },
      {
        "id": 2,
        "type": "IMPORT",
        "resource": "product",
        "status": "PROCESSING",
        "user_id": "183bcfb1-0684-4fe3-b073-c7ade1768361",
        "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
        "branch_id": null,
        "batch_id": null,
        "total_rows": 200,
        "processed_rows": 80,
        "error_count": 2,
        "cursor": null,
        "source_path": null,
        "artifact_path": null,
        "error_report_path": null,
        "delivery": "DOWNLOAD",
        "email": null,
        "params": [],
        "expires_at": null,
        "started_at": null,
        "finished_at": null,
        "created_at": 1787446686623,
        "updated_at": 1787446686623,
        "success_count": 0,
        "original_filename": null,
        "progress_percent": 40,
        "user": {
          "id": "183bcfb1-0684-4fe3-b073-c7ade1768361",
          "name": "Muriel Leuschke I"
        }
      },
      {
        "id": 1,
        "type": "IMPORT",
        "resource": "product",
        "status": "COMPLETED",
        "user_id": "183bcfb1-0684-4fe3-b073-c7ade1768361",
        "market_id": "848aa3f5-fc3d-42d3-8cc9-4c6edd0140d0",
        "branch_id": null,
        "batch_id": null,
        "total_rows": 120,
        "processed_rows": 120,
        "error_count": 0,
        "cursor": null,
        "source_path": null,
        "artifact_path": null,
        "error_report_path": null,
        "delivery": "DOWNLOAD",
        "email": null,
        "params": [],
        "expires_at": null,
        "started_at": null,
        "finished_at": null,
        "created_at": 1787446686623,
        "updated_at": 1787446686623,
        "success_count": 0,
        "original_filename": null,
        "progress_percent": 100,
        "user": {
          "id": "183bcfb1-0684-4fe3-b073-c7ade1768361",
          "name": "Muriel Leuschke I"
        }
      }
    ],
    "first_page_url": "http://localhost:8000/api/v2/bulk-jobs?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://localhost:8000/api/v2/bulk-jobs?page=1",
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "page": null,
        "active": false
      },
      {
        "url": "http://localhost:8000/api/v2/bulk-jobs?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next &raquo;",
        "page": null,
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "http://localhost:8000/api/v2/bulk-jobs",
    "per_page": 20,
    "prev_page_url": null,
    "to": 3,
    "total": 3
  }
}
{
  "meta": {
    "code": 401,
    "status": "error",
    "message": "Unauthenticated."
  },
  "data": null
}
{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Unauthorized."
  },
  "data": null
}
{
  "meta": {
    "code": 404,
    "status": "error",
    "message": "Resource not found."
  },
  "data": null
}
{
  "meta": {
    "code": 500,
    "status": "error",
    "message": "Internal server error."
  },
  "data": null
}