Download the PHP package aade/afm-lookup without Composer

On this page you can find all versions of the php package aade/afm-lookup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package afm-lookup

AADE AFM Lookup

PHP library for querying Greek VAT (AFM) numbers via AADE's official SOAP service.

PHP Version


Quick Start

Note: You need AADE credentials. Register here.


Table of Contents


Requirements

Requirement Version
PHP >= 8.1
ext-soap *
ext-dom *

Installation


Usage Guide

Creating a Client

Basic:

With options:

Looking Up an AFM

Validating AFM Format

Validate locally before making an API call:

Historical Lookups

Query business information as it was on a specific date:

Date format: The library accepts any DateTimeInterface implementation. Internally, dates are sent to AADE in Y-m-d format (e.g., 2023-01-15).

Business Activities

Each business can have multiple registered activities (KAD codes):


Error Handling

Checking error types via ErrorCode:


API Reference

AadeClient

Method Returns Description
getVatInfo(string $afm, ?DateTimeInterface $asOnDate = null) AfmInfoResponse Query AFM information
getVersion() string Get AADE service version
validateAfm(string $afm) bool Validate AFM format (static)

Response Objects

AfmInfoResponse

Property Type Description
success bool true if lookup succeeded
callSequenceId ?string AADE call tracking ID
basic ?BasicInfo Business information
firmActivities FirmActivity[] List of activities
error ?ErrorInfo Error details (if failed)
Method Returns Description
getMainActivity() ?FirmActivity Get primary business activity

BasicInfo

Property Type Description
afm ?string VAT number
name ?string Legal business name
commercialTitle ?string Commercial/trade name
doyCode ?string Tax office code
doyDescription ?string Tax office name
legalStatusCode ?string Legal form code
legalStatusDescription ?string Legal form (ΑΕ, ΕΠΕ, etc.)
postalAddress ?string Street name
postalAddressNumber ?string Street number
postalZipCode ?string Postal code
postalCity ?string City
registrationDate ?DateTimeImmutable Registration date
stopDate ?DateTimeImmutable Deactivation date
isNormalVat bool Normal VAT regime
isActive bool Currently active

FirmActivity

Property Type Description
code ?string KAD activity code
description ?string Activity description
kind ?int 1 = main, 2+ = secondary
kindDescription ?string Kind label
Method Returns Description
isMainActivity() bool Check if primary activity

ErrorInfo

Property Type Description
code ?ErrorCode Error code enum
description ?string Error message from AADE

AADE Error Codes

Code Description Exception Type
RG_WS_PUBLIC_TOKEN_USERNAME_NOT_AUTHENTICATED Invalid credentials AuthenticationException
RG_WS_PUBLIC_TOKEN_USERNAME_NOT_DEFINED Username missing AuthenticationException
RG_WS_PUBLIC_TOKEN_USERNAME_NOT_ACTIVE Account inactive AuthenticationException
RG_WS_PUBLIC_TOKEN_AFM_NOT_AUTHORIZED AFM not authorized AuthenticationException
RG_WS_PUBLIC_MAX_DAILY_CALLS_EXCEEDED Daily limit reached RateLimitException
RG_WS_PUBLIC_MAX_DAILY_USERNAME_CALLS_EXCEEDED User daily limit RateLimitException
RG_WS_PUBLIC_EPIT_NF AFM not found AadeException
RG_WS_PUBLIC_WRONG_AFM Invalid AFM InvalidAfmException
RG_WS_PUBLIC_AFM_CALLED_BY_BLOCKED Caller AFM blocked AadeException
RG_WS_PUBLIC_SERVICE_NOT_ACTIVE Service unavailable AadeException

See ErrorCode.php for the complete list.


License

MIT License. See LICENSE for details.


All versions of afm-lookup with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-soap Version *
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aade/afm-lookup contains the following files

Loading the files please wait ...