Ezefs
https://go.ezefs.com/api/v1

Base URL: https://go.ezefs.com/api/v1

Examples on other pages use {APIURL} for that base URL.

API access

To generate API ID & Key:

  • Login to Ezefs
  • Select from Menu >> Settings >> API
  • Click button "Generate new key"
  • Enter Comment
  • Click "Save" button

Headers

All API requests should have these headers.

Header Value
Ezefs-Api-Id API ID
Ezefs-Api-Key API Key
Content-Type application/json

Only GET requests are accepted. Filters are sent as a JSON request body.

Status

All responses have status.

Field Type Description
status Object Status object
timestamp Number Unixtime of request
api_limit Number Requests left (max 2000 requests per hour)
status String Allowed values: "OK" , "ERROR"
code Number Allowed values: 200 , 400 , 401 , 402 , 404
errors String[] Errors description
count Number Number of found entities

GET /validate1.0.0

Check API access. The request body is returned in response.params.

Example

curl --location --request GET '{APIURL}/validate' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json' \
  --data-raw '{"test_one": "one", "test_two": "two"}'

Example (PHP)

$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "{APIURL}/validate",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_POSTFIELDS => "{\"test_one\": \"one\", \"test_two\": \"two\"}",
    CURLOPT_HTTPHEADER => array(
        "Ezefs-Api-Id: 123456789",
        "Ezefs-Api-Key: 1a2b3c4d5e6f7g",
        "Content-Type: application/json"
    ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Headers

Name Type Description
Content-Type String application/json
Ezefs-Api-Id String API ID
Ezefs-Api-Key String API Key

Body

{
  "test_one": "one",
  "test_two": "two"
}

Response

Field Type Description
response Object
valid Boolean
params Object Request body
test_one String
test_two String

Includes the status object.

GET /clients1.0.0

Get list of all clients.

Example

curl --location --request GET '{APIURL}/clients' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json' \
  --data-raw '{"group": 1, "is_client": "customer"}'

Body

Name Type Required Description
group Number No Group Id
is_client String No Allowed values: "customer" , "supplier"

Response

Field Type Description
response Object[]
id Number
name String
reg_number String
vat_reg_number String
address String
postcode String
city String
country String
email String
mobile String
phone String
group_id String
group Object
id String
name String
invoice_email String
invoice_due_days String
contacts Object[]
id Number
name String
position String
email String
phone String
comments String
is_client String Allowed values: "customer" , "supplier"

Includes the status object.

GET /clients/:id1.0.0

Get client.

Example

curl --location --request GET '{APIURL}/clients/1' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Query

Name Type Required Description
id Integer Yes Entity Id

Response

Same fields as Get clients. response contains one client.

Includes the status object.

GET /client/groups1.0.0

Get client groups.

Example

curl --location --request GET '{APIURL}/client/groups' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Response

Field Type Description
response Object[]
id Number
name String

Includes the status object.

GET /client/contacts1.0.0

Get client contacts.

Example

curl --location --request GET '{APIURL}/client/contacts' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Response

Field Type Description
response Object[]
id Number
name String
position String
email String
phone String
comments String
client_id String

Includes the status object.

GET /invoices1.0.0

Get list of all invoices.

Example

curl --location --request GET '{APIURL}/invoices' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json' \
  --data-raw '{"type": "proforma"}'

Body

Name Type Required Description
type String No Allowed values: "invoice" , "proforma" , "credit"Default value: invoice

Response

Field Type Description
response Object[]
id Number
doc_nr String
doc_type String Allowed values: "invoice" , "proforma" , "credit"
created String
due String
penalty String
sent String
payed String
client_id String
project_id String
reference_number String
payer String
address String
net String
vat String
total String
currency String
credit_id String
offer_id String
parent_id String
footer_text String
memo String
lng String
lines Object[]
id Number
warehouse_item_id String
description String
unit String
amount String
price String
sum String
vat String
discount String

Includes the status object.

GET /invoices/:id1.0.0

Get invoice.

Example

curl --location --request GET '{APIURL}/invoices/1' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Query

Name Type Required Description
id Integer Yes Entity Id

Response

Same fields as Get invoices. response contains one invoice.

Includes the status object.

GET /offers1.0.0

Get list of all offers.

Example

curl --location --request GET '{APIURL}/offers' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Response

Field Type Description
response Object[]
id Number
doc_nr String
created String
due String
sent String
client_id String
project_id String
invoice_id String
payer String
address String
net String
vat String
total String
currency String
header_text String
footer_text String
memo String
lng String
offer_status String
lines Object[]
id Number
warehouse_item_id String
description String
unit String
amount String
price String
sum String
vat String
discount String

Includes the status object.

GET /offers/:id1.0.0

Get offer.

Example

curl --location --request GET '{APIURL}/offers/1' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Query

Name Type Required Description
id Integer Yes Entity Id

Response

Same fields as Get offers. response contains one offer.

Includes the status object.

GET /warehouse/items1.0.0

Get list of all warehouse items.

Example

curl --location --request GET '{APIURL}/warehouse/items' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json' \
  --data-raw '{"type": "product"}'

Body

Name Type Required Description
type String No Allowed values: "product" , "service"
category_id Number No Category Id
warehouse_id Number No Warehouse Id

Response

Field Type Description
response Object[]
id Number
type String Allowed values: "product" , "service"
code String
name String
ean String
serial_number String
unit String
purchase_price String
purchase_vat String
sales_price String
sales_vat String
category_id String
warehouse_id String
description String
in_stock Number

Includes the status object.

GET /warehouse/items/:id1.0.0

Get warehouse item.

Example

curl --location --request GET '{APIURL}/warehouse/items/1' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Query

Name Type Required Description
id Integer Yes Entity Id

Response

Same fields as Get items. response contains one item.

Includes the status object.

GET /warehouse/docs1.0.0

Get list of all warehouse documents.

Example

curl --location --request GET '{APIURL}/warehouse/docs' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Response

Field Type Description
response Object[]
id Number
doc_nr String
doc_type String
created String
notes String
lines Object[]
id String
item_id String
name String
amount Number

Includes the status object.

GET /warehouse/category1.0.0

Get list of all warehouse category.

Example

curl --location --request GET '{APIURL}/warehouse/category' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Response

Field Type Description
response Object[]
id Number
name String
parent_id Number

Includes the status object.

GET /warehouses1.0.0

Get list of all warehouses.

Example

curl --location --request GET '{APIURL}/warehouses' \
  --header 'Ezefs-Api-Id: 123456789' \
  --header 'Ezefs-Api-Key: 1a2b3c4d5e6f7g' \
  --header 'Content-Type: application/json'

Response

Field Type Description
response Object[]
id Number
name String

Includes the status object.