xPlantAPI
API referenceTasks and demand

List demand signals

Demand signals pushed for the workspace, newest first, a page at a time. Add genus to see one genus, and current=true as well to get its current demand as a single reading; that answer is never paged, and meta.next_cursor is always null.

GET/api/v1/tasks/demand
Scope read:tasks

Query parameters

NameTypeRequiredDescription
genusstringNoOnly signals for this genus.
current"true"NoWith genus, return the genus's current demand as a single reading instead of its history.
limitintegerNoPage size. Values above 200 are capped at 200. Default 50. From 1 to 200.
offsetintegerNoNumber of records to skip. Prefer cursor where a list offers it: an offset shifts when records are added ahead of it. Default 0. At least 0.
cursorstringNoContinue from the previous page: pass its meta.next_cursor unchanged, with the same filters. Treat it as opaque. Not combinable with offset. Up to 2048 characters.

Example

curl "https://app.xplantpro.com/api/v1/tasks/demand?genus=Alocasia&current=true" \
  -H "Authorization: Bearer $XPLANT_API_KEY"

Response

200 with { "ok": true, "data": … }. data is an array. To get the next page, pass meta.next_cursor back as cursor; it is null on the last page. See Pagination.

FieldTypeRequiredDescription
idstringYesThe signal's id — or current on the reading current=true returns.
genusstringYes—
source_typestring | nullYes—
demand_scorenumberYes—
sourcestringYes—
observed_atstringYes—
created_atstringYes—
Response
{
  "ok": true,
  "data": [
    {
      "id": "c41e8a07-93d2-4b6f-8e15-7a2d0f9b3c58",
      "genus": "Alocasia",
      "source_type": "tissue",
      "demand_score": 42,
      "source": "storefront",
      "observed_at": "2026-09-24T00:00:00.000Z",
      "created_at": "2026-09-24T00:05:11.000Z"
    }
  ]
}

The envelope can also carry meta:

FieldTypeRequiredDescription
next_cursorstring | nullYesPass as cursor to fetch the next page. null means this is the last page.
Response headerMeaning
X-Request-IdIdentifies this request. Include it when you contact support.

Errors

StatusCodeWhen
401UNAUTHORIZEDThe key is missing, malformed or revoked, or its owner is no longer a member of the workspace.
402PAID_PLAN_REQUIREDThe workspace's plan does not include the API. The full API is included with xPlant+ Teams and Enterprise; on Hobby and Pro Lab, keys can connect devices only.
403FORBIDDENThe key lacks a scope this operation requires, or its owner's current role in the workspace cannot use it — a key never does more than its owner can in xPlant. error names the scope, and for a role, the role it needs.
403DEVICE_TOKEN_NOT_ACCEPTEDA device token was sent; this operation needs a workspace API key.
422VALIDATION_ERRORBoth cursor and offset were sent; use one.
422INVALID_CURSORThe cursor is malformed, or came from a different list or different filters. Start again without it.
429RATE_LIMIT_EXCEEDEDToo many requests for this key, device token or workspace. Wait Retry-After seconds.
500DEMAND_QUERY_FAILEDThe signals could not be read. Retry later.

Branch on code, never on the error text. See Errors.

On this page