curl --request GET \
--url https://api.home.datanumia.com/api/v2/smt-jobs/{job-id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"archive": "myOperationsArchive.tar.gz",
"state": {
"current": "DONE",
"history": "[\n {\n \"status\": \"SUBMITTED\",\n \"ts\": \"2024-01-23T15:50:40+01:00\"\n },\n {\n \"status\": \"IN_PROGRESS\",\n \"ts\": \"2024-01-23T15:50:44+01:00\"\n },\n {\n \"status\": \"DONE\",\n \"ts\": \"2024-01-23T15:50:46+01:00\"\n }\n]\n"
},
"_links": {
"self": {
"href": "https://<DATANUMIA_ROOT_URL>/smt-jobs/{job-id}"
}
},
"report": {
"error": {
"code": "INVALID_ARCHIVE_FORMAT",
"message": "<string>"
},
"overview": {
"nbOperationsTotal": 146,
"nbOperationsOK": 146,
"nbOperationsKO": 0
},
"files": [
{
"file": "test.json",
"error": {
"code": "INVALID_FILE_FORMAT",
"message": "<string>"
},
"content": {
"subscriptionStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"serviceOfferCode": "<string>",
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"siteModificationStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"personModificationStatus": [
{
"ids": {
"personId": "personId1",
"personCustomerId": "person-45634"
},
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"addServiceOfferStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"serviceOfferCode": "<string>",
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"terminateServiceOfferStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"serviceOfferCode": "<string>",
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"SMTStatus": [
{
"person": {
"ids": {
"personCustomerId": "<string>",
"personId": "<string>"
},
"sites": [
{
"ids": {
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
},
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
]
}
}
]
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "INVALID_AUTHORIZATION_HEADER_VALUE",
"errorDescription": "The Authorization header is invalid"
}{
"errorCode": "ACCESS_DENIED",
"errorDescription": "The Authorization token does not have permission to the resource"
}{
"errorCode": "JOB_NOT_FOUND",
"errorDescription": "The job xxxx does not exist"
}This response has no body data.get a job execution report
This API retruns a job execution current state. Depending on the state, a report specifying the request processing details is accessible.
The job execution state and report is only acessible during 21 days after its submission.
| State | Description |
|---|---|
| SUBMITTED | The archive is received but processing has not started. No detailed report accessible |
| IN_PROGRESS | The archive is being processed. No detailed report accessible |
| DONE | Archive processing is completed without errors. A detailed report is accessible |
| ERROR | Archive processing is completed but has encountered at least one functional error. A detailed report is accessible. Actions on the client side is necessary to correct errors and rerun the corresponding requests |
| INTERNAL_ERROR | Archive processing stopped mid-process for an unknown reason. A detailed report is accessible but is probably not complete. Actions on Datanumia’s side are necessary to correct them. The corresponding archive should be sent again for a complete retry |
| TIMEOUT | Archive processing stopped mid-process because of a slow processing time. A detailed report is accessible but is probably not complete. Actions on Datanumia’s side is necessary to correct them. The corresponding archive should be sent again for a complete retry |
Examples:
{
"archive": "SMTRequests.tar.gz",
"state": {
"current": "SUBMITTED",
"history": [
{
"status": "SUBMITTED",
"ts": "2025-03-13T13:15:19.067283Z"
}
]
}
// No report
"_links": {
// ...
}
}
Or
{
"archive": "SMTRequests.tar.gz",
"state": {
"current": "DONE",
"history": [
{
"status": "SUBMITTED",
"ts": "2025-03-13T13:32:47Z"
},
{
"status": "IN_PROGRESS",
"ts": "2025-03-13T13:35:22Z"
},
{
"status": "DONE",
"ts": "2025-03-13T13:35:23Z"
}
]
},
"report": {
"overview": {
"nbOperationsTotal": 1000,
"nbOperationsOK": 1000,
"nbOperationsKO": 0
},
// ...
},
"_links": {
// ...
}
}
If the job state is DONE, ERROR or INTERNAL_ERROR, the report contains a file object for each JSON file sent in the archive.
For each request in a file, there is a corresponding request status list that specify if the requests is successful or not.
| Request name | Request status name |
|---|---|
| SMTRequests | SMTStatus |
Example:
{
"archive": "SMTRequests.tar.gz",
"state": {
// ...
},
"report": {
// ...
"files": [
{
"file": "SMTRequests.json",
"content": {
"SMTStatus": [
//...
]
}
}
]
},
"_links": {
// ...
}
}
The request status is described by the Person and sites Ids and a status object.
The status code can be OK meaning the request is well processed. Or in error with an error code and a message specifying the problem encountered. Also, in case of multu sites Person, Ids are lined to the error in order to specify which object caused an error.
| Error code | Description |
|---|---|
| FIELD_IS_INVALID | A field content do not match the regex specified in the documentation |
| FIELD_IS_MANDATORY | A required field is missing |
| INTERNAL_ERROR | Requires an investigation to restore the service and/or correct the anomaly on Datanumia’s side |
| INVALID_SERVICE_OFFER_CODE | One of a service offer code does not match the configured service offers |
| OFFER_DUPLICATED | The serviceOffers list contains the same offer code multiple times |
| OFFER_MANDATORY | The serviceOffers list is missing in the site object |
| OPERATION_ALREADY_IN_PROGRESS | Two requests on the same person or site are executed concurrently. Do not send two requests on the same person or site in the same archive |
| OPERATION_NOT_SUPPORTED | A modification, termination or subscription operation is not supported |
| SITE_DUPLICATED | A person’s site list contains the same site multiple times |
| SITE_MANDATORY | The list of sites is empty or missing for a person not yet subscribed |
OK example:
This is where you can retreive person and site Home Ids: personId, siteId.
{
"person": {
"ids": {
"personCustomerId": "a_random_person_id_1",
"personId": "3cfa1b03-3bad-4d97-85b8-673c4cab99e7"
},
"sites": [
{
"ids": {
"siteCustomerId": "a_random_site_id_1",
"siteId": "dceb704f-e3fa-4128-aef3-ece501e425aa"
}
}
]
},
"status": [
{
"code": "OK"
}
]
}
Error example:
In cas of an error, the person and its sites are rollbacked to their previous state.
{
"person": {
"ids": {
"personCustomerId": "a_random_person_id_2"
},
"sites": [
{
"ids": {
"siteCustomerId": "a_random_site_id_2"
}
}
]
},
"status": [
{
"code": "FIELD_IS_MANDATORY",
"message": "siteZipCode is mandatory!",
"target": {
"personCustomerId": "a_random_person_id_2",
"siteCustomerId": "a_random_site_id_2"
}
},
{
"code": "FIELD_IS_MANDATORY",
"message": "elecMeterType is mandatory!",
"target": {
"personCustomerId": "a_random_person_id_2",
"siteCustomerId": "a_random_site_id_2"
}
}
]
}
curl --request GET \
--url https://api.home.datanumia.com/api/v2/smt-jobs/{job-id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/smt-jobs/{job-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"archive": "myOperationsArchive.tar.gz",
"state": {
"current": "DONE",
"history": "[\n {\n \"status\": \"SUBMITTED\",\n \"ts\": \"2024-01-23T15:50:40+01:00\"\n },\n {\n \"status\": \"IN_PROGRESS\",\n \"ts\": \"2024-01-23T15:50:44+01:00\"\n },\n {\n \"status\": \"DONE\",\n \"ts\": \"2024-01-23T15:50:46+01:00\"\n }\n]\n"
},
"_links": {
"self": {
"href": "https://<DATANUMIA_ROOT_URL>/smt-jobs/{job-id}"
}
},
"report": {
"error": {
"code": "INVALID_ARCHIVE_FORMAT",
"message": "<string>"
},
"overview": {
"nbOperationsTotal": 146,
"nbOperationsOK": 146,
"nbOperationsKO": 0
},
"files": [
{
"file": "test.json",
"error": {
"code": "INVALID_FILE_FORMAT",
"message": "<string>"
},
"content": {
"subscriptionStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"serviceOfferCode": "<string>",
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"siteModificationStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"personModificationStatus": [
{
"ids": {
"personId": "personId1",
"personCustomerId": "person-45634"
},
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"addServiceOfferStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"serviceOfferCode": "<string>",
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"terminateServiceOfferStatus": [
{
"ids": {
"personCustomerId": "person-customer-id-1234",
"siteCustomerId": "site-customer-id-978",
"personId": "person-home-id-367",
"siteId": "site-home-id-451"
},
"serviceOfferCode": "<string>",
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
],
"SMTStatus": [
{
"person": {
"ids": {
"personCustomerId": "<string>",
"personId": "<string>"
},
"sites": [
{
"ids": {
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
},
"status": [
{
"code": "SITE_ALREADY_ASSIGNED",
"message": "the site is already associated to another person",
"target": {
"personCustomerId": "<string>",
"personId": "<string>",
"siteCustomerId": "<string>",
"siteId": "<string>"
}
}
]
}
]
}
}
]
}
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "INVALID_AUTHORIZATION_HEADER_VALUE",
"errorDescription": "The Authorization header is invalid"
}{
"errorCode": "ACCESS_DENIED",
"errorDescription": "The Authorization token does not have permission to the resource"
}{
"errorCode": "JOB_NOT_FOUND",
"errorDescription": "The job xxxx does not exist"
}This response has no body data.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
the job id of job to inspect
Query Parameters
The overview option return a global execution report about the job execution.
In addition, the details option returns a detailed execution report of each ran operation in the job
overview, details