GET STARTED

The Wrapp API Service provides programmatic access and management of the client’s financial data. From accessing the client’s billing books to issuing all supported invoices to myDATA.

To use the Wrapp API Service, you need an API key. Please contact us at sales@wrapp.ai to get your own API key.

API Endpoint

https://wrapp.ai/api/v1/

LOGIN

To use the API, first log in with the correct credentials by making a POST call to:
https://wrapp.ai/api/v1/login

Notice: The JWT Token expires after 24 hours

QUERY PARAMETERS

Field Type Description
api_key String (required) Your API key.
email String (required) The email address of the client
# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/login' \
-H 'Content-Type: application/json' \
-d '{
     "email": "tenant@example.com",
     "api_key": "xxxxxxxx"
}'

Response Success:

{
 "data": {
   "type": "jwt",
   "attributes": {
     "jwt": "eyJhbGciOi...QZCe8F9xd3Xqu0"
   }
 }
}

Response Error:

{
 "errors": [
   {
     "title": "Not valid user"
   }
 ]
}

VAT EXEMPTIONS > INDEX

To retrieve a list of all available VAT exemptions, make a GET call to:
https://wrapp.ai/api/v1/vat_exemptions

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"
# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/login' \
-H 'Content-Type: application/json' \
-d '{
     "email": "tenant@example.com",
     "api_key": "xxxxxxxx"
}'

Response Success:

{
 "data": {
   "type": "jwt",
   "attributes": {
     "jwt": "eyJhbGciOi...QZCe8F9xd3Xqu0"
   }
 }
}

Response Error:

{
 "errors": [
   {
     "title": "Not valid user"
   }
 ]
}

BILLING BOOKS > INDEX

To retrieve a list of all available billing books, make a GET call to:
https://wrapp.ai/api/v1/billing_books

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"

For simplicity and automation, some invoice_type_codes are universal:
• Billing books with invoice_type_code 1.1 cover types 1.x
• Billing books with invoice_type_code 2.1 cover types 2.x
• Billing books with invoice_type_code 5.2 cover types 5.x

Example: Billing books with invoice_type_code 1.2 will default to 1.1.

# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/billing_books' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx'

Response Success:

[
 {
   "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
   "name": "Τιμ Παροχης",
   "series": "ΤΠΑ",
   "invoice_type_code": "2.1",
   "number": 3
 },
{
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "Απ Παροχης",
  "series": "ΕΑΠΑΡ",
  "invoice_type_code": "11.2",
  "number": 123
 },
  ...
]

Response Error:

{
 "errors": [
   {
     "status": "401"
     "title": "Unauthorized"
   }
 ]
}

BILLING BOOKS > CREATE

To create a new billing book, make a POST call to:
https://wrapp.ai/api/v1/billing_books

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"

QUERY PARAMETERS

Field Type Description
name String (required) The name of the billing book.
series String (required) The serial identifier of the billing book.
number Integer (required) The unique number associated with the new billing book entry.
invoice_type_code String (required) The invoice type code for the invoices this billing book will handle. Examples include 1.1, 9.3 etc.

For simplicity and automation, some invoice_type_codes are universal:
• Billing books with invoice_type_code 1.1 cover types 1.x
• Billing books with invoice_type_code 2.1 cover types 2.x
• Billing books with invoice_type_code 5.2 cover types 5.x

Example: Billing books with invoice_type_code 1.2 will default to 1.1.

# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/billing_books' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx' \
-d '{
   "name": "Τιμολόγιο",
   "series": "ΕΤΠΑ",
   "number": 1,
   "invoice_type_code": "2.1"
}'

Response Success:

{
 "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "name": "Τιμολόγιο",
 "series": "ΕΤΠΑ",
 "invoice_type_code": "2.1"
}

Response Error:

{
 "errors": [
   {
     "title": "Name το έχουν ήδη χρησιμοποιήσει"
   },
   {
     "title": "Series το έχουν ήδη χρησιμοποιήσει"
   },
 ]
}

BILLING BOOKS > UPDATE

To create a new billing book, make a PUT call to:
https://wrapp.ai/api/v1/billing_books/:id

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"

QUERY PARAMETERS

Field Type Description
:id Integer (required) The unique number associated with the new billing book entry.
# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/billing_books/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx' \
-d '{
   "number": 123
}'

Response Success:

{
 "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
 "name": "Τιμολόγιο",
 "series": "ΕΤΠΑ",
 "number": 123,
 "invoice_type_code": "2.1"
}

INVOICES > CREATE

To issue a new invoice, make a POST call to:
https://wrapp.ai/api/v1/invoices

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"

QUERY PARAMETERS

Example code of invoice type 8.2 is included separately on the side section

Field Type Description
counterpart Object (required) Contains customer information for the invoice.
billing_book_id String (required) The ID of the billing book to be used for this invoice.
invoice_type_code String (required) The invoice type code, as specified by myDATA documentation (e.g., "1.1", "9.3").
payment_method_type Integer (required) The payment method type identifier.
payment_details String Contains details about the payment. Accepts special characters, for example \n for new line.
currency String The currency code. For example "USD", "NOK", etc.
exchange_rate Float (required if currency is defined) The exchange rate of the currency defined, rounded to a maximum of 2 decimal places.
other_taxes_amount Float (required for invoice type 8.2) Rounded to a maximum of 2 decimal places.
net_total_amount Float (required) The total net amount of the invoice, rounded to a maximum of 2 decimal places.
vat_total_amount Float (required) The total VAT amount of the invoice, rounded to a maximum of 2 decimal places.
total_amount Float (required) The total invoice amount, rounded to a maximum of 2 decimal places.
payable_total_amount Float (required) The total payable amount of the invoice, rounded to a maximum of 2 decimal places.
correlated_invoices Array An array containing the myDATA marks of any correlated invoices.
Example: [ ] for none or [ 'xxxxxxxxx' , 'xxxxxxxxxx' ].
invoice_lines Array (required) An array of objects representing individual invoice line items.
withholding_total_amount Float The total withhold amount of the invoice, rounded to a maximum of 2 decimal places.
total_stamp_duty_amount Float The total stamp duty amount, rounded to a maximum of 2 decimal places.
b2g Boolean This must be true for B2G invoice
customer_emails Array of Strings (Optional) This array will send a mail to every customer on the array, it can be empty
delivery_address_city String (required for B2G) Πόλη
delivery_address_street String (required for B2G) Οδός
delivery_address_street_number String (required for B2G) Αριθμός
delivery_address_postal_code String (required for B2G) Τ.Κ.
delivery_address_party_name String (required for B2G) Ονομασία ΑΑΗΤ
b2g_contracting_authority_id String (required for B2G) Κωδικός ΑΑΗΤ
b2g_contract_identifier String (required for B2G) ΑΔΑΜ
b2g_budget_type Integer (required for B2G) Τύπος Προϋπολογισμού - Valid values are 1: Regular Budget, 2: e-PDE, 3: Other Budget
b2g_budget_identifier String (required for B2G) ΑΔΑ
b2g_payment_details String (required for B2G) Πληροφορίες Πληρωμής
b2g_due_date String (required for B2G) Καταληκτική Ημ/νία Πληρωμής - Valid format "2026-01-01"
deductions_total_amount Float (required when deductions present) Total of all deductions amount, rounded to a maximum of 2 decimal places
num Integer Specific invoice number
self_pricing Boolean Sends the invoice as self pricing
pos_device_id String (required when pos payments are made) The id of the pos device. Required only in case of a pos transaction related issuance
refund_invoice_id String (required in case of a pos credit invoice) The id of the invoice to be credited. Required only in case of issuing invoices crediting a pos transaction related invoice

COUNTERPART OBJECT

Field Type Description
name String (required) Name of the company for B2B invoices. For retail invoices could be first and last name separated by space
country_code String (required for B2B invoices) Code of the client's country.
Example: "GR" for Greece
vat String (required for B2B invoices) The client's tax id number.
city String (required for B2B invoices) The client's city name.
street String (required for B2B invoices) The client's street address.
number String (required for B2B invoices) The client's street number.
postal_code String (required for B2B invoices) The client's postal code.

PAYMENT METHOD TYPES

Code Description
0 Cash
1 Credit
2 Local bank account
3 Card
4 Cheque
5 Overseas bank account
6 Web banking transfer
7 Iris payment

INVOICE LINE OBJECT

Field Type Description
line_number Integer (required) The index number of the invoice line
name String (required) The name of the product or service.
Example: "Product 1"
quantity Integer (required) The quantity number of the product or service.
quantity_type Integer The corresponding quantity code for the specific product / service according to myDATA specification
unit_price Float (required) The price per unit for the corresponding product / service. Maximum 2 digits.
net_total_price Float (required) The net total price of the invoice line.
vat_rate Integer (required) The corresponding vat rate according to myDATA specifications.
vat_total Float (required) The total price if the invoice line for the specified vat rate. Maximum 2 digits.
subtotal Float (required) The sub total price of the invoice line. Maximum 2 digits.
vat_exemption_code Integer (required when vat_rate is zero) The appropriate vat exemption code according to myDATA specifications when vat_rate is zero.
classification_category String (required) The appropriate classification category according to myDATA specifications.
classification_type String (required) The appropriate classification type according to myDATA specifications.
other_taxes_amount Float (required for invoice type code 8.2) Rounded to a maximum of 2 decimal places.
accommodation_tax Float (required for invoice type code 8.2) Rounded to a maximum of 2 decimal places.
other_taxes_percent_category String (required for invoice type code 8.2) Valid values are: '6' , '7' , '8' , '9' , '10'
withhold_tax_rate Integer Rate of withhold tax, example for 20% the value must be 20
withhold_tax_code String myData withhold category code as string for example "3"
withholding_total Float Rounded to a maximum of 2 decimal places.
stamp_duty_tax_code String myData stamp duty code 1-4. Example "1"
stamp_duty_amount Float Rounded to a maximum of 2 decimal places.
cpv_code String (required for B2G)
deductions_amount Float (required when deductions present) Rounded to a maximum of 2 decimal places.
deductions Array Array of objects with title (string), amount (required - float, up to 2 decimals), informational (boolean - default false)
expenses_vat_classification String (required when self_pricing is true) myData expense vat classification

# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/invoices' \
-X POST \
-Η 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx' \
-d '{
    "invoice_type_code": "2.1",
    "billing_book_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "payment_method_type": 1,
    "payment_details": "Bank: xxxxxxxxx, iban: xxxxxxxxxxx",
    "currency": "USD",
    "exchange_rate": 0.80,
    "net_total_amount": 20.00,
    "vat_total_amount": 4.80,
    "total_amount": 24.80,
    "payable_total_amount": 24.80,
    "correlated_invoices": [],
    "withholding_total_amount": 0.50,
    "total_stamp_duty_amount": 2.50,
    "b2g": false,
    "delivery_address_city": "city",
    "delivery_address_street": "street",
    "delivery_address_street_number": "2",
    "delivery_address_postal_code": "11111",
    "delivery_address_party_name": "test name",
    "b2g_contracting_authority_id": "123123123-11",
    "b2g_contract_identifier": "12345",
    "b2g_budget_type": 1,
    "b2g_budget_identifier": "123123",
    "b2g_payment_details": "test details",
    "b2g_due_date": "2026-01-01",
    "deductions_total_amount": 10.00,
    "num": 11,
    "self_pricing": false,
    "pos_device_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "counterpart": {
      "name": "Γιάννης Ιωάννου",
      "country_code": "GR",
      "vat": "123456789",
      "city": "Αθήνα",
      "street": "Ερμού",
      "number": "0",
      "postal_code": "12345"
    },
    "invoice_lines": [{
      "line_number": 1,
      "name": "Name",
      "quantity": 1,
      "quantity_type": 1,
      "unit_price": 20.00,
      "net_total_price": 20.00,
      "vat_rate": 24,
      "vat_total": 4.80,
      "subtotal": 24.80,
      "vat_exemption_code": "",
      "withhold_tax_rate": 20,
      "withhold_tax_code": "2",
      "withholding_total": 0.50,
      "classification_category": "category1_3",
      "classification_type": "E3_561_001",
      "stamp_duty_tax_code": "1",
      "stamp_duty_amount": 2.50,
      "cpv_code": "111111111",
      "deductions_amount": 10.00,
      "expenses_vat_classification": "VAT_361",
      "deductions": [{
        "title": "Name 1",
        "amount": 5.00,
        "informational": false
    }, {
        "title": "Name 2",
        "amount": 5.00,
        "informational": false
      }]
    }]
}'

# Here is a curl example for invoice type code 8.2

curl -L 'https://wrapp.ai/api/v1/invoices' \
-Η 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx' \
-d '{
  "invoice_type_code": "8.2",
  "billing_book_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "payment_method_type": 1,
  "net_total_amount": 0,
  "vat_total_amount": 0,
  "total_amount": 1.50,
  "payable_total_amount": 1.50,
  "other_taxes_amount": 1.50,
  "counterpart": {
    "name": "Γιάννης Ιωάννου",
    "country_code": "GR",
    "vat": "123456789",
    "city": "Αθήνα",
    "street": "Ερμού",
    "number": "0",
    "postal_code": "12345"
  },
  "invoice_lines": [{
    "line_number": 1,
    "accommodation_tax": 1.50,
    "other_taxes_percent_category": "7",
    "other_taxes_amount": 1,50,
    "classification_category": "category1_95"
    }]
}'

Response Success:

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "my_data_mark": "xxxxxxxxxxxxxx",
  "my_data_uid": "xxxxxxxxxxxxxxx",
  "my_data_qr_url": "https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=xxxxxxxxx",
  "series": "a",
  "num": 1,
  "cancelled_by_mark": null,
  "wrapp_invoice_url": "https://wrapp.ai/el/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "wrapp_invoice_url_en": "https://wrapp.ai/en/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response Error:

{
 "errors": [
   {
     "title": "Name το έχουν ήδη χρησιμοποιήσει"
   },
   {
     "title": "Series το έχουν ήδη χρησιμοποιήσει"
   },
 ]
}

Response Pending:

# To check if the invoice has been issued succesfully to myDATA,
# we need to make a call to invoices status.

{
  "status": "pending",
  "invoice_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response Model Errors:

{
  "status": "Invoice Errors",
  "errors": [
    { "title": "Invoice type δεν συμπεριλαμβάνεται στη λίστα" },
    { "title": "Invoice Type does not match selected Billing Book Invoice Type" }
  ]
}

Response myDATA Errors:

{
  "status": "myDATA Errors",
  "errors": [
    {
       "code": "313",
       "message": "Classification type E3_561_003 is forbidden for Classification category category1_3 combined with invoice type Item2_1"
    }
  ]
}

INVOICES > STATUS

To get information about a specific invoice object make a GET call to:
https://wrapp.ai/api/v1/invoices/:id

HEADER PARAMETERS

Key Value
Authorization: "Bearer JWT"

REST URL PARAMETERS

Key Value
:id (required) The id of the invoice.

# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/invoices/123456-1234-1234-123456789012' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx'

Response Success:

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "my_data_mark": "xxxxxxxxxxxxxx",
  "my_data_uid": "xxxxxxxxxxxxxxx",
  "my_data_qr_url": "https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=xxxxxxxxx",
  "series": "a",
  "num": 1,
  "cancelled_by_mark": null,
  "wrapp_invoice_url": "https://wrapp.ai/el/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "wrapp_invoice_url_en": "https://wrapp.ai/en/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Response Error:

{
  "errors": [
    { "title": "Record not found" }
 ]
}

INVOICES > CANCEL

To cancel an invoice you need to send a DELETE call to:
https://wrapp.ai/api/v1/invoices/:id/cancel

Note: Invoices sent from provider can't be cancelled

HEADER PARAMETERS

Key Value
Authorization: "Bearer JWT"

REST URL PARAMETERS

Key Value
:id (required) The id of the invoice.

# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/invoices/123456-1234-1234-123456789012/cancel' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx' -X DELETE

Response Success:

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "my_data_mark": "xxxxxxxxxxxxxx",
  "my_data_uid": "xxxxxxxxxxxxxxx",
  "my_data_qr_url": "https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=xxxxxxxxx",
  "series": "a",
  "num": 1,
  "cancelled_by_mark": "xxxxxxxxxxxxx",
  "wrapp_invoice_url": "https://wrapp.ai/el/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "wrapp_invoice_url_en": "https://wrapp.ai/en/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

POS DEVICES > INDEX

In order to enable pos transactions with an invoice issuance, you need to create a POS device.
The following returns a list with all the pos devices a user has registered to his account.

To retrieve a list of all available POS devices, make a GET call to:
https://wrapp.ai/api/v1/pos_devices

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"
# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/pos_devices' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx'

Response Success:

[
 {
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "some-name",
  "terminal_id": "160xxxxx",
  "merchant_id": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
  },
  ...
]

POS DEVICES > CREATE

In order to enable pos transactions with an invoice issuance, you need to create a POS device.
The following creates a pos device for a given merchant id.

To create a pos device for a given merchant id, make a POST call to:
https://wrapp.ai/api/v1/pos_devices

HEADER PARAMETERS

Key Value
Accept: "application/json"
Authorization: "Bearer JWT"

QUERY PARAMETERS

Field Type Description
name String (required) The name of the pos device.
terminal_id String (required) The terminal id of the pos device.
merchant_id String (required) The merchant id of the account assotiated with the pos device.
# Here is a curl example

curl -L 'https://wrapp.ai/api/v1/pos_devices' \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer xxxxxxxxxxxxxx'
-d '{
   "name": "some-name"
  "terminal_id": "160xxxxx"
  "merchant_id": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
}'

Response Success:

{
  "id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "some-name",
  "terminal_id": "160xxxxx",
  "merchant_id": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
}

Response Error:

{
  "errors": [
    {
      "status": "401"
      "title": "Unauthorized"
    }
  ]
}

WEBHOOKS > INVOICE ISSUED

Navigating to Settings and then Account Settings the first panel will contain an entry called Webhook Endpoint.
There you can set any link that will expect messages from our service. This message will be send when an invoice is issued via the API. The message will be a POST request with the body described in the right panel. The headers are like bellow where TOKEN is your login token.

For example:
https://example.com/webhook

Header Parameters

Field Description
Content-Type application/json
Authorization Bearer TOKEN

Webhook POST message data (JSON):

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "my_data_mark": "xxxxxxxxxxxxxx",
  "my_data_uid": "xxxxxxxxxxxxxxx",
  "my_data_qr_url": "https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=xxxxxxxxx",
  "series": "a",
  "num": 1,
  "cancelled_by_mark": null,
  "wrapp_invoice_url": "https://wrapp.ai/el/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "wrapp_invoice_url_en": "https://wrapp.ai/en/customer_portal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

WEBHOOKS > POS ERRORS

If a pos payment session fails, an error message will be send to the webhook endpoint.

Navigating to Settings and then Account Settings the first panel will contain an entry called Webhook Endpoint.
There you can set any link that will expect messages from our service. This message will be send when an invoice is issued via the API.

For example:
https://example.com/webhook

Webhook message data (JSON):

{
  "errors": "Η συναλλαγή ακυρώθηκε από τον χρήστη (1000)"
}