Acumatica API - Endpoint Default 23 200 001 icon

Acumatica API - Endpoint Default 23 200 001

Interact with Acumatica Endpoint Default/23.200.001

Actions478

Cash Sale → Insert/Update

AI-generated

Summary

Build Acumatica Cash Sale upsert request body from line-detail and additional-field parameters, unwrapping fixedCollection option keys and stripping default/empty values to prevent API 400 errors.

Inputs

  • details — Line-item details for the Cash Sale record. Fixed collection with multiple values; each item contains Account, Amount, Branch, CostCode, ExtendedPrice, InventoryID, ProjectTask, Qty, Subaccount, TaxCategory, TransactionDescription, and UnitPrice. Optional fields default to empty string or zero.
  • additionalFields — Top-level Cash Sale fields collected into a single block. Includes Amount, Balance, CashAccount, CreatedDateTime, CustomerID, Date, Description, Hold, LastModifiedDateTime, PaymentMethod, PaymentRef, Project, ReferenceNbr, Status, TaxTotal, and Type. All fields are optional with declared defaults.

Output shape

Acumatica API upsert response body, typically containing the new or updated Cash Sale record identifier and status. The node strips default/empty values before sending to avoid 400 validation errors.

The node's buildBody function reads parameters matching the Cash Sale/Insert-Update displayOptions, unwraps fixedCollection option keys to flatten nested structure, recursively removes falsy/zero defaults, and assembles the request for the Acumatica upsert endpoint. Any field not defined or inaccessible for the current item is skipped.

Examples

Example 1: Insert a new Cash Sale for customer CUST-001 with one line item.

Set CustomerID in additionalFields. Add one detail entry with Account, Qty, Amount, and UnitPrice populated. Leave other fields at defaults.

Links

Discussion