Skip to main content

SuggestionBatchResponse

The result of a batch POST. Always 200, even when some events failed: the ones that succeeded really were stored. Check num_errors and the per-item status values — do not rely on the status code alone.

response_codeinteger
Example: 200
successboolean

True for a batch that was processed, whether or not individual events failed. It reports that the request was understood, not that every event was accepted.

Example: true
uristring
Example: /api/v1/suggestions
item_results object[]

One result per event you sent, in the order you sent them.

  • Array [
  • indexinteger

    The event's position in the suggestions array you sent. Results are returned in that order, so this is also the index of this result — but match on it rather than assuming, and it stays correct if that ever changes.

    Example: 0
    source_idstringnullable

    The source_id of the event, echoed back so a result can be tied to its input without counting positions. Null if the event carried none.

    Example: jxfeed-alice-20260914-a91c3f
    statusstring

    The outcome:

    • created — a new suggestion was added.
    • updated — an existing suggestion matching this source_id was changed.
    • unchanged — a match was found and nothing about it differed. Not an error; re-sending an unchanged feed is expected to land here.
    • error — the event was refused. See error.

    Possible values: [created, updated, unchanged, error]

    Example: created
    id_suggestioninteger

    The suggestion's ID. Present on created, updated, and unchanged; absent on error.

    Example: 97
    errorstring

    Why the event was refused. Present only when status is error.

    Example: A suggestion needs a start and end.
  • ]
  • num_createdinteger

    How many new suggestions were added.

    Example: 2
    num_updatedinteger

    How many existing suggestions were changed.

    Example: 0
    num_unchangedinteger

    How many matched an existing suggestion with nothing to change.

    Example: 0
    num_errorsinteger

    How many events were refused.

    Example: 1
    SuggestionBatchResponse
    {
    "response_code": 200,
    "success": true,
    "uri": "/api/v1/suggestions",
    "item_results": [
    {
    "index": 0,
    "source_id": "jxfeed-alice-20260914-a91c3f",
    "status": "created",
    "id_suggestion": 97,
    "error": "A suggestion needs a start and end."
    }
    ],
    "num_created": 2,
    "num_updated": 0,
    "num_unchanged": 0,
    "num_errors": 1
    }