Documentation Index
Fetch the complete documentation index at: https://docs.arcuserp.com/llms.txt
Use this file to discover all available pages before exploring further.
What atomic-create means
Most ERP APIs require multiple round trips to build a complete record. You create the parent, get the ID, then POST each child separately. If one child call fails midway, you are left with a partial record. Arcus create endpoints accept the entire resource graph in a single POST. Children (addresses, line items, pricing tiers, kit components, contacts) nest directly inside the parent body. The server writes every row in a single database transaction. If anything fails, the whole request rolls back and you receive a structured error with the exact field path that failed. The pattern is the same across all primary resources:Anatomy of an atomic-create request
Every atomic-create request follows the same structure:Transactional guarantee
Every child is written inside a singleBEGIN / COMMIT block. The database constraint rules that apply are:
- All-or-nothing: if any child fails validation or insert, the parent row and every already-inserted child are rolled back. You get a complete record or nothing.
-
Validated upfront: required fields on every child are validated before any write begins. The first validation error stops execution and returns a 422 with the exact
parampath. - Side effects in-transaction: GL postings, inventory reservations, and activity log entries all write inside the same transaction (or queue atomically post-commit for async paths).
Error response: exact param path
When a nested child fails, theparam field points to the exact location inside the request body. This makes it possible to display an error next to the right field in your UI without parsing the error message.
param format is dot-and-bracket notation, matching the shape of the request body:
line_items[2].quantity— third line item, quantity fieldvariants[0].pricing[2].pricing_level_id— first variant, third pricing tier, pricing level fieldaddresses[1].country— second address, country field
Idempotency
Every atomic-create endpoint honors theIdempotency-Key header. Generate the key before the first attempt and reuse it on every retry. If Arcus processed the original request but your network failed, replaying the same key returns the original response without writing anything twice.
Hydrated response
The 201 response always includes every child expanded inline. No additional API calls are needed to verify what was created.Incremental edits still work
Atomic-create does not replace the per-child endpoints. After creating a parent, you can add children incrementally:When to use atomic-create vs incremental add
| Situation | Recommendation |
|---|---|
| Onboarding a new record with all its children at once | Atomic-create (single POST) |
| Migrating data from another system | Atomic-create with idempotency key per source ID |
| Adding one address to an existing account | Incremental add: POST /v1/accounts/{id}/addresses |
| Adding one pricing tier after a product is live | Incremental add: POST /v1/products/{id}/pricing |
Entity isolation
All child rows inheritentity_id from the authenticated API key. You cannot set entity_id in the request body; any attempt returns 403 forbidden_field. This ensures data isolation is structurally enforced at the API layer — one API key, one entity, every time.
See Also
- Creating Products, Kits, and Variants — variant parent with kit variants and qty-break pricing in one call
- Creating Accounts with Addresses — full B2B account graph with addresses, contacts, and payment methods
- Creating Orders — order with line items, tax, allocation, and inline payment
- Purchase-to-Pay Flow — PO through receipt, vendor bill, and AP payment
- Idempotency — how idempotency keys work across all create endpoints
- Error Handling — retry logic and structured error logging

