- Fakturan.nu API 2 /
- Clients /
- create
Params
-
number
Client number
-
first_name
Must be present if client is an individual.
-
last_name
Must be present if client is an individual.
-
email
Must be valid email if used.
-
company
Must be present unless client is an individual.
- phone
- home_phone
- mobile_phone
- fax
- org_number
-
client_type
Is the client an individual (not a business)? One of: “company”, “individual” (defaults to “company”)
- web
- vat_number
-
gln
Global Location Number (e-invoice address)
- settings Must be a Hash
-
settings[invoice_delivery_method]
One of: “email”, “email_and_sms”, “letter”, “e_invoice”
-
settings[e_invoice]
Boolean. If possible, the invoice will be sent as an e-invoice.
-
settings[invoice_days]
Default for new invoices to this client. Defaults to global setting.
-
settings[locale]
Default for new invoices to this client. Defaults to global setting.
-
settings[currency]
Default for new invoices to this client. Defaults to global setting.
-
settings[email_attach_pdf]
Boolean. Attach PDF when sending invoices by email. Useful if the recipient needs the PDF for automatic scanning.
- address Must be a Hash
- address[street_address]
-
address[care_of]
This field (if present) is printed as the first line in the address. No “care of” prefix is added by the application, so you have to do this yourself. This makes it possible to use the field for other purposes, e.g. “Att.”
- address[zip_code]
- address[city]
- address[country]
Examples
POST /api/v2/clients { "first_name": "Nils", "last_name": "Eriksson", "address": { "street_address": "Testvägen", "care_of": "Någon", "zip_code": "12345", "city": "Karlstad", "country": "SE" }, "mobile_phone": "46701234567", "email": "test@test.com", "fax": "", "phone": "070 751 51 66", "home_phone": "46701234567", "client_type": "individual", "org_number": "8001010043" } 201 { "data": { "id": 2, "number": 1, "name": "Nils Eriksson", "first_name": "Nils", "last_name": "Eriksson", "email": "test@test.com", "fax": "", "phone": "070 751 51 66", "home_phone": "46701234567", "mobile_phone": "46701234567", "client_type": "individual", "org_number": "8001010043", "settings": { "currency": "SEK", "discount": 0, "email_attach_pdf": false, "invoice_days": 30, "invoice_delivery_method": "email", "invoice_template": "croatia", "locale": "sv", "prices_inc_tax": "no", "show_product_code": false, "tax": 25 }, "address": { "street_address": "Testvägen", "care_of": "Någon", "zip_code": "12345", "city": "Karlstad", "country": "SE" } } }
POST /api/v2/clients { "company": "" } 422 { "errors": { "company": [ { "error": "blank" } ] } }