Contractors.es icon

Contractors.es

Interact with Contractors.es API

Actions995

Inventory Purchase Row Relation Api → Delete Api Assets Inventory Purchases Inventory Purchase Rows Batch

AI-generated

Summary

Deletes multiple rows from a specific inventory purchase in the Contractors.es API using a batch request.

Inputs

  • inventory_purchase (required) — The ID of the inventory purchase to delete rows from.
  • resources — A JSON array of objects defining the rows to delete. The body of this array is sent directly to the API.
  • force — If true, deletes the rows even if they are currently 'soft deleted' (trashed). Defaults to true.
  • requestOptions — Advanced request settings including batching (splitting items into chunks), timeouts, and proxy configuration.

Output shape

A list of items corresponding to the input rows, containing the response data from the API for each successful deletion.

If a row fails deletion (e.g., due to business logic rules or API errors), the item will be marked with an error and the remaining rows in the batch may still be processed depending on the API's behavior.

Examples

Example 1: Delete a specific row from inventory purchase #123.

Set 'inventory_purchase' to 123. In 'resources', provide a JSON array with a single object, e.g., [{ 'id': 456 }]. 'force' is optional and defaults to true.

Example 2: Delete multiple rows in a single request.

Set 'inventory_purchase' to 123. In 'resources', provide a JSON array of multiple objects, e.g., [{ 'id': 101 }, { 'id': 102 }, { 'id': 103 }].

Example 3: Process a large list of rows efficiently.

Use 'requestOptions' with 'batching' enabled. Set 'batchSize' to 50 and 'batchInterval' to 1000ms to split the input list into batches of 50 items with a 1-second delay between batches.

Links

Discussion