List of contacts
A list of contacts
query Parameters
qstringIf you want to list customers by a search term. Lookup is on Company name, VatID, Telephone,Email.
Example: Testing S.A.unpaidbooleanIf you want to list only customer with unpaid invoices
Example: 1tagidstringIf you want to filter by a Tag, fill in the Tag ID
Example: 24withRelationsstringIf you want to load model relationships as well with one call.
Example: 1per_pageinteger · min: 1 · max: 250Results per page, maximum 250. The default depends on the endpoint: 25 for invoices and contacts, 50 for products, 20 for payments, purchases and tags, 15 for OCP links. Responses carry
links.next(null on the last page) andmeta.current_page/meta.last_page; request the next page withpage=<n>.Example: 100
Headers
Acceptstringapplication/json
Responses
OK
dataobjectlinksobjectmetaobject
Create a contact
Create a contact
customerType options
| Option | Description |
|---|---|
| 1 | Domestic customer |
| 2 | Intra-community customer (EU-VIES) |
| 3 | Foreign customer |
| 4 | Private individual |
contactType options
| Option | Description |
|---|---|
| 1 | Customer |
| 2 | Supplier |
| 3 | Customer & Supplier |
Rules
- Always required:
isCompany,company(for an individual: the full name) andlang. - A company also needs
vatId,customerType(1, 2 or 3),postalCode,cityandcountry. An individual is alwayscustomerType4. vatIdmust be unique among your contacts (seeskipVatIdUniqueness).- Invoices to a company need its postal code, city and country, so fill them here.
Open the request body's Examples dropdown for a company with an extra address, a private individual, and the 422 for an AFM you already have.
Request Body
isCompanyboolean · requiredIf customer is company, make that true
companystring · requiredThe company name
langstring · requiredRequired. The language of the documents this contact receives:
eloren.
professionstringinChargestringvatIdstringThe AFM / VAT number. Required for a company, and it must be unique among your contacts: a second contact with the same AFM gets 422
The vat id has already been taken.Spaces and dots are removed.taxOfficestringstreetAddressstringRequired when
professionortaxOfficeis sent.aliasstringcustomerTypenumberRequired for a company: 1 domestic, 2 EU (VIES), 3 outside the EU. For a private individual it is always 4, whatever you send.
skipVatIdUniquenessbooleanSend this key to allow a second contact with an AFM you already have. Any value counts, even
false: only leave the key out to keep the check. Usually you want to reuse the existing contact instead (find it withGET /contacts?q=<AFM>).postalCodestringRequired for a company. Letters and digits only. Required for a company. Letters and digits only.
citystringRequired for a company. Required for a company.
countrystringRequired for a company. Required for a company.
mobilestringDigits only once spaces and dots are removed.
phonestringDigits only once spaces and dots are removed, so
+30is refused; send2101234567.faxstringDigits only.
infostringpublicNotestringaddressesobject[] · uniquebranchinteger | null · min: 0 · max: 2000The contact's establishment number (αριθμός εγκατάστασης) as registered with AADE. Empty or 0 means the headquarters. Sent to myDATA as the counterpart branch.
contactTypeinteger · enum1 customer (default), 2 supplier, 3 both.
Enum values:123currencystringtagsarrayTag names, as an array or a comma-separated string. Missing tags are created.
defaultVatIdnumberemailstringEmail address, or up to 5 addresses separated by commas. Used when invoices are emailed.
Responses
Created
dataobject
Update a customer
Replace a contact.
PUT replaces the whole contact. Fields you leave out are not kept:
vatId,phone,mobile,fax,infoandpublicNotebecome empty, all tags are removed,contactTypebecomes 1 (customer), and reminders are switched off. To change only some fields, use PATCH /contacts/{id}.
Required: isCompany, company, customerType (1, 2 or 3 for a company; 4 for an individual), and for a company postalCode, city and country.
customerType options
| Option | Description |
|---|---|
| 1 | Domestic customer |
| 2 | Intra-community customer (EU) |
| 3 | Foreign customer |
| 4 | Private individual |
path Parameters
idstring · requiredThe customer's iD
Request Body
isCompanyboolean · requiredRequired. Leaving it out stores the contact with no company/individual flag.
companystring · requiredcustomerTypenumber · required
langstringprofessionstringinChargestringvatIdstringtaxOfficestringstreetAddressstringaliasstringpostalCodestringcitystringcountrystringmobilestringphonestringfaxstringinfostringpublicNotestringaddressesobject[]The full list of extra addresses: ones left out are deleted.
branchinteger | null · min: 0 · max: 2000The contact's establishment number (αριθμός εγκατάστασης) as registered with AADE. Empty or 0 means the headquarters. Sent to myDATA as the counterpart branch.
contactTypeinteger · enum1 customer, 2 supplier, 3 both. Left out, it becomes 1: a supplier turns into a customer.
Enum values:123
Responses
The updated contact.
dataobject
Update part of a contact
Change only the fields you send; everything else stays as it is. Tags and extra addresses change only when you send them. This is the safe way to update one field, for example the phone.
path Parameters
idstring · requiredThe customer's iD
Request Body
isCompanybooleanCompany or private individual. Left out, it stays as it is.
companystringlangstringprofessionstringinChargestringvatIdstringtaxOfficestringstreetAddressstringaliasstringcustomerTypenumberpostalCodestringcitystringcountrystringmobilestringphonestringfaxstringinfostringpublicNotestringaddressesobject[]Send it only to replace the extra addresses: the list you send becomes the full list.
branchinteger | null · min: 0 · max: 2000The contact's establishment number (αριθμός εγκατάστασης) as registered with AADE. Empty or 0 means the headquarters. Sent to myDATA as the counterpart branch.
contactTypeinteger · enum1 customer, 2 supplier, 3 both. Left out, it stays as it is.
Enum values:123
Responses
The updated contact.
dataobject