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.
Overview
ThePOST /v1/accounts endpoint accepts the full account onboarding graph in a single request. All children (addresses, contacts, payment methods, tags) are written in one database transaction. Any child failure rolls back the parent account and every already-inserted child — you get a complete record or nothing.
The 201 response includes all children hydrated inline; no follow-up GET calls are needed.
Minimal create
Onlyname and account_type are required.
Full B2B onboarding graph
One POST creates the account, 3 addresses, 2 contacts, a payment method, and 2 tags.Address field aliases
The endpoint accepts Stripe-style field names as aliases for the internal column names:| Public API field | Internal column |
|---|---|
street1 | line1 |
street2 | line2 |
region | state |
postal_code | zip |
line1, state, zip) are returned in all responses.
Default billing and shipping flags
- Exactly one billing address may have
is_default_billing: true. - Exactly one shipping address may have
is_default_shipping: true. - If no address explicitly sets the flag, the first address of each type is auto-defaulted.
- Sending more than one
is_default_billing: true(oris_default_shipping: true) returns 422.
Contact role vs title
Therole field in the API payload is stored internally as title. Both field names are accepted in
the request body; title is returned in responses.
Payment methods: test mode
In test mode, use Stripe test card tokens:pm_card_visa— Visa, succeedspm_card_mastercard— Mastercard, succeedspm_card_visa_chargeDeclined— always fails
payment_methods[] will
return an error; omit the array if you are testing without Stripe.
Credit limit
credit_limit is a JS number (float) in the response, never a Postgres NUMERIC string.
credit_balance on a new account equals credit_limit (no outstanding AR yet).
Tags: auto-create
Tags supplied by name are auto-created for the entity if they do not exist. The name is slugified (lowercased, non-alphanumeric chars replaced by_) to form the slug. Applying
the same tag name twice in tags[] is idempotent.
Error envelope
All errors follow the canonical envelope:| error code | param | description |
|---|---|---|
missing_required_field | name | name (or an alias) not provided |
invalid_enum | account_type | account_type not one of: business, individual, vendor, lead |
invalid_enum | addresses[N].type | address type must be billing or shipping |
invalid_value | addresses[N].country | country must be ISO 3166-1 alpha-2 |
invalid_value | addresses[].is_default_billing | more than one billing default |
invalid_value | addresses[].is_default_shipping | more than one shipping default |
invalid_value | contacts[].is_primary | more than one primary contact |
missing_required_field | payment_methods[N].stripe_payment_method_id | PM token missing |
forbidden_field | entity_id | entity_id may not be set in request body |
Idempotency
SupplyIdempotency-Key: <unique-string> to safely retry creates without duplicating records.
The key is honored for 24 hours.
Related endpoints
GET /v1/accounts/:id?expand[]=addresses,contacts— retrieve with children expandedPOST /v1/accounts/:id/addresses— add an address to an existing accountPOST /v1/accounts/:id/contacts— add a contact to an existing accountPOST /v1/accounts/:id/payment-methods— attach a payment method to an existing accountPOST /v1/accounts/:id/merge— merge two accounts

