Skip to content

Bulk Requests

Thomas Pollet edited this page Mar 8, 2026 · 1 revision

Bulk Requests

What SAFRS means by bulk requests

SAFRS recognizes bulk-style collection payloads where data is an array rather than a single resource object.

Example shape:

{
  "data": [
    {"type": "Users", "attributes": {"name": "A"}},
    {"type": "Users", "attributes": {"name": "B"}}
  ]
}

JSON:API bulk extension note

The request parser tracks the JSON:API bulk extension through the ext=bulk media-type parameter.

Current code also warns when a client sends a bulk POST without explicitly declaring the bulk extension, but still accepts the payload.

Bulk POST

Bulk collection POST is the clearest bulk behavior in current SAFRS code:

  • if data is a list, SAFRS creates multiple instances
  • the response returns a collection-style data payload

Bulk PATCH and other bulk behavior

The current repository makes bulk POST clear. Other bulk mutation behavior should be treated as extension-dependent and verified against the code and tests before documenting it as a supported stable contract.

Caveat

If your client depends heavily on bulk operations, verify the exact behavior against the current SAFRS codebase and tests rather than assuming generic JSON:API bulk extension parity.

Clone this wiki locally