POST Accounts
Gebruik dit endpoint om nieuwe accounts aan te maken, zoals klanten, leveranciers en vervoerders.
Gebruikersniveau: Gevorderd
Endpoint
POST /v1/{scopeId}/accounts| Eigenschap | Waarde |
|---|---|
| Method | POST |
| Scope ID | Branch UUID |
| Authenticatie | Authorization: Bearer <access_token> |
| Vereiste scope | routix:accounts:write |
| Content-Type | application/json |
| Request body | JSON object |
Create-regels
- De API controleert server-side of de resource binnen de toegestane organization en branch valt.
- Alleen velden die expliciet zijn toegestaan mogen meegestuurd worden.
- Onbekende of niet-toegestane velden geven
400 invalid_create. organization_idenbranch_idworden server-side gezet en mogen niet door de client bepaald worden.- Bij het aanmaken van een account maakt de API ook automatisch een
account_brancheskoppeling aan voor de branch uit de URL.
Toegestane createvelden
| Veld |
|---|
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 |
Voorbeeldrequest
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"
}'Voorbeeldresponse
{
"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"
}Foutresponse
{
"error": "invalid_create",
"error_description": "One or more fields are not allowed for creates on accounts"
}Mogelijke foutcodes
400 invalid_request400 invalid_create400 create_failed401 unauthorized401 invalid_token403 invalid_token_type403 insufficient_scope404 not_found405 method_not_allowed
Gerelateerde pagina’s
- Accounts GET
- Accounts PATCH
- API calls en voorbeelden
Last updated on

