Introduction
Welcome to official Euronic Client API!
This documentation aims to provide all the information you need to work with our API.
As you scroll, you'll see code examples for working with the API in different programming languages in the area to the right (or as part of the content on mobile). You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).
Base URL
https://api.euronic.fi/
Authenticating requests
This API is authenticated by sending an Authorization
header with the value "Bearer {ACCESS_TOKEN}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can obtain your access token by authenticating yourself as described below.
Authentication
Authentication
Authenticate via credentials (username & password).
The credentials are identical to the ones you will use to login in to the client page. If you are unable to use your credentials or do not remember your credentials, you can always contact us via e-mail to restore your login credentials.
Upon valid authentication, you'll get a 200 OK response with access token you can use to authorize further API requests that requires authentication.
Otherwise, the request will fail with a 422 error, with an error message and a status code.
Example request:
curl --request POST \
"https://api.euronic.fi/api/v1/auth" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"username\": \"ex\",
\"password\": \"cupiditate\"
}"
const url = new URL(
"https://api.euronic.fi/api/v1/auth"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"username": "ex",
"password": "cupiditate"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.euronic.fi/api/v1/auth',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'username' => 'ex',
'password' => 'cupiditate',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/auth'
payload = {
"username": "ex",
"password": "cupiditate"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "",
"data": {
"token": "eyJ0ex...",
"token_type": "bearer",
"expires_in": 86400
}
}
Example response (422, Invalid input data):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"username": [
"The username is required"
],
"password": [
"The password is required"
]
}
}
}
Example response (422, Invalid credentials):
{
"error": {
"status": 422,
"message": "Invalid credentials"
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
The response message, empty string when request was succesfull.
token
string
The access token.
token_type
string
The type of token (always bearer
).
expires_in
integer
The value in seconds of when the access token is no longer valid (always 86400
, equivalent to 24 hours).
Refresh token
requires authentication
Generates a new token from previous token given in headers.
Upon succesfull request, you'll get a 200 OK response with new access token you can use to authorize further API requests that requires authentication.
If token is not present with the request headers, token is expired and can no longer be refreshed, the request will fail with a 401 error.
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/auth/refresh" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/auth/refresh"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/auth/refresh',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/auth/refresh'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"token": "eyJ0ex...",
"token_type": "bearer",
"expires_in": 86400
}
}
Example response (401, Access token not provided):
{
"error": {
"status": 401,
"message": "Access token error",
}
}
Example response (401, Expired Access token):
{
"error": {
"status": 401,
"message": "Expired Access token"
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
The response message, empty string when request was succesfull.
token
string
The access token.
token_type
string
The type of token (always bearer
).
expires_in
integer
The value in seconds of when the access token is no longer valid (always 86400
, equivalent to 24 hours).
Contact
Retrieve a collection of contacts for the authenticated User
requires authentication
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/contact/contacts" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/contact/contacts"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/contact/contacts',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/contact/contacts'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti@example.fi",
"billing_email": "matti.laskut@example.fi",
"billing_method": "email",
"business_id": "123456-7",
"e_invoice_address": "",
"e_invoice_intermediator": "",
},
{
"id": 2,
"address": "Esimerkkikatu 2",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "billing",
"email": "maija.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Maija Meikäläinen",
"phone": "+358.401234568",
"alt_email": "maija@example.fi",
"billing_email": "",
"billing_method": "e-invoice",
"business_id": "123456-7",
"e_invoice_address": "0123456789",
"e_invoice_intermediator": "OKOYFIHH",
}
],
"meta": {
"limit": 100,
"offset": 0,
"count": 2,
"total": 2
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
The identifier of Contact
address
string
Address
zip_code
string
Zip code
city
string
City
country
string
Two letter country code in ISO 639-1 format
contact_type
string
Type of contact (billing
, general
)
email
string
Email address
company_name
string
Company name
name
string
Contact name
phone
string
Phone number
alt_email
string
Secondary email address
billing_email
string
Billing email address
billing_method
string
Default billing method (email
, post
, e-invoice
)
business_id
string
Business ID
e_invoice_address
string
E-Invoice address
e_invoice_intermediator
string
E-Invoice intermediator
meta.limit
integer
The limit of results returned
meta.offset
integer
The current offset of returned results
meta.count
integer
Total number of items in the response
meta.total
integer
Total number of items
Retrieve details for the specified Contact
requires authentication
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/contact/contacts/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/contact/contacts/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/contact/contacts/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/contact/contacts/1'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti@example.fi",
"billing_email": "matti.laskut@example.fi",
"billing_method": "email",
"business_id": "123456-7",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Contact is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
The identifier of Contact
address
string
Address
zip_code
string
Zip code
city
string
City
country
string
Two letter country code in ISO 639-1 format
contact_type
string
Type of contact (billing
, general
)
email
string
Email address
company_name
string
Company name
name
string
Contact name
phone
string
Phone number
alt_email
string
Secondary email address
billing_email
string
Billing email address
billing_method
string
Default billing method (email
, post
, e-invoice
)
business_id
string
Business ID
e_invoice_address
string
E-Invoice address
e_invoice_intermediator
string
E-Invoice intermediator
Create a new contact
requires authentication
Example request:
curl --request POST \
"https://api.euronic.fi/api/v1/contact/contacts" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address\": \"Testikatu 1\",
\"zip_code\": \"20100\",
\"city\": \"Turku\",
\"country\": \"FI\",
\"company_name\": \"My Company\",
\"business_id\": \"1234567-8\",
\"first_name\": \"Matti\",
\"last_name\": \"Meikäläinen\",
\"phone\": \"+358.401234567\",
\"email\": \"matti@example.fi\",
\"alt_email\": \"matti2@example.fi\",
\"billing_email\": \"matti_billing@example.fi\",
\"billing_method\": \"email\",
\"e_invoice_address\": \"0123456789\",
\"e_invoice_intermediator\": \"OKOYFIHH\"
}"
const url = new URL(
"https://api.euronic.fi/api/v1/contact/contacts"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address": "Testikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"company_name": "My Company",
"business_id": "1234567-8",
"first_name": "Matti",
"last_name": "Meikäläinen",
"phone": "+358.401234567",
"email": "matti@example.fi",
"alt_email": "matti2@example.fi",
"billing_email": "matti_billing@example.fi",
"billing_method": "email",
"e_invoice_address": "0123456789",
"e_invoice_intermediator": "OKOYFIHH"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.euronic.fi/api/v1/contact/contacts',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address' => 'Testikatu 1',
'zip_code' => '20100',
'city' => 'Turku',
'country' => 'FI',
'company_name' => 'My Company',
'business_id' => '1234567-8',
'first_name' => 'Matti',
'last_name' => 'Meikäläinen',
'phone' => '+358.401234567',
'email' => 'matti@example.fi',
'alt_email' => 'matti2@example.fi',
'billing_email' => 'matti_billing@example.fi',
'billing_method' => 'email',
'e_invoice_address' => '0123456789',
'e_invoice_intermediator' => 'OKOYFIHH',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/contact/contacts'
payload = {
"address": "Testikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"company_name": "My Company",
"business_id": "1234567-8",
"first_name": "Matti",
"last_name": "Meikäläinen",
"phone": "+358.401234567",
"email": "matti@example.fi",
"alt_email": "matti2@example.fi",
"billing_email": "matti_billing@example.fi",
"billing_method": "email",
"e_invoice_address": "0123456789",
"e_invoice_intermediator": "OKOYFIHH"
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
{
"message": "New contact created successfully",
"data": null
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (422, Validation error):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"address": [
"The address is required"
]
}
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
Update existing contact
requires authentication
Returns updated contact
Example request:
curl --request PATCH \
"https://api.euronic.fi/api/v1/contact/contacts/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"address\": \"Esimerkkikatu 1\",
\"zip_code\": \"20100\",
\"city\": \"Turku\",
\"country\": \"FI\",
\"company_name\": \"My Company\",
\"business_id\": \"1234567-8\",
\"first_name\": \"Matti\",
\"last_name\": \"Meikäläinen\",
\"phone\": \"+358.401234567\",
\"email\": \"matti.meikalainen@example.fi\",
\"alt_email\": \"matti2@example.fi\",
\"billing_email\": \"matti_billing@example.fi\",
\"billing_method\": \"email\",
\"e_invoice_address\": \"0123456789\",
\"e_invoice_intermediator\": \"OKOYFIHH\"
}"
const url = new URL(
"https://api.euronic.fi/api/v1/contact/contacts/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"company_name": "My Company",
"business_id": "1234567-8",
"first_name": "Matti",
"last_name": "Meikäläinen",
"phone": "+358.401234567",
"email": "matti.meikalainen@example.fi",
"alt_email": "matti2@example.fi",
"billing_email": "matti_billing@example.fi",
"billing_method": "email",
"e_invoice_address": "0123456789",
"e_invoice_intermediator": "OKOYFIHH"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.euronic.fi/api/v1/contact/contacts/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'address' => 'Esimerkkikatu 1',
'zip_code' => '20100',
'city' => 'Turku',
'country' => 'FI',
'company_name' => 'My Company',
'business_id' => '1234567-8',
'first_name' => 'Matti',
'last_name' => 'Meikäläinen',
'phone' => '+358.401234567',
'email' => 'matti.meikalainen@example.fi',
'alt_email' => 'matti2@example.fi',
'billing_email' => 'matti_billing@example.fi',
'billing_method' => 'email',
'e_invoice_address' => '0123456789',
'e_invoice_intermediator' => 'OKOYFIHH',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/contact/contacts/1'
payload = {
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"company_name": "My Company",
"business_id": "1234567-8",
"first_name": "Matti",
"last_name": "Meikäläinen",
"phone": "+358.401234567",
"email": "matti.meikalainen@example.fi",
"alt_email": "matti2@example.fi",
"billing_email": "matti_billing@example.fi",
"billing_method": "email",
"e_invoice_address": "0123456789",
"e_invoice_intermediator": "OKOYFIHH"
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "My Company",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti2@example.fi",
"billing_email": "matti_billing@example.fi",
"billing_method": "email",
"business_id": "1234567-8",
"e_invoice_address": "0123456789",
"e_invoice_intermediator": "OKOYFIHH",
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Contact is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (422, Validation error):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"address": [
"The address is required"
]
}
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
The identifier of Contact
address
string
Address
zip_code
string
Zip code
city
string
City
country
string
Two letter country code in ISO 639-1 format
contact_type
string
Type of contact (billing
, general
)
email
string
Email address
company_name
string
Company name
name
string
Contact name
phone
string
Phone number
alt_email
string
Secondary email address
billing_email
string
Billing email address
billing_method
string
Default billing method (email
, post
, e-invoice
)
business_id
string
Business ID
e_invoice_address
string
E-Invoice address
e_invoice_intermediator
string
E-Invoice intermediator
Delete an existing Contact
requires authentication
Example request:
curl --request DELETE \
"https://api.euronic.fi/api/v1/contact/contacts/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/contact/contacts/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.euronic.fi/api/v1/contact/contacts/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/contact/contacts/1'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"message": "Contact deleted succesfully",
"data": null
}
Example response (400, Contact is assigned to at least one Domain):
{
"error": {
"status": 400,
"message": "Contact cannot be deleted as it is assigned to at least one domain",
}
}
Example response (400, Primary contact deletion):
{
"error": {
"status": 400,
"message": "Primary contact cannot be deleted",
}
}
Example response (403, Contact is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
Domain
Purchase - Purchase the specified Domain
requires authentication
Example request:
curl --request POST \
"https://api.euronic.fi/api/v1/domain/domains/purchase" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"domain\": \"testdomain.fi\",
\"years\": 1,
\"nameServers\": [
\"ns1.euronic.fi\",
\"ns2.euronic.fi\",
\"ns3.euronic.fi\"
],
\"registrantContact\": {
\"firstName\": \"Matti\",
\"lastName\": \"Meikäläinen\",
\"identityNumber\": \"010190-123A\",
\"address\": \"Esimerkkikatu 1\",
\"zipCode\": \"20100\",
\"city\": \"Turku\",
\"country\": \"FI\",
\"phone\": \"+358.401234567\",
\"email\": \"matti.meikalainen@example.fi\"
}
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/purchase"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"domain": "testdomain.fi",
"years": 1,
"nameServers": [
"ns1.euronic.fi",
"ns2.euronic.fi",
"ns3.euronic.fi"
],
"registrantContact": {
"firstName": "Matti",
"lastName": "Meikäläinen",
"identityNumber": "010190-123A",
"address": "Esimerkkikatu 1",
"zipCode": "20100",
"city": "Turku",
"country": "FI",
"phone": "+358.401234567",
"email": "matti.meikalainen@example.fi"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.euronic.fi/api/v1/domain/domains/purchase',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'domain' => 'testdomain.fi',
'years' => 1,
'nameServers' => [
'ns1.euronic.fi',
'ns2.euronic.fi',
'ns3.euronic.fi',
],
'registrantContact' => [
'firstName' => 'Matti',
'lastName' => 'Meikäläinen',
'identityNumber' => '010190-123A',
'address' => 'Esimerkkikatu 1',
'zipCode' => '20100',
'city' => 'Turku',
'country' => 'FI',
'phone' => '+358.401234567',
'email' => 'matti.meikalainen@example.fi',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/purchase'
payload = {
"domain": "testdomain.fi",
"years": 1,
"nameServers": [
"ns1.euronic.fi",
"ns2.euronic.fi",
"ns3.euronic.fi"
],
"registrantContact": {
"firstName": "Matti",
"lastName": "Meikäläinen",
"identityNumber": "010190-123A",
"address": "Esimerkkikatu 1",
"zipCode": "20100",
"city": "Turku",
"country": "FI",
"phone": "+358.401234567",
"email": "matti.meikalainen@example.fi"
}
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "Request was successful",
"data": null
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (422, Validation error):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"address": [
"The address is required"
]
}
}
}
Example response (422, Validation error (Unpaid order already exists)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Unable to purchase domain. Unprocessed purchase order already exists for the domain."
]
}
}
}
Example response (422, Validation error (Domain already registered)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Domain unavailable for purchase."
]
}
}
}
Received response:
Request failed with error:
Renew - Renew the specified Domain
requires authentication
Example request:
curl --request POST \
"https://api.euronic.fi/api/v1/domain/domains/renew" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"domain\": \"testdomain.fi\",
\"years\": 1
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/renew"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"domain": "testdomain.fi",
"years": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.euronic.fi/api/v1/domain/domains/renew',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'domain' => 'testdomain.fi',
'years' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/renew'
payload = {
"domain": "testdomain.fi",
"years": 1
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "Request was successful",
"data": null
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (422, Validation error):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"The domain is required"
]
}
}
}
Example response (422, Validation error (Unpaid order already exists)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Unable to renew domain. Unpaid recurring invoice is currently active for the domain."
]
}
}
}
Example response (422, Validation error (Domain not linked to authenticated user)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Unable to renew domain. The given domain is not associated with the authenticated user."
]
}
}
}
Example response (404, Domain does not exist):
{
"error": {
"status": 404,
"message": "Resource not found",
}
}
Received response:
Request failed with error:
Transfer - Transfer the specified Domain
requires authentication
Start domain transfer process from other registrar to Domainkeskus.
Example request:
curl --request POST \
"https://api.euronic.fi/api/v1/domain/domains/transfer" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"domain\": \"testdomain.fi\",
\"authCode\": \"TestKey1234\"
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/transfer"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"domain": "testdomain.fi",
"authCode": "TestKey1234"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.euronic.fi/api/v1/domain/domains/transfer',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'domain' => 'testdomain.fi',
'authCode' => 'TestKey1234',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/transfer'
payload = {
"domain": "testdomain.fi",
"authCode": "TestKey1234"
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "Request was successful",
"data": null
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (422, Validation error):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"The domain is required"
]
}
}
}
Example response (422, Validation error (Unpaid order already exists)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Unable to transfer domain. Unprocessed transfer order already exists for the domain."
]
}
}
}
Example response (422, Validation error (Domain already exists)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Unable to transfer domain. Domain already exists."
]
}
}
}
Example response (422, Validation error (Domain available for registration)):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"domain": [
"Domain unavailable for transfer."
]
}
}
}
Received response:
Request failed with error:
Domains - Retrieve a collection of domains for the authenticated User
requires authentication
Returns Domain data along with contact information assigned to Domain
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/domains" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/domains',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"id": 1,
"sld": "test",
"tld": "com",
"fqdn": "test.com",
"fqdn_unicode": "test.com",
"reg_date": "2022-08-01",
"exp_date": "2023-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"billing_contact": {
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti@example.fi",
"billing_email": "matti.laskut@example.fi",
"billing_method": "email",
"business_id": "123456-7",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
},
{
"id": 2,
"sld": "test",
"tld": "fi",
"fqdn": "test.fi",
"fqdn_unicode": "test.fi",
"reg_date": "2021-08-01",
"exp_date": "2022-08-01",
"status": "inactive",
"renew": false,
"updated_at": null,
"billing_contact": {
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti@example.fi",
"billing_email": "matti.laskut@example.fi",
"billing_method": "email",
"business_id": "123456-7",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
}
],
"meta": {
"limit": 100,
"offset": 0,
"count": 2,
"total": 2
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the domain
sld
string
Second level domain name
tld
string
Top level domain name
fqdn
string
Fully qualified domain name
fqdn_unicode
string
Fully qualified domain name in unicode format
reg_date
string
Registration date
exp_date
string
Expiration date
status
string
Domain status
renew
string
Renew status
updated_at
string
Date and time of when domain was last modified
billing_contact.id
integer
The identifier of Contact
billing_contact.address
string
Address
billing_contact.zip_code
string
Zip code
billing_contact.city
string
City
billing_contact.country
string
Two letter country code in ISO 639-1 format
billing_contact.contact_type
string
Type of contact (billing
, general
)
billing_contact.email
string
Email address
billing_contact.company_name
string
Company name
billing_contact.name
string
Contact name
billing_contact.phone
string
Phone number
billing_contact.alt_email
string
Secondary email address
billing_contact.billing_email
string
Billing email address
billing_contact.billing_method
string
Default billing method (email
, post
, e-invoice
)
billing_contact.business_id
string
Business ID
billing_contact.e_invoice_address
string
E-Invoice address
billing_contact.e_invoice_intermediator
string
E-Invoice intermediator
meta.limit
integer
The limit of results returned
meta.offset
integer
The current offset of returned results
meta.count
integer
Total number of items in the response
meta.total
integer
Total number of items
Domains - Retrieve details for the specified Domain
requires authentication
Returns Domain data along with contact information assigned to Domain
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/domains/test.com" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/domains/test.com',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"sld": "test",
"tld": "com",
"fqdn": "test.com",
"fqdn_unicode": "test.com",
"reg_date": "2022-08-01",
"exp_date": "2023-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"billing_contact": {
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti@example.fi",
"billing_email": "matti.laskut@example.fi",
"billing_method": "email",
"business_id": "123456-7",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the domain
sld
string
Second level domain name
tld
string
Top level domain name
fqdn
string
Fully qualified domain name
fqdn_unicode
string
Fully qualified domain name in unicode format
reg_date
string
Registration date
exp_date
string
Expiration date
status
string
Domain status
renew
string
Renew status
updated_at
string
Date and time of when domain was last modified
billing_contact.id
integer
The identifier of Contact
billing_contact.address
string
Address
billing_contact.zip_code
string
Zip code
billing_contact.city
string
City
billing_contact.country
string
Two letter country code in ISO 639-1 format
billing_contact.contact_type
string
Type of contact (billing
, general
)
billing_contact.email
string
Email address
billing_contact.company_name
string
Company name
billing_contact.name
string
Contact name
billing_contact.phone
string
Phone number
billing_contact.alt_email
string
Secondary email address
billing_contact.billing_email
string
Billing email address
billing_contact.billing_method
string
Default billing method (email
, post
, e-invoice
)
billing_contact.business_id
string
Business ID
billing_contact.e_invoice_address
string
E-Invoice address
billing_contact.e_invoice_intermediator
string
E-Invoice intermediator
Domains - Modify the information for the Domain
requires authentication
Returns Domain data along with contact information assigned to Domain
Example request:
curl --request PATCH \
"https://api.euronic.fi/api/v1/domain/domains/test.com" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"renew\": true,
\"contact_id\": 1
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"renew": true,
"contact_id": 1
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.euronic.fi/api/v1/domain/domains/test.com',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'renew' => true,
'contact_id' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com'
payload = {
"renew": true,
"contact_id": 1
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"sld": "test",
"tld": "com",
"fqdn": "test.com",
"fqdn_unicode": "test.com",
"reg_date": "2022-08-01",
"exp_date": "2023-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"billing_contact": {
"id": 1,
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"contact_type": "general",
"email": "matti.meikalainen@example.fi",
"company_name": "Matti&Maija OY",
"name": "Matti Meikäläinen",
"phone": "+358.401234567",
"alt_email": "matti@example.fi",
"billing_email": "matti.laskut@example.fi",
"billing_method": "email",
"business_id": "123456-7",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
}
Example response (400, Domain expired):
{
"error": {
"status": 400,
"message": "Unable to update resource: Domain already expired",
}
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (422, Contact is not assigned to the User):
{
"error": {
"status": 422,
"message": "The given data was invalid.",
"context": {
"contact_id": [
"The given contact id is not associated with the authenticated user"
]
}
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the domain
sld
string
Second level domain name
tld
string
Top level domain name
fqdn
string
Fully qualified domain name
fqdn_unicode
string
Fully qualified domain name in unicode format
reg_date
string
Registration date
exp_date
string
Expiration date
status
string
Domain status
renew
string
Renew status
updated_at
string
Date and time of when domain was last modified
billing_contact.id
integer
The identifier of Contact
billing_contact.address
string
Address
billing_contact.zip_code
string
Zip code
billing_contact.city
string
City
billing_contact.country
string
Two letter country code in ISO 639-1 format
billing_contact.contact_type
string
Type of contact (billing
, general
)
billing_contact.email
string
Email address
billing_contact.company_name
string
Company name
billing_contact.name
string
Contact name
billing_contact.phone
string
Phone number
billing_contact.alt_email
string
Secondary email address
billing_contact.billing_email
string
Billing email address
billing_contact.billing_method
string
Default billing method (email
, post
, e-invoice
)
billing_contact.business_id
string
Business ID
billing_contact.e_invoice_address
string
E-Invoice address
billing_contact.e_invoice_intermediator
string
E-Invoice intermediator
Name Servers - Retrieve name servers for the specified Domain
requires authentication
Returns a collection of name servers for the specified Domain
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"nameserver": "ns1.euronic.fi",
},
{
"nameserver": "ns2.euronic.fi",
}
{
"nameserver": "ns3.euronic.fi",
},
]
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (404, Resource not found):
{
"error": {
"status": 404,
"message": "Resource not found",
}
}
Received response:
Request failed with error:
Response
Response Fields
nameserver
string
Nameserver address
Name Servers - Replace all name servers for the specified Domain
requires authentication
Example request:
curl --request PUT \
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nameservers\": [
\"ns1.euronic.fi\",
\"ns2.euronic.fi\"
]
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nameservers": [
"ns1.euronic.fi",
"ns2.euronic.fi"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'nameservers' => [
'ns1.euronic.fi',
'ns2.euronic.fi',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers'
payload = {
"nameservers": [
"ns1.euronic.fi",
"ns2.euronic.fi"
]
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "Name servers updated succesfully",
"data": null
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (404, Resource not found):
{
"error": {
"status": 404,
"message": "Resource not found",
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
Name Servers - Add the specified name servers to the specified Domain
requires authentication
Example request:
curl --request PATCH \
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"nameservers\": [
\"ns1.euronic.fi\",
\"ns2.euronic.fi\"
]
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"nameservers": [
"ns1.euronic.fi",
"ns2.euronic.fi"
]
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'nameservers' => [
'ns1.euronic.fi',
'ns2.euronic.fi',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers'
payload = {
"nameservers": [
"ns1.euronic.fi",
"ns2.euronic.fi"
]
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "Name servers updated succesfully",
"data": null
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (404, Resource not found):
{
"error": {
"status": 404,
"message": "Resource not found",
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
Name Servers - Park Domain
requires authentication
Replace current name servers with Euronic's park servers (park1.euronic.fi
, park2.euronic.fi
, park3.euronic.fi
)
for the specified Domain
Example request:
curl --request PUT \
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers/park" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers/park"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers/park',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/nameservers/park'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers)
response.json()
Example response (200):
{
"message": "Name servers updated succesfully",
"data": null
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (404, Resource not found):
{
"error": {
"status": 404,
"message": "Resource not found",
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
DNS - Retrieve DNS records for the specified Domain
requires authentication
Returns a collection of DNS records for the specified Domain
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/domains/test.com/records" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/records"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/domains/test.com/records',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/records'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"host": "@",
"content": "127.0.0.1",
"type": "A"
},
{
"host": "www.test.com",
"content": "test.com",
"type": "CNAME"
}
]
}
Example response (400, Domain does not use Euronic's name servers):
{
"error": {
"status": 400,
"message": "This domain does not use Euronic's name servers.",
}
}
Example response (400, Domain does not exist):
{
"error": {
"status": 400,
"message": "DNS request failed: The domain name referenced in the query does not exist.",
}
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
host
string
Specifies the name of the record, i.e. for example the address to which the DNS query applies string
content
string
Target address of the record
type
string
Type of the record (A
, AAAA
, CNAME
, FORWARD
, MX
, MXE
, NS
, SRV
, TXT
, URL
, URLFRAME
)
pref
string
Preference (MX
Only)
redirect_type
string
Redirection type HTTP
code (URL
Only)
service
string
The symbolic name of the desired service (SRV
Only)
priority
string
The priority of the target host, lower value means more preferred (SRV
Only)
proto
string
The transport protocol of the desired service; this is usually either TCP or UDP (SRV
Only)
weight
string
Relative weight for records with the same priority, higher value means higher chance of getting picked(SRV
Only)
port
string
The TCP or UDP port on which the service is to be found (SRV
Only)
Services - Retrieve a collection of services for the specified Domain
requires authentication
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/domains/test.com/services" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/services"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/domains/test.com/services',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/services'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"id": 1,
"name": "Domainparkki",
"qty": 1,
"start_date": "2021-08-01",
"exp_date": "2022-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"price": {
"total": 5.67,
"billing_period_in_months": 12,
}
},
{
"id": 2,
"name": "Webhotelli WebStart sis. nimipalvelu",
"qty": 1,
"start_date": "2021-05-11",
"exp_date": "2024-05-11",
"status": "active",
"renew": false,
"updated_at": null,
"price": {
"total": 117.72,
"billing_period_in_months": 36,
}
},
],
"meta": {
"limit": 100,
"offset": 0,
"count": 2,
"total": 2
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the service
name
string
Name of the service
qty
integer
Quantity of service
start_date
string
Date when service was activated
exp_date
string
Date when service expires
status
string
Current status of the service (active
, inactive
)
renew
boolean
Whether the service will be renewed or not (true
, false
)
updated_at
string
Date when service was last modified
price.total
number
The cost of service as per billing period
price.billing_period_in_months
integer
Billing period in months
meta.limit
integer
The limit of results returned
meta.offset
integer
The current offset of returned results
meta.count
integer
Total number of items in the response
meta.total
integer
Total number of items
Services - Update renew status of service for the specified Domain
requires authentication
Returns Service data
Example request:
curl --request PATCH \
"https://api.euronic.fi/api/v1/domain/domains/test.com/services/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"renew\": true
}"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/services/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"renew": true
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.euronic.fi/api/v1/domain/domains/test.com/services/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'renew' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/services/1'
payload = {
"renew": true
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"name": "Domainparkki",
"qty": 1,
"start_date": "2021-08-01",
"exp_date": "2022-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"price": {
"total": 5.67,
"billing_period_in_months": 12,
}
}
}
Example response (400, Service expired):
{
"error": {
"status": 400,
"message": "Unable to update resource: Service already expired",
}
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain or Service is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the service
name
string
Name of the service
qty
integer
Quantity of service
start_date
string
Date when service was activated
exp_date
string
Date when service expires
status
string
Current status of the service (active
, inactive
)
renew
boolean
Whether the service will be renewed or not (true
, false
)
updated_at
string
Date when service was last modified
price.total
number
The cost of service as per billing period
price.billing_period_in_months
integer
Billing period in months
Auth Code - Generate authorization code for the specified Domain
requires authentication
An Auth Code is required to transfer a domain name between domain registrars
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/domains/test.com/authcode" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/domains/test.com/authcode"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/domains/test.com/authcode',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/domains/test.com/authcode'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"authCode": "8ysKrFhQf!"
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Domain is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (404, Domain does not exist):
{
"error": {
"status": 404,
"message": "Resouce not found",
}
}
Received response:
Request failed with error:
Response
Response Fields
authCode
string
Authorization Code (EPP code)
Domain Search
Domain Availability
Check domain availability details
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/test.com/check" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/test.com/check"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/test.com/check',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/test.com/check'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200, Single domain check):
{
"message": "",
"data": {
"sld": "test",
"tld": "com",
"info": "unavailable",
"status": 0,
"prices": [
{
"total": 39,
"billing_period": 12
},
{
"total": 78,
"billing_period": 24
},
{
"total": 117,
"billing_period": 36
}
]
}
}
Example response (200, Multi domain check):
{
"message": "",
"data": [
{
"sld": "test",
"tld": "com",
"info": "unavailable",
"status": 0,
"prices": [
{
"total": 39,
"billing_period": 12
},
{
"total": 78,
"billing_period": 24
},
{
"total": 117,
"billing_period": 36
}
]
},
{
"sld": "test",
"tld": "net",
"info": "unavailable",
"status": 0,
"prices": [
{
"total": 39,
"billing_period": 12
}
]
},
},
{
"sld": "test",
"tld": "org",
"info": "unavailable",
"status": 0,
"prices": [
{
"total": 39,
"billing_period": 12
}
]
},
}
]
}
Example response (400, Invalid domain):
{
"error": {
"status": 400,
"message": "Invalid domain"
}
}
Received response:
Request failed with error:
Response
Response Fields
message
string
The response message, empty string when request was succesfull.
sld
string
The second level domain name
tld
string
The top level domain name
info
string
The availability status of domain (eg. available
, unavailable
, invalid
)
status
integer
The availability status of domain (eg. 0
, 1
)
prices.total
number
The registration price for domain, VAT excluded (€)
prices.billing_period
integer
Billing period in months for domain price
Domain WHOIS
WHOIS Information
Get WHOIS information for the specified Domain
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/domain/test.com/whois" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/domain/test.com/whois"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/domain/test.com/whois',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/domain/test.com/whois'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"domain": "test.com",
"created": "1997-06-18 07:00:00",
"expires": "2025-06-17 07:00:00",
"updated": "2023-04-18 09:47:56",
"owner": "PERFECT PRIVACY, LLC",
"registrar": "Network Solutions, LLC",
"dnssec": "unsigned",
"nameServers": [
"ns1.safesecureweb.com",
"ns2.safesecureweb.com"
"ns3.safesecureweb.com"
],
"rawText": "Domain Name: TEST.COM\nRegistry Domain ID: 5429075_DOMAIN_COM-VRSN\n..."
}
}
Example response (400, Invalid domain):
{
"error": {
"status": 400,
"message": "Invalid domain"
}
}
Example response (400, Domain available):
{
"error": {
"status": 400,
"message": "Domain is available"
}
}
Received response:
Request failed with error:
Response
Response Fields
domain
string
The requested, fully qualfied domain name in IDN format.
created
string
Timestamp of when the domain was registered.
expires
string
Timestamp of when the domain expires.
updated
string
Timestamp of when the domain was last updated.
owner
string
Name of the current owner.
registrar
string
Name of the current registrar.
dnssec
string
DNSSEC information.
nameServers
string[]
Nameservers assigned to domain.
rawText
string
A raw-text representation of WHOIS information.
Invoice
Invoices - Retrieve a collection of invoices for the authenticated User
requires authentication
Returns invoice data along with recipient information and invoice items
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/invoice/invoices" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/invoice/invoices"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/invoice/invoices',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/invoice/invoices'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"id": 1,
"ref_number": 11,
"date": "2022-06-20",
"due_date": "2022-07-20",
"total": 154.6,
"paid": false,
"date_paid": null,
"payment_method": null,
"delivery_method": "e-invoice",
"items": [
{
"description": "matti.fi rekisteröinnin uudistus 26.8.22-26.8.25",
"qty": 1,
"sub_total": 27,
"total": 27,
"tax_rate": 0
},
{
"description": "matti.com rekisteröinnin uudistus 26.8.22-26.8.25",
"qty": 1,
"sub_total": 102.90,
"total": 127.60,
"tax_rate": 24
}
],
"recipient": {
"company_name": "Matti&Maija OY",
"business_id": "123456-7",
"name": "Matti Meikäläinen",
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
},
{
"id": 2,
"ref_number": 12,
"date": "2022-08-01",
"due_date": "2022-08-14",
"total": 154.6,
"paid": false,
"date_paid": null,
"payment_method": null,
"delivery_method": "e-invoice",
"items": [
{
"description": "maija.fi rekisteröinnin uudistus 26.8.22-26.8.25",
"qty": 1,
"sub_total": 27,
"total": 27,
"tax_rate": 0
},
{
"description": "maija.com rekisteröinnin uudistus 26.8.22-26.8.25",
"qty": 1,
"sub_total": 102.90,
"total": 127.60,
"tax_rate": 24
}
],
"recipient": {
"company_name": "Matti&Maija OY",
"business_id": "123456-7",
"name": "Maija Meikäläinen",
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
}
],
"meta": {
"limit": 100,
"offset": 0,
"count": 2,
"total": 2
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the invoice
ref_number
string
Reference number
date
string
Date when invoice was created
due_date
string
Due date of invoice
total
number
Total amount of invoice
paid
boolean
Whether invoice is paid or not
date_paid
string
Date when invoice was paid
payment_method
string
The method invoice was paid with
delivery_method
string
The method invoice was delivered with (post
, email
, e-invoice
)
items.description
string
The description
items.qty
integer
Quantity
items.sub_total
number
Sub-total (VAT excluded)
items.total
number
Total (VAT included)
items.tax_rate
integer
Tax rate
recipient.company_name
string
Company name
recipient.business_id
string
Business ID
recipient.name
string
Recipient name
recipient.address
string
Address
recipient.zip_code
Zip code
recipient.city
string
City
recipient.country
string
Two letter country code in ISO 639-1 format
recipient.e_invoice_address
string
E-Invoice address
recipient.e_invoice_intermediator
string
E-Invoice intermediator
meta.limit
integer
The limit of results returned
meta.offset
integer
The current offset of returned results
meta.count
integer
Total number of items in the response
meta.total
integer
Total number of items
Invoices - Retrieve details for the specified Invoice
requires authentication
Returns invoice data along with recipient information and invoice items
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/invoice/invoices/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/invoice/invoices/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/invoice/invoices/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/invoice/invoices/1'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"ref_number": 11,
"date": "2022-06-20",
"due_date": "2022-07-20",
"total": 154.6,
"paid": false,
"date_paid": null,
"payment_method": null,
"delivery_method": "e-invoice",
"items": [
{
"description": "matti.fi rekisteröinnin uudistus 26.8.22-26.8.25",
"qty": 1,
"sub_total": 27,
"total": 27,
"tax_rate": 0
},
{
"description": "matti.com rekisteröinnin uudistus 26.8.22-26.8.25",
"qty": 1,
"sub_total": 102.90,
"total": 127.60,
"tax_rate": 24
}
],
"recipient": {
"company_name": "Matti&Maija OY",
"business_id": "123456-7",
"name": "Matti Meikäläinen",
"address": "Esimerkkikatu 1",
"zip_code": "20100",
"city": "Turku",
"country": "FI",
"e_invoice_address": "",
"e_invoice_intermediator": "",
}
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Invoice is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Example response (404, Invoice does not exist):
{
"error": {
"status": 404,
"message": "Resource not found",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identier of the invoice
ref_number
string
Reference number
date
string
Date when invoice was created
due_date
string
Due date of invoice
total
number
Total amount of invoice
paid
boolean
Whether invoice is paid or not
date_paid
string
Date when invoice was paid
payment_method
string
The method invoice was paid with
delivery_method
string
The method invoice was delivered with (post
, email
, e-invoice
)
items.description
string
The description
items.qty
integer
Quantity
items.sub_total
number
Sub-total (VAT excluded)
items.total
number
Total (VAT included)
items.tax_rate
integer
Tax rate
recipient.company_name
string
Company name
recipient.business_id
string
Business ID
recipient.name
string
Recipient name
recipient.address
string
Address
recipient.zip_code
Zip code
recipient.city
string
City
recipient.country
string
Two letter country code in ISO 639-1 format
recipient.e_invoice_address
string
E-Invoice address
recipient.e_invoice_intermediator
string
E-Invoice intermediator
Service
Retrieve a collection of services for the authenticated User
requires authentication
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/service/services" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/service/services"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/service/services',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/service/services'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": [
{
"id": 1,
"name": "Domainparkki",
"qty": 1,
"start_date": "2021-08-01",
"exp_date": "2022-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"price": {
"total": 5.67,
"billing_period_in_months": 12,
}
},
{
"id": 2,
"name": "Webhotelli WebStart sis. nimipalvelu",
"qty": 1,
"start_date": "2021-05-11",
"exp_date": "2024-05-11",
"status": "active",
"renew": false,
"updated_at": null,
"price": {
"total": 117.72,
"billing_period_in_months": 36,
}
},
],
"meta": {
"limit": 100,
"offset": 0,
"count": 2,
"total": 2
}
}
Example response (401, Authorization token not provided or invalid):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identifier of the service
name
string
Name of the service
qty
integer
Quantity of the service
start_date
string
Date when service was activated
exp_date
string
Date when service expires
status
string
Current status of the service (active
, inactive
)
renew
boolean
Whether the service will be renewed or not (true
, false
)
updated_at
string
Date when service was last modified
price.total
number
The cost of service as per billing period
price.billing_period_in_months
integer
Billing period in months
meta.limit
integer
The limit of results returned
meta.offset
integer
The current offset of returned results
meta.count
integer
Total number of items in the response
meta.total
integer
Total number of items
Retrieve details for the specified Service
requires authentication
Example request:
curl --request GET \
--get "https://api.euronic.fi/api/v1/service/services/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://api.euronic.fi/api/v1/service/services/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.euronic.fi/api/v1/service/services/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/service/services/1'
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"name": "Domainparkki",
"qty": 1,
"start_date": "2021-08-01",
"exp_date": "2022-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"price": {
"price": 5.67,
"billing_period_in_months": 12,
}
}
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Service is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identifier of the service
name
string
Name of the service
qty
integer
Quantity of the service
start_date
string
Date when service was activated
exp_date
string
Date when service expires
status
string
Current status of the service (active
, inactive
)
renew
boolean
Whether the service will be renewed or not (true
, false
)
updated_at
string
Date when service was last modified
price.total
number
The cost of service as per billing period
price.billing_period_in_months
integer
Billing period in months
Update renew status of Service
requires authentication
Returns Service data
Example request:
curl --request PATCH \
"https://api.euronic.fi/api/v1/service/services/1" \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"renew\": true
}"
const url = new URL(
"https://api.euronic.fi/api/v1/service/services/1"
);
const headers = {
"Authorization": "Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"renew": true
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://api.euronic.fi/api/v1/service/services/1',
[
'headers' => [
'Authorization' => 'Bearer {token}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'renew' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.euronic.fi/api/v1/service/services/1'
payload = {
"renew": true
}
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"message": "",
"data": {
"id": 1,
"name": "Domainparkki",
"qty": 1,
"start_date": "2021-08-01",
"exp_date": "2022-08-01",
"status": "active",
"renew": true,
"updated_at": null,
"price": {
"price": 5.67,
"billing_period_in_months": 12,
}
}
}
Example response (400, Service expired):
{
"error": {
"status": 400,
"message": "Unable to update resource: Service already expired",
}
}
Example response (401, Authorization token not provided):
{
"error": {
"status": 401,
"message": "Unauthorized request",
}
}
Example response (403, Service is not assigned to the User):
{
"error": {
"status": 403,
"message": "Forbidden request",
}
}
Received response:
Request failed with error:
Response
Response Fields
id
integer
Identifier of the service
name
string
Name of the service
qty
integer
Quantity of the service
start_date
string
Date when service was activated
exp_date
string
Date when service expires
status
string
Current status of the service (active
, inactive
)
renew
boolean
Whether the service will be renewed or not (true
, false
)
updated_at
string
Date when service was last modified
price.total
number
The cost of service as per billing period
price.billing_period_in_months
integer
Billing period in months