Skip to Content

POST Accounts

Use this endpoint to create new accounts such as customers, vendors, and carriers.

User level: Advanced

Endpoint

POST /v1/{scopeId}/accounts
PropertyValue
MethodPOST
Scope IDBranch UUID
AuthenticationAuthorization: Bearer <access_token>
Required scoperoutix:accounts:write
Content-Typeapplication/json
Request bodyJSON object

Create rules

  • The API validates server-side whether the resource belongs to the allowed organization and branch.
  • Only explicitly allowed fields can be sent.
  • Unknown or disallowed fields return 400 invalid_create.
  • organization_id and branch_id are set server-side and cannot be controlled by the client.
  • When creating an account, the API also creates an account_branches link for the branch from the URL.

Allowed create fields

Field
company_name
email
phone
account_type
status
website
industry
lead_source
visit_address_street
visit_address_number
visit_address_addition
visit_address_zipcode
visit_address_city
shipping_address_street
shipping_address_number
shipping_address_addition
shipping_address_zipcode
shipping_address_city
billing_address_street
billing_address_number
billing_address_addition
billing_address_zipcode
billing_address_city
invoice_email
vat_number
chamber_of_commerce_number
iban
bic
payment_terms
credit_limit
comment
registration_date

Example request

curl -X POST "https://api.routix.com/v1/550e8400-e29b-41d4-a716-446655440000/accounts" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{ "company_name": "Acme Transport B.V.", "email": "[email protected]", "phone": "+31 20 123 4567", "account_type": "customer", "status": "active" }'

Example response

{ "data": { "id": "550e8400-e29b-41d4-a716-446655440001", "company_name": "Acme Transport B.V.", "email": "[email protected]", "phone": "+31 20 123 4567", "account_type": "customer", "status": "active" }, "version": "v1" }

Error response

{ "error": "invalid_create", "error_description": "One or more fields are not allowed for creates on accounts" }

Possible error codes

  • 400 invalid_request
  • 400 invalid_create
  • 400 create_failed
  • 401 unauthorized
  • 401 invalid_token
  • 403 invalid_token_type
  • 403 insufficient_scope
  • 404 not_found
  • 405 method_not_allowed
  • Accounts GET
  • Accounts PATCH
  • API calls & examples
Last updated on